Changeset d07137 in git for factory/NTLconvert.cc
- Timestamp:
- Oct 15, 2003, 7:19:41 PM (21 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- ecd23349865d588d280037e46df36f300536d5a2
- Parents:
- 2499bf918092002632ace751f0bbae7bd5a2cccb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/NTLconvert.cc
r2499bf rd07137 1 /* $Id: NTLconvert.cc,v 1.1 1 2003-08-28 11:54:31Singular Exp $ */1 /* $Id: NTLconvert.cc,v 1.12 2003-10-15 17:19:38 Singular Exp $ */ 2 2 #include <config.h> 3 3 … … 453 453 char dummy[2]; 454 454 int minusremainder=0; 455 char numbers[]="0123456789abcdef"; 455 456 456 457 coeff_long=to_long(coefficient); … … 479 480 480 481 int l=0; 481 while (coefficient> 9)482 while (coefficient>15) 482 483 { 483 484 ZZ quotient,remaind; 484 ZZ ten;ten=1 0;485 ZZ ten;ten=16; 485 486 DivRem(quotient,remaind,coefficient,ten); 486 dummy[0]= (char)(to_long(remaind)+'0');487 dummy[0]=numbers[to_long(remaind)]; 487 488 //tmp*=10; tmp+=to_long(remaind); 488 489 … … 505 506 } 506 507 //built up the string in dummy[0] 507 dummy[0]= (char)(to_long(coefficient)+'0');508 dummy[0]=numbers[to_long(coefficient)]; 508 509 strcat(cf_stringtemp,dummy); 509 510 //tmp*=10; tmp+=to_long(coefficient); … … 526 527 527 528 //convert the string to canonicalform using the char*-Constructor 528 return CanonicalForm(cf_stringtemp2 );529 return CanonicalForm(cf_stringtemp2,16); 529 530 //return tmp; 530 531 }
Note: See TracChangeset
for help on using the changeset viewer.