1/*
2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Change for long double by Jakub Jelinek <jj@ultra.linux.cz>
4 * Public domain.
5 */
6
7#if defined(LIBM_SCCS) && !defined(lint)
8static char rcsid[] = "$NetBSD: $";
9#endif
10
11/*
12 * isinfl(x) returns 1 if x is inf, -1 if x is -inf, else 0;
13 * no branching!
14 */
15
16#include <math.h>
17#include <math_private.h>
18
19int
20__isinfl (_Float128 x)
21{
22 int64_t hx,lx;
23 GET_LDOUBLE_WORDS64(hx,lx,x);
24 lx |= (hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL;
25 lx |= -lx;
26 return ~(lx >> 63) & (hx >> 62);
27}
28mathx_hidden_def (__isinfl)
29weak_alias (__isinfl, isinfl)
30