Changeset 682 for soft/giet_vm/giet_libs/math
- Timestamp:
- Jul 29, 2015, 5:52:18 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/math/e_pow.c
r581 r682 316 316 if (isnan(x)) { 317 317 if (y == 0.0) { 318 giet_shr_printf("\nWarning : pow(NaN,0.0)\n");319 318 return x; /* pow(NaN,0.0) */ 320 319 } … … 323 322 if (x == 0.0) { 324 323 if (y == 0.0) { 325 giet_shr_printf("\nWarning : pow(0.0,0.0)\n");326 324 return 0; /* pow(0.0,0.0) */ 327 325 } 328 326 if (isfinite(y) && y < 0.0) { 329 giet_shr_printf("\nWarning : pow(0.0,negative)\n");330 327 return -huge; /* pow(0.0,negative) */ 331 328 } … … 335 332 if (isfinite(x) && isfinite(y)) { 336 333 if (isnan(z)) { 337 giet_shr_printf("\nWarning : pow(neg,non-int)\n");338 334 return 0.0/0.0; /* pow neg**non-int */ 339 335 } 340 336 { 341 337 double ret = huge; 342 giet_shr_printf("\nWarning : pow overflow\n");343 338 y *= 0.5; 344 339 if(x<zero&&rint(y)!=y) ret = -huge; … … 348 343 } 349 344 if (z == 0.0 && isfinite(x) && isfinite(y)) { 350 giet_shr_printf("\nWarning : pow underflow\n");351 345 return 0.0; 352 346 }
Note: See TracChangeset
for help on using the changeset viewer.