elf: Refactor process_envvars
[glibc.git] / math / w_expl_compat.c
blobb37b9cab437a5a0139c43bc8f3b9752c2aa27165
1 /* w_expl.c -- long double version of w_exp.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 * wrapper expl(x)
23 #include <math.h>
24 #include <math_private.h>
25 #include <math-svid-compat.h>
26 #include <libm-alias-ldouble.h>
28 #if LIBM_SVID_COMPAT
29 long double __expl(long double x) /* wrapper exp */
31 # ifdef _IEEE_LIBM
32 return __ieee754_expl(x);
33 # else
34 long double z = __ieee754_expl (x);
35 if (__glibc_unlikely (!isfinite (z) || z == 0)
36 && isfinite (x) && _LIB_VERSION != _IEEE_)
37 return __kernel_standard_l (x, x, 206 + !!signbit (x));
39 return z;
40 # endif
42 libm_hidden_def (__expl)
43 libm_alias_ldouble (__exp, exp)
44 #endif