This commit is contained in:
alexvoste
2026-05-07 02:22:25 +03:00
commit 1a9fd27a31
226 changed files with 29188 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#include <math.h>
#include <stdint.h>
int isnan(double x) {
union {
double f;
uint64_t i;
} u = { .f = x };
uint64_t exp = (u.i >> 52) & 0x7FF;
uint64_t mantissa = u.i & 0xFFFFFFFFFFFFFULL;
return (exp == 0x7FF) && (mantissa != 0);
}