__fpclassifyf.c 229 B

12345678910
  1. #include "libm.h"
  2. int __fpclassifyf(float x)
  3. {
  4. union fshape u = { x };
  5. int e = u.bits>>23 & 0xff;
  6. if (!e) return u.bits<<1 ? FP_SUBNORMAL : FP_ZERO;
  7. if (e==0xff) return u.bits<<9 ? FP_NAN : FP_INFINITE;
  8. return FP_NORMAL;
  9. }