Changeset 1daf0d in git for factory


Ignore:
Timestamp:
Jul 7, 2012, 3:14:28 PM (12 years ago)
Author:
Adrian Popescu <adi_popescum@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
2616026dd2a4a8abd18adedb6f3d10e41ace78ea
Parents:
800704ab0a248cdefe0f3e65b42f1c867ef4db6a
git-author:
Adrian Popescu <adi_popescum@yahoo.de>2012-07-07 15:14:28+02:00
git-committer:
Martin Lee <martinlee84@web.de>2013-02-18 22:09:31+01:00
Message:
64bits

Conflicts:

	factory/facBivar.h
	factory/facFqFactorize.h
	kernel/clapsing.cc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/int_rat.cc

    r800704 r1daf0d  
    1313#include "gmpext.h"
    1414
    15 static int intgcd( int a, int b )
     15static long intgcd( long a, long b )
    1616{
    1717    if ( a < 0 ) a = -a;
    1818    if ( b < 0 ) b = -b;
    1919
    20     int c;
     20    long c;
    2121
    2222    while ( b != 0 )
     
    2929}
    3030
    31 static long intgcd( long a, long b )
    32 {
    33     if ( a < 0 ) a = -a;
    34     if ( b < 0 ) b = -b;
    35 
    36     long c;
    37 
    38     while ( b != 0 )
    39     {
    40         c = a % b;
    41         a = b;
    42         b = c;
    43     }
    44     return a;
    45 }
    46 
    4731
    4832InternalRational::InternalRational()
     
    6852    else
    6953    {
    70         int g = intgcd( n, d );
     54        long g = intgcd( (long) n, (long) d );
    7155        if ( d < 0 )
    7256        {
    73           mpz_init_set_si( _num, -n / g );
    74           mpz_init_set_si( _den, -d / g );
     57          mpz_init_set_si( _num, -((long)n) / g );
     58          mpz_init_set_si( _den, -((long)d) / g );
    7559        }
    7660        else
Note: See TracChangeset for help on using the changeset viewer.