2005-12-13 Ulrich Drepper <drepper@redhat.com>
[platform/upstream/linaro-glibc.git] / math / w_exp10l.c
1 /* w_exp10l.c -- long double version of w_exp10.c.
2  * Conversion to long double by Ulrich Drepper,
3  * Cygnus Support, drepper@cygnus.com.
4  */
5
6 /*
7  * ====================================================
8  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
9  *
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  * ====================================================
15  */
16
17 /*
18  * wrapper exp10l(x)
19  */
20
21 #include <math.h>
22 #include "math_private.h"
23
24 #ifdef __STDC__
25         long double __exp10l(long double x)     /* wrapper exp10 */
26 #else
27         long double __exp10l(x)                 /* wrapper exp10 */
28         long double x;
29 #endif
30 {
31 #ifdef _IEEE_LIBM
32         return __ieee754_exp10l(x);
33 #else
34         long double z;
35         z = __ieee754_exp10l(x);
36         if(_LIB_VERSION == _IEEE_) return z;
37         if(!__finitel(z) && __finitel(x)) {
38             /* exp10 overflow (246) if x > 0, underflow (247) if x < 0.  */
39             return __kernel_standard(x,x,246+__signbitl(x));
40         }
41         return z;
42 #endif
43 }
44 weak_alias (__exp10l, exp10l)
45 strong_alias (__exp10l, __pow10l)
46 weak_alias (__pow10l, pow10l)