Changeset 733d24 in git


Ignore:
Timestamp:
Sep 28, 2011, 7:33:12 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
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
Location:
libpolys/coeffs
Files:
3 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;
  • libpolys/coeffs/gnumpfl.cc

    r046a94 r733d24  
    404404{
    405405  assume( getCoeffType(n) == ID );
    406   assume( parameter != NULL);
    407   LongComplexInfo *p = (LongComplexInfo*)parameter;
    408406
    409407  n->cfKillChar = ndKillChar; /* dummy */
     
    441439  n->nCoeffIsEqual = ngfCoeffIsEqual;
    442440
    443   n->float_len = p->float_len;
    444   n->float_len2 = p->float_len2;
     441  if( parameter != NULL)
     442  {
     443    LongComplexInfo* p = (LongComplexInfo*)parameter;
     444     
     445    n->float_len = p->float_len;
     446    n->float_len2 = p->float_len2;
     447  } else // default values, just for testing!
     448  {
     449    n->float_len = SHORT_REAL_LENGTH;
     450    n->float_len2 = SHORT_REAL_LENGTH;
     451  }
     452   
     453  assume( n->float_len <= n->float_len2 );
     454  assume( n->float_len2 >= SHORT_REAL_LENGTH );
     455  assume( n->complex_parameter == NULL );
    445456
    446457  return FALSE;
  • libpolys/coeffs/shortfl.cc

    r046a94 r733d24  
    542542}
    543543
    544 BOOLEAN nrInitChar(coeffs n, void*)
     544BOOLEAN nrInitChar(coeffs n, void* p)
    545545{
    546546  assume( getCoeffType(n) == ID );
     547   
     548  assume( p == NULL ); p;
     549   
    547550  n->cfKillChar = ndKillChar; /* dummy */
    548551  n->ch = 0;
     
    578581  n->nCoeffIsEqual = ndCoeffIsEqual;
    579582
     583  n->float_len = SHORT_REAL_LENGTH;
     584  n->float_len2 = SHORT_REAL_LENGTH;
     585   
    580586  // TODO: Any variables?
    581587  return FALSE;
Note: See TracChangeset for help on using the changeset viewer.