Changeset 733d24 in git for libpolys/coeffs/gnumpc.cc


Ignore:
Timestamp:
Sep 28, 2011, 7:33:12 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
9310cbb099615137456c0252eaee33a50d9db993
Parents:
046a941e1caf6571a05abbcd7e9dc58a903aa4eb
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-28 19:33:12+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:43+01:00
Message:
FIX: default construction parameters for real/complex number fields
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/gnumpc.cc

    r046a94 r733d24  
    389389{
    390390  assume( getCoeffType(n) == ID );
    391   assume( parameter != NULL);
    392391
    393392  n->cfKillChar = ndKillChar; /* dummy */
     
    488487  r->has_simple_Inverse=FALSE;
    489488*/
    490 
    491   LongComplexInfo* p = (LongComplexInfo*)parameter;
    492   n->complex_parameter = omStrDup(p->par_name);
    493   n->float_len = p->float_len;
    494   n->float_len2 = p->float_len2;
     489   
     490  if( parameter != NULL)
     491  {
     492    LongComplexInfo* p = (LongComplexInfo*)parameter;
     493    n->complex_parameter = omStrDup(p->par_name);
     494    n->float_len = p->float_len;
     495    n->float_len2 = p->float_len2;
     496   
     497  } else // default values, just for testing!
     498  {
     499    n->complex_parameter = omStrDup("i");
     500    n->float_len = SHORT_REAL_LENGTH;
     501    n->float_len2 = SHORT_REAL_LENGTH;     
     502  }
     503   
     504  assume( n->float_len <= n->float_len2 );
     505  assume( n->float_len2 >= SHORT_REAL_LENGTH );
     506  assume( n->complex_parameter != NULL );
    495507
    496508  return FALSE;
Note: See TracChangeset for help on using the changeset viewer.