Changeset 5a9405 in git
- Timestamp:
- Apr 16, 2010, 7:17:56 PM (13 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- f5071ec27a184f35ac683643fbcb1eb088007333
- Parents:
- 18640237cc3e76a4bdf4279f3fc1ac7fb9cdb4c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/clapconv.cc
r186402 r5a9405 24 24 #include "ffields.h" 25 25 26 typedef __mpz_struct lint; 27 26 28 void out_cf(char *s1,const CanonicalForm &f,char *s2); 27 29 … … 56 58 if ( n->s == 3 ) 57 59 { 58 term = make_cf( n->z ); 60 lint dummy; 61 mpz_init_set( &dummy,n->z ); 62 term = make_cf( dummy ); 59 63 } 60 64 else 61 65 { 62 66 // assume s==0 or s==1 67 lint num, den; 63 68 On(SW_RATIONAL); 64 term = make_cf( n->z, n->n, ( n->s != 1 )); 69 mpz_init_set( &num, n->z ); 70 mpz_init_set( &den, n->n ); 71 term = make_cf( num, den, ( n->s != 1 )); 65 72 } 66 73 } … … 179 186 if ( pGetCoeff( p )->s == 3 ) 180 187 { 181 term = make_cf( pGetCoeff( p )->z ); 188 lint dummy; 189 mpz_init_set( &dummy, (pGetCoeff( p )->z) ); 190 term = make_cf( dummy ); 182 191 } 183 192 else 184 193 { 185 194 // assume s==0 or s==1 195 lint num, den; 186 196 On(SW_RATIONAL); 187 term = make_cf( pGetCoeff( p )->z, pGetCoeff( p )->n, 188 ( pGetCoeff( p )->s != 1 )); 197 mpz_init_set( &num, (pGetCoeff( p )->z) ); 198 mpz_init_set( &den, (pGetCoeff( p )->n) ); 199 term = make_cf( num, den, ( pGetCoeff( p )->s != 1 )); 189 200 } 190 201 } … … 311 322 if ( napGetCoeff( p )->s == 3 ) 312 323 { 313 term = make_cf( napGetCoeff( p )->z ); 324 lint dummy; 325 mpz_init_set( &dummy, (napGetCoeff( p )->z) ); 326 term = make_cf( dummy ); 314 327 } 315 328 else 316 329 { 317 330 // assume s==0 or s==1 331 lint num, den; 318 332 On(SW_RATIONAL); 319 term = make_cf( napGetCoeff( p )->z, napGetCoeff( p )->n, 320 (napGetCoeff( p )->s != 1 )); 333 mpz_init_set( &num, (napGetCoeff( p )->z) ); 334 mpz_init_set( &den, (napGetCoeff( p )->n) ); 335 term = make_cf( num, den, ( napGetCoeff( p )->s != 1 )); 321 336 } 322 337 }
Note: See TracChangeset
for help on using the changeset viewer.