Changeset fe6b62 in git
- Timestamp:
- Nov 28, 2014, 7:30:47 PM (9 years ago)
- Branches:
- (u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
- Children:
- 12e275d84e2be0f90130dd2c323ad7733f0cc304
- Parents:
- a3cc3fc3171dee60192b2d6a9f0049cc7bed99a8
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-11-28 19:30:47+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-12-15 18:49:40+01:00
- Location:
- libpolys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/longrat.cc
ra3cc3fc rfe6b62 346 346 #endif 347 347 348 CanonicalForm nlConvSingNFactoryN( number n,BOOLEAN setChar, const coeffs /*r*/ )348 static CanonicalForm nlConvSingNFactoryN( number n, const BOOLEAN setChar, const coeffs /*r*/ ) 349 349 { 350 350 if (setChar) setCharacteristic( 0 ); … … 389 389 } 390 390 391 number nlConvFactoryNSingN( const CanonicalForm n, const coeffs r) 392 { 393 if (n.isImm()) 394 { 395 long lz=n.intval(); 396 int iz=(int)lz; 391 number nlRInit (long i); 392 393 static number nlConvFactoryNSingN( const CanonicalForm f, const coeffs r) 394 { 395 if (f.isImm()) 396 { 397 const long lz=f.intval(); 398 const int iz=(int)lz; 397 399 if ((long)iz==lz) 398 { 399 return nlInit(n.intval(),r); 400 } 401 else return nlRInit(lz); 402 return nlInit(n.intval(),r); 400 return nlInit(f.intval(),r); 401 else 402 return nlRInit(lz); 403 // return nlInit(f.intval(),r); 403 404 } 404 405 else … … 408 409 z->debug=123456; 409 410 #endif 410 gmp_numerator( n, z->z );411 if ( n.den().isOne() )411 gmp_numerator( f, z->z ); 412 if ( f.den().isOne() ) 412 413 z->s = 3; 413 414 else 414 415 { 415 gmp_denominator( n, z->n );416 gmp_denominator( f, z->n ); 416 417 z->s = 0; 417 418 } … … 420 421 } 421 422 } 422 423 number nlRInit (long i);424 423 425 424 static number nlMapR(number from, const coeffs src, const coeffs dst) -
libpolys/polys/clapconv.cc
ra3cc3fc rfe6b62 248 248 static number convFactoryNSingAN( const CanonicalForm &f, const ring r) 249 249 { 250 if ( f.isImm() ) 251 { 252 long longf=f.intval(); 253 int intf=(int) longf; 254 if((long)intf==longf) 255 { 256 assume (r->cf->extRing != NULL); 257 return n_Init(f.intval(),r->cf->extRing->cf); 258 } 259 else return nlRInit( longf ); 260 } 261 else 262 { 263 number z=ALLOC_RNUMBER(); 264 #if defined(LDEBUG) 265 z->debug=123456; 266 #endif 267 gmp_numerator( f, z->z ); 268 if ( f.den().isOne() ) 269 { 270 z->s = 3; 271 } 272 else 273 { 274 gmp_denominator( f, z->n ); 275 z->s = 0; 276 nlNormalize(z,r->cf->extRing->cf); 277 } 278 /*#ifdef LDEBUG 279 nlTest(z,r->cf->extRing->cf); 280 #endif*/ 281 return z; 282 } 250 assume (r != NULL); 251 assume (r->cf != NULL); 252 assume (r->cf->extRing != NULL); 253 // it seems that r->cf->extRing->cf has to be Q ... ? 254 return n_convFactoryNSingN( f, r->cf->extRing->cf ); 283 255 } 284 256
Note: See TracChangeset
for help on using the changeset viewer.