Changeset 6c4df47 in git
- Timestamp:
- Jun 23, 1999, 10:26:43 AM (24 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 6b9e9c662b8c35931dfedb7053c0c6d2597e5f68
- Parents:
- 8c42949b7b17868cb7c7f501a82f0f67bed167f3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/gnumpfl.cc
r8c42949 r6c4df47 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: gnumpfl.cc,v 1. 3 1999-05-10 15:10:49 SingularExp $ */4 /* $Id: gnumpfl.cc,v 1.4 1999-06-23 08:26:43 wenk Exp $ */ 5 5 /* 6 6 * ABSTRACT: computations with GMP floating-point numbers … … 242 242 if ( exp == 0 ) 243 243 { 244 *(gmp_float*)u= 1.0;244 *(gmp_float*)u= (gmp_float)1.0; 245 245 return; 246 246 } … … 249 249 if ( x == NULL ) 250 250 { 251 *(gmp_float*) u=0.0;251 *(gmp_float*)(*u) = (gmp_float)0.0; 252 252 } 253 253 else 254 254 { 255 *(gmp_float*) u= *(gmp_float*)x;255 *(gmp_float*)(*u) = *(gmp_float*)x; 256 256 } 257 257 return; 258 258 } 259 259 260 ngfPower(x,exp-1,u); 260 *(gmp_float*)u*= *(gmp_float*)x; 261 262 *(gmp_float*)(*u) *= *(gmp_float*)x; 263 261 264 } 262 265 … … 398 401 { 399 402 char *out; 400 //Print("ngfWrite %d\n",gmp_output_digits); 401 out= floatToStr(*(gmp_float*)a,gmp_output_digits); 402 StringAppend(out); 403 404 Free((ADDRESS)out, (strlen(out)+1)* sizeof(char) ); 403 if ( a ) { 404 out= floatToStr(*(gmp_float*)a,gmp_output_digits); 405 StringAppend(out); 406 //Free((ADDRESS)out, (strlen(out)+1)* sizeof(char) ); 407 FreeL( (ADDRESS)out ); 408 } else { 409 StringAppend("0"); 410 } 405 411 } 406 412
Note: See TracChangeset
for help on using the changeset viewer.