Changeset 4bca3e in git for factory


Ignore:
Timestamp:
Jun 18, 1996, 2:22:54 PM (28 years ago)
Author:
Rüdiger Stobbe <stobbe@…>
Branches:
(u'spielwiese', '82fc009ea2b0098c1a4896c841bb70860976bdfc')
Children:
e6cc6869a80f3829d41e2482196f1181e9328e68
Parents:
cc2b49426a297bb36dc03b3dd6744400011e8b3a
Message:
"gcd_poly_univar0: now uses getSmallPrimes (due to changes in the handling
                  of prime numbers in cf_primes.
"


git-svn-id: file:///usr/local/Singular/svn/trunk@26 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd.cc

    rcc2b49 r4bca3e  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: cf_gcd.cc,v 1.2 1996-06-13 08:18:34 stobbe Exp $
     2// $Id: cf_gcd.cc,v 1.3 1996-06-18 12:22:54 stobbe Exp $
    33
    44/*
    55$Log: not supported by cvs2svn $
     6Revision 1.2  1996/06/13 08:18:34  stobbe
     7"balance: Now balaces polynomials even if the coefficient sizes are higher
     8         than the bound.
     9gcd: Now returns the results with positive leading coefficient.
     10     The isOne test is now performed if pi or pi1 is multivariate.
     11"
     12
    613Revision 1.1  1996/06/03 08:32:56  stobbe
    714"gcd_poly: now uses new function gcd_poly_univar0 to compute univariate
     
    247254    BB = power(CanonicalForm(2),tmin(f.degree(),g.degree()))*M;
    248255    q = 0;
    249     i = 1;
    250     n = cf_getNumBigPrimes();
     256    i = cf_getNumSmallPrimes() - 1;
    251257    while ( true ) {
    252258        B = BB;
    253         while ( i < n && q < B ) {
    254             p = cf_getBigPrime( i );
    255             i++;
    256             while ( i < n && mod( cl, p ) == 0 ) {
    257                 p = cf_getBigPrime( i );
    258                 i++;
     259        while ( i >= 0 && q < B ) {
     260            p = cf_getSmallPrime( i );
     261            i--;
     262            while ( i >= 0 && mod( cl, p ) == 0 ) {
     263                p = cf_getSmallPrime( i );
     264                i--;
    259265            }
    260266            setCharacteristic( p );
     
    283289            }
    284290        }
    285         if ( i < n ) {
     291        if ( i >= 0 ) {
    286292            // now balance D mod q
    287293            D = pp( balance( cg * D, q ) );
Note: See TracChangeset for help on using the changeset viewer.