Wed Jul 17 21:53:45 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc.git] / sysdeps / libm-ieee754 / s_finitel.c
blob02487c610d33a451b61d9d18e99cd53df5ea37c1
1 /* s_finitel.c -- long double version of s_finite.c.
2 * Conversion to long double by Ulrich Drepper,
3 * Cygnus Support, drepper@cygnus.com.
4 */
6 /*
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
13 * is preserved.
14 * ====================================================
17 #if defined(LIBM_SCCS) && !defined(lint)
18 static char rcsid[] = "$NetBSD: $";
19 #endif
22 * finitel(x) returns 1 is x is finite, else 0;
23 * no branching!
26 #include "math.h"
27 #include "math_private.h"
29 #ifdef __STDC__
30 int __finite(long double x)
31 #else
32 int __finite(x)
33 long double x;
34 #endif
36 int32_t exp;
37 GET_LDOUBLE_EXP(exp,x);
38 return (int)((u_int32_t)((exp&0x7fff)-0x7fff)>>15);
40 weak_alias (__finitel, finitel)