| 234 | } |
| 235 | |
| 236 | void fx_Number_isFinite(txMachine* the) |
| 237 | { |
| 238 | int fpclass; |
| 239 | txSlot* slot = (mxArgc < 1) ? C_NULL : mxArgv(0); |
| 240 | mxResult->kind = XS_BOOLEAN_KIND; |
| 241 | mxResult->value.boolean = 0; |
| 242 | if (slot) { |
| 243 | if (slot->kind == XS_INTEGER_KIND) |
| 244 | mxResult->value.boolean = 1; |
| 245 | else if (slot->kind == XS_NUMBER_KIND) { |
| 246 | fpclass = c_fpclassify(slot->value.number); |
| 247 | if ((fpclass != C_FP_NAN) && (fpclass != C_FP_INFINITE)) |
| 248 | mxResult->value.boolean = 1; |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | void fx_Number_isInteger(txMachine* the) |
| 254 | { |
nothing calls this directly
no test coverage detected