]>
Commit | Line | Data |
---|---|---|
bcea7ad6 | 1 | /* w_expl.c -- long double version of w_exp.c. |
bcea7ad6 SN |
2 | */ |
3 | ||
4 | /* | |
5 | * ==================================================== | |
6 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | |
7 | * | |
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 | * ==================================================== | |
13 | */ | |
14 | ||
15 | #if defined(LIBM_SCCS) && !defined(lint) | |
16 | static char rcsid[] = "$NetBSD: $"; | |
17 | #endif | |
18 | ||
19 | /* | |
20 | * wrapper expl(x) | |
21 | */ | |
22 | ||
abfbdde1 | 23 | #include <math.h> |
bcea7ad6 SN |
24 | #include <math_private.h> |
25 | #include <math-svid-compat.h> | |
92892fdb | 26 | #include <libm-alias-ldouble.h> |
abfbdde1 | 27 | |
bcea7ad6 SN |
28 | #if LIBM_SVID_COMPAT |
29 | long double __expl(long double x) /* wrapper exp */ | |
abfbdde1 | 30 | { |
bcea7ad6 SN |
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)); | |
abfbdde1 | 38 | |
bcea7ad6 SN |
39 | return z; |
40 | # endif | |
41 | } | |
dc115e1c | 42 | libm_hidden_def (__expl) |
92892fdb | 43 | libm_alias_ldouble (__exp, exp) |
bcea7ad6 | 44 | #endif |