1 /* s_isnanl.c -- long double version of s_isnan.c.
2 * Conversion to long double by Ulrich Drepper,
3 * Cygnus Support, drepper@cygnus.com.
7 * ====================================================
8 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
10 * Developed at SunPro, a Sun Microsystems, Inc. business.
11 * Permission to use, copy, modify, and distribute this
12 * software is freely granted, provided that this notice
14 * ====================================================
17 #if defined(LIBM_SCCS) && !defined(lint)
18 static char rcsid
[] = "$NetBSD: $";
22 * isnanl(x) returns 1 is x is nan, else 0;
27 #include "math_private.h"
30 int __isnanl(long double x
)
37 GET_LDOUBLE_WORDS(se
,hx
,lx
,x
);
38 se
= (se
& 0x7fff) << 1;
39 lx
|= hx
& 0x7fffffff;
40 se
|= (u_int32_t
)(lx
|(-lx
))>>31;
42 return (int)(((u_int32_t
)(se
))>>31);
45 weak_alias (__isnanl
, isnanl
)