sparc: Remove _dl_skip_args usage
[glibc.git] / sysdeps / x86 / fpu / s_isnanl.c
blob41484bf6544e2c9293b530eae0a98b74aa030266
1 /* s_isnanl.c -- long double version for i387 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(long double x)
29 int32_t se,hx,lx,pn;
30 GET_LDOUBLE_WORDS(se,hx,lx,x);
31 se = (se & 0x7fff) << 1;
32 /* Detect pseudo-normal numbers, i.e. exponent is non-zero and the top
33 bit of the significand is not set. */
34 pn = (uint32_t)((~hx & 0x80000000) & (se|(-se)))>>31;
35 /* Clear the significand bit when computing mantissa. */
36 lx |= hx & 0x7fffffff;
37 se |= (uint32_t)(lx|(-lx))>>31;
38 se = 0xfffe - se;
40 return (int)(((uint32_t)(se)) >> 16) | pn;
42 hidden_def (__isnanl)
43 weak_alias (__isnanl, isnanl)