Rev 4872 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4349 | Serge | 1 | /* |
2 | * isinff(x) returns 1 if x is +-infinity, else 0; |
||
3 | * |
||
4 | * isinf is a |
||
5 | * implemented as isinf and isinff functions by newlib and are still declared |
||
6 | * as such in |
||
7 | * chooses to use |
||
8 | * previous |
||
9 | */ |
||
10 | |||
11 | #include "fdlibm.h" |
||
12 | #include |
||
13 | |||
14 | #undef isinff |
||
15 | |||
16 | int |
||
17 | _DEFUN (isinff, (x), |
||
18 | float x) |
||
19 | { |
||
20 | __int32_t ix; |
||
21 | GET_FLOAT_WORD(ix,x); |
||
22 | ix &= 0x7fffffff; |
||
23 | return FLT_UWORD_IS_INFINITE(ix); |
||
24 | } |
||
25 | |||
26 | #ifdef _DOUBLE_IS_32BITS |
||
27 | |||
28 | #undef isinf |
||
29 | |||
30 | int |
||
31 | _DEFUN (isinf, (x), |
||
32 | double x) |
||
33 | { |
||
34 | return isinff((float) x); |
||
35 | } |
||
36 | |||
37 | #endif /* defined(_DOUBLE_IS_32BITS) */ |