fixed more binutils issues (newer gcc/libc)
[zpugcc/jano.git] / toolchain / gcc / newlib / libm / mathfp / s_ispos.c
blob2077999c3ea7791cbe66a589289655c9b46b1289
2 /* @(#)z_ispos.c 1.0 98/08/13 */
3 /******************************************************************
4 * Numtest
6 * Input:
7 * x - pointer to a floating point value
9 * Output:
10 * An integer that indicates if the number is positive.
12 * Description:
13 * This routine returns an integer that indicates if the number
14 * passed in is positive (1) or negative (0).
16 *****************************************************************/
18 #include "fdlibm.h"
19 #include "zmath.h"
21 #ifndef _DOUBLE_IS_32BITS
23 int ispos (double x)
25 __uint32_t hx;
27 GET_HIGH_WORD (hx, x);
29 if (hx & 0x80000000)
30 return (0);
31 else
32 return (1);
35 #endif /* _DOUBLE_IS_32BITS */