Thu May 30 11:24:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc.git] / sysdeps / libm-i387 / s_isinfl.c
blob3ee53d5ecc3c430895256b0b3a89458419d6d3fe
1 /*
2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Change for long double by Ulrich Drepper <drepper@cygnus.com>.
4 * Intel i387 specific version.
5 * Public domain.
6 */
8 #if defined(LIBM_SCCS) && !defined(lint)
9 static char rcsid[] = "$NetBSD: $";
10 #endif
13 * isinfl(x) returns 1 is x is inf, else 0;
14 * no branching!
17 #include "math.h"
18 #include "math_private.h"
20 #ifdef __STDC__
21 int __isinfl(long double x)
22 #else
23 int __isinfl(x)
24 long double x;
25 #endif
27 int32_t se,hx,lx;
28 GET_LDOUBLE_WORDS(se,hx,lx,x);
29 se &= 0x7fff;
30 se ^= 0x7fff;
31 /* This additional ^ 0x80000000 is necessary because in Intel's
32 internal representation the implicit one is explicit. */
33 se |= (hx ^ 0x80000000) | lx;
34 return (se == 0);
36 weak_alias (__isinfl, isinfl)