repo.or.cz
/
uclibc-ng.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
revert 9b1077dc70e52ee85a718bce3fcfec7ae9af2967 partially
[uclibc-ng.git]
/
libm
/
s_isinff.c
blob
6727f0464c5fbaf9cb446589d49c247403109527
1
/*
2
* Written by J.T. Conklin <jtc@netbsd.org>.
3
* Public domain.
4
*/
5
6
/*
7
* isinff(x) returns 1 if x is inf, -1 if x is -inf, else 0;
8
* no branching!
9
*/
10
11
#include
"math.h"
12
#include
"math_private.h"
13
14
int
__isinff
(
float
x
)
15
{
16
int32_t
ix
,
t
;
17
GET_FLOAT_WORD
(
ix
,
x
);
18
t
=
ix
&
0x7fffffff
;
19
t
^=
0x7f800000
;
20
t
|= -
t
;
21
return
~(
t
>>
31
) & (
ix
>>
30
);
22
}
23
libm_hidden_def
(
__isinff
)