Linux: Assume and consolidate shutdown wire-up syscall
[glibc.git] / sysdeps / ieee754 / ldbl-128 / s_isnanl.c
blob26c70fb09fb6760bee9fa779a937db6dd6859f61
1 /* s_isnanl.c -- long double version of s_isnan.c.
2 */
4 /*
5 * ====================================================
6 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 * Developed at SunPro, a Sun Microsystems, Inc. business.
9 * Permission to use, copy, modify, and distribute this
10 * software is freely granted, provided that this notice
11 * is preserved.
12 * ====================================================
15 #if defined(LIBM_SCCS) && !defined(lint)
16 static char rcsid[] = "$NetBSD: $";
17 #endif
20 * isnanl(x) returns 1 is x is nan, else 0;
21 * no branching!
24 #include <math.h>
25 #include <math_private.h>
27 int __isnanl(_Float128 x)
29 int64_t hx,lx;
30 GET_LDOUBLE_WORDS64(hx,lx,x);
31 hx &= 0x7fffffffffffffffLL;
32 hx |= (uint64_t)(lx|(-lx))>>63;
33 hx = 0x7fff000000000000LL - hx;
34 return (int)((uint64_t)hx>>63);
36 mathx_hidden_def (__isnanl)
37 weak_alias (__isnanl, isnanl)