1 #include <math.h>
2 #include <stdint.h>
3 
__fpclassifyf(float x)4 int __fpclassifyf(float x) {
5     union {
6         float f;
7         uint32_t i;
8     } u = {x};
9     int e = u.i >> 23 & 0xff;
10     if (!e)
11         return u.i << 1 ? FP_SUBNORMAL : FP_ZERO;
12     if (e == 0xff)
13         return u.i << 9 ? FP_NAN : FP_INFINITE;
14     return FP_NORMAL;
15 }
16