1c510a3bfaf51f8d94824291855ded5957997033
[platform/upstream/linaro-glibc.git] / sysdeps / generic / w_exp10f.c
1 /* w_exp10f.c -- float version of w_exp10.c.
2  * Conversion to exp10 by Ulrich Drepper <drepper@cygnus.com>.
3  */
4
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 expf10(x)
18  */
19
20 #include "math.h"
21 #include "math_private.h"
22
23 #ifdef __STDC__
24         float __exp10f(float x)         /* wrapper exp10f */
25 #else
26         float __exp10f(x)                       /* wrapper exp10f */
27         float x;
28 #endif
29 {
30 #ifdef _IEEE_LIBM
31         return __ieee754_exp10f(x);
32 #else
33         float z;
34         z = __ieee754_exp10f(x);
35         if(_LIB_VERSION == _IEEE_) return z;
36         if(!__finitef(z) && __finitef(x)) {
37             /* exp10f overflow (146) if x > 0, underflow (147) if x < 0.  */
38             return (float)__kernel_standard((double) x, (double) x,
39                                             146+!!__signbitf(x));
40         }
41         return z;
42 #endif
43 }
44 weak_alias (__exp10f, exp10f)
45 strong_alias (__exp10f, __pow10f)
46 weak_alias (__pow10f, pow10f)