1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include <math.h>
- #include "math_private.h"
- int __fpclassify(double x)
- {
- u_int32_t hx, lx;
- int retval = FP_NORMAL;
- EXTRACT_WORDS (hx, lx, x);
- lx |= hx & 0xfffff;
- hx &= 0x7ff00000;
- if ((hx | lx) == 0)
- retval = FP_ZERO;
- else if (hx == 0)
- retval = FP_SUBNORMAL;
- else if (hx == 0x7ff00000)
- retval = lx != 0 ? FP_NAN : FP_INFINITE;
- return retval;
- }
- libm_hidden_def(__fpclassify)
|