]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/ieee754/flt-32/s_isinff.c
Remove "Contributed by" lines
[thirdparty/glibc.git] / sysdeps / ieee754 / flt-32 / s_isinff.c
CommitLineData
f7eac6eb 1/*
f7eac6eb
RM
2 * Public domain.
3 */
4
5#if defined(LIBM_SCCS) && !defined(lint)
6static char rcsid[] = "$NetBSD: s_isinff.c,v 1.3 1995/05/11 23:20:21 jtc Exp $";
7#endif
8
9/*
0d8733c4 10 * isinff(x) returns 1 if x is inf, -1 if x is -inf, else 0;
f7eac6eb
RM
11 * no branching!
12 */
13
1ed0291c
RH
14#include <math.h>
15#include <math_private.h>
f7eac6eb 16
0413b54c
UD
17int
18__isinff (float x)
f7eac6eb 19{
0d8733c4 20 int32_t ix,t;
f7eac6eb 21 GET_FLOAT_WORD(ix,x);
0d8733c4
UD
22 t = ix & 0x7fffffff;
23 t ^= 0x7f800000;
24 t |= -t;
60c96635 25 return ~(t >> 31) & (ix >> 30);
f7eac6eb 26}
76f2646f 27hidden_def (__isinff)
f7eac6eb 28weak_alias (__isinff, isinff)