]>
Commit | Line | Data |
---|---|---|
4bbac92a UD |
1 | /* @(#)w_exp10.c |
2 | * Conversion to exp10 by Ulrich Drepper <drepper@cygnus.com>. | |
ecdc196c UD |
3 | */ |
4 | ||
4bbac92a UD |
5 | /* |
6 | * ==================================================== | |
7 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | |
8 | * | |
9 | * Developed at SunPro, a Sun Microsystems, Inc. business. | |
10 | * Permission to use, copy, modify, and distribute this | |
11 | * software is freely granted, provided that this notice | |
12 | * is preserved. | |
13 | * ==================================================== | |
14 | */ | |
15 | ||
16 | /* | |
17 | * wrapper exp10(x) | |
18 | */ | |
19 | ||
0ecb606c | 20 | #include <math.h> |
4bbac92a UD |
21 | #include "math_private.h" |
22 | ||
4bbac92a UD |
23 | #ifdef __STDC__ |
24 | double __exp10(double x) /* wrapper exp10 */ | |
25 | #else | |
26 | double __exp10(x) /* wrapper exp10 */ | |
27 | double x; | |
28 | #endif | |
29 | { | |
30 | #ifdef _IEEE_LIBM | |
31 | return __ieee754_exp10(x); | |
32 | #else | |
33 | double z; | |
34 | z = __ieee754_exp10(x); | |
35 | if(_LIB_VERSION == _IEEE_) return z; | |
601d2942 UD |
36 | if(!__finite(z) && __finite(x)) { |
37 | /* exp10 overflow (46) if x > 0, underflow (47) if x < 0. */ | |
38 | return __kernel_standard(x,x,46+!!__signbit(x)); | |
4bbac92a UD |
39 | } |
40 | return z; | |
41 | #endif | |
42 | } | |
43 | weak_alias (__exp10, exp10) | |
44 | strong_alias (__exp10, __pow10) | |
45 | weak_alias (__pow10, pow10) | |
46 | #ifdef NO_LONG_DOUBLE | |
47 | strong_alias (__exp10, __exp10l) | |
48 | weak_alias (__exp10, exp10l) | |
49 | strong_alias (__exp10l, __pow10l) | |
50 | weak_alias (__pow10l, pow10l) | |
51 | #endif |