MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / c_fpclassify

Function c_fpclassify

xs/sources/xsPlatforms.c:445–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443unsigned long c_infinity[2]={0x00000000, 0x7ff00000};
444
445int c_fpclassify(double x)
446{
447 int result = FP_NORMAL;
448 switch (_fpclass(x)) {
449 case _FPCLASS_SNAN:
450 case _FPCLASS_QNAN:
451 result = FP_NAN;
452 break;
453 case _FPCLASS_NINF:
454 case _FPCLASS_PINF:
455 result = FP_INFINITE;
456 break;
457 case _FPCLASS_NZ:
458 case _FPCLASS_PZ:
459 result = FP_ZERO;
460 break;
461 case _FPCLASS_ND:
462 case _FPCLASS_PD:
463 result = FP_SUBNORMAL;
464 break;
465 }
466 return result;
467}
468
469#endif /* _MSC_VER < 1800 */
470

Callers 15

fxPrintNumberFunction · 0.85
fxToBooleanFunction · 0.85
fxToUnsignedFunction · 0.85
fxRunTestFunction · 0.85
fx_BigIntFunction · 0.85
fxBigIntCompareFunction · 0.85
fxNumberToIntegerFunction · 0.85
fx_String_fromCharCodeFunction · 0.85
fx_isFiniteFunction · 0.85
fx_isNaNFunction · 0.85
fx_Number_isFiniteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected