Update.
[glibc.git] / sysdeps / libm-ieee754 / s_isinff.c
blobefc09352519205a5c7578b034f232f3647c539d0
1 /*
2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Public domain.
4 */
6 #if defined(LIBM_SCCS) && !defined(lint)
7 static char rcsid[] = "$NetBSD: s_isinff.c,v 1.3 1995/05/11 23:20:21 jtc Exp $";
8 #endif
11 * isinff(x) returns 1 if x is inf, -1 if x is -inf, else 0;
12 * no branching!
15 #include "math.h"
16 #include "math_private.h"
18 int
19 __isinff (float x)
21 int32_t ix,t;
22 GET_FLOAT_WORD(ix,x);
23 t = ix & 0x7fffffff;
24 t ^= 0x7f800000;
25 t |= -t;
26 return ~(t >> 31) & (ix >> 30);
28 weak_alias (__isinff, isinff)