Changeset fe6b62 in git


Ignore:
Timestamp:
Nov 28, 2014, 7:30:47 PM (9 years ago)
Author:
Oleksandr Motsak <motsak@…>
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
Message:
Removed the definition of convFactoryNSingAN from clapconv.cc in favor of using n_convFactoryNSingN (=nlConvFactoryNSingN in this case)
Location:
libpolys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/longrat.cc

    ra3cc3fc rfe6b62  
    346346#endif
    347347
    348 CanonicalForm nlConvSingNFactoryN( number n, BOOLEAN setChar, const coeffs /*r*/ )
     348static CanonicalForm nlConvSingNFactoryN( number n, const BOOLEAN setChar, const coeffs /*r*/ )
    349349{
    350350  if (setChar) setCharacteristic( 0 );
     
    389389}
    390390
    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;
     391number nlRInit (long i);
     392
     393static 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;
    397399    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);
    403404  }
    404405  else
     
    408409    z->debug=123456;
    409410#endif
    410     gmp_numerator( n, z->z );
    411     if ( n.den().isOne() )
     411    gmp_numerator( f, z->z );
     412    if ( f.den().isOne() )
    412413      z->s = 3;
    413414    else
    414415    {
    415       gmp_denominator( n, z->n );
     416      gmp_denominator( f, z->n );
    416417      z->s = 0;
    417418    }
     
    420421  }
    421422}
    422 
    423 number nlRInit (long i);
    424423
    425424static number nlMapR(number from, const coeffs src, const coeffs dst)
  • libpolys/polys/clapconv.cc

    ra3cc3fc rfe6b62  
    248248static number convFactoryNSingAN( const CanonicalForm &f, const ring r)
    249249{
    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 );
    283255}
    284256
Note: See TracChangeset for help on using the changeset viewer.