1570af302Sopenharmony_ci#include <math.h> 2570af302Sopenharmony_ci#include <stdint.h> 3570af302Sopenharmony_ci 4570af302Sopenharmony_ciint __fpclassifyf(float x) 5570af302Sopenharmony_ci{ 6570af302Sopenharmony_ci union {float f; uint32_t i;} u = {x}; 7570af302Sopenharmony_ci int e = u.i>>23 & 0xff; 8570af302Sopenharmony_ci if (!e) return u.i<<1 ? FP_SUBNORMAL : FP_ZERO; 9570af302Sopenharmony_ci if (e==0xff) return u.i<<9 ? FP_NAN : FP_INFINITE; 10570af302Sopenharmony_ci return FP_NORMAL; 11570af302Sopenharmony_ci} 12