fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libm / mathfp / sf_ispos.c
blob1b91f399f9efe882552cc19f8501abc61b7889eb
2 /* @(#)z_isposf.c 1.0 98/08/13 */
3 /******************************************************************
4 * Positive value test
6 * Input:
7 * x - 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 int isposf (float x)
23 __int32_t wx;
25 GET_FLOAT_WORD (wx, x);
27 if (wx & 0x80000000)
28 return (0);
29 else
30 return (1);
33 #ifdef _DOUBLE_IS_32BITS
35 int ispos (double x)
37 return isposf ((float) x);
40 #endif /* defined(_DOUBLE_IS_32BITS) */