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

Function fx_isFinite

xs/sources/xsNumber.c:93–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void fx_isFinite(txMachine* the)
94{
95 int fpclass;
96 txNumber number = (mxArgc < 1) ? C_NAN : fxToNumber(the, mxArgv(0));
97 mxResult->kind = XS_BOOLEAN_KIND;
98 mxResult->value.boolean = 0;
99 fpclass = c_fpclassify(number);
100 if ((fpclass != C_FP_NAN) && (fpclass != C_FP_INFINITE))
101 mxResult->value.boolean = 1;
102}
103
104void fx_isNaN(txMachine* the)
105{

Callers

nothing calls this directly

Calls 2

fxToNumberFunction · 0.85
c_fpclassifyFunction · 0.85

Tested by

no test coverage detected