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

Function fx_isNaN

xs/sources/xsNumber.c:104–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void fx_isNaN(txMachine* the)
105{
106 int fpclass;
107 txNumber number = (mxArgc < 1) ? C_NAN : fxToNumber(the, mxArgv(0));
108 mxResult->kind = XS_BOOLEAN_KIND;
109 mxResult->value.boolean = 0;
110 fpclass = c_fpclassify(number);
111 if (fpclass == C_FP_NAN)
112 mxResult->value.boolean = 1;
113}
114
115void fx_parseFloat(txMachine* the)
116{

Callers

nothing calls this directly

Calls 2

fxToNumberFunction · 0.85
c_fpclassifyFunction · 0.85

Tested by

no test coverage detected