first commit of the new libm!
[musl] / src / math / __fpclassifyf.c
1 #include "libm.h"
2
3 int __fpclassifyf(float x)
4 {
5         union fshape u = { x };
6         int e = u.bits>>23 & 0xff;
7         if (!e) return u.bits<<1 ? FP_SUBNORMAL : FP_ZERO;
8         if (e==0xff) return u.bits<<9 ? FP_NAN : FP_INFINITE;
9         return FP_NORMAL;
10 }