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

Function fxPrintNumber

xs/tools/xslSlot.c:987–1003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

985}
986
987void fxPrintNumber(txMachine* the, FILE* file, txNumber value)
988{
989 switch (c_fpclassify(value)) {
990 case C_FP_INFINITE:
991 if (value < 0)
992 fprintf(file, "-C_INFINITY");
993 else
994 fprintf(file, "C_INFINITY");
995 break;
996 case C_FP_NAN:
997 fprintf(file, "C_NAN");
998 break;
999 default:
1000 fprintf(file, "%.20e", value);
1001 break;
1002 }
1003}
1004
1005void fxPrintSlot(txMachine* the, FILE* file, txSlot* slot, txFlag flag)
1006{

Callers 1

fxPrintSlotFunction · 0.85

Calls 1

c_fpclassifyFunction · 0.85

Tested by

no test coverage detected