Update.
[glibc.git] / sysdeps / libm-ieee754 / w_exp10f.c
blobf78be7973ba112e164d3942d46f9adf8afa2b942
1 /* w_exp10f.c -- float version of w_exp10.c.
2 * Conversion to exp10 by Ulrich Drepper <drepper@cygnus.com>.
3 */
5 /*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
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 * ====================================================
17 * wrapper expf10(x)
20 #include "math.h"
21 #include "math_private.h"
23 #ifdef __STDC__
24 static const float
25 #else
26 static float
27 #endif
28 o_threshold= 3.853183944498959298709e+01,
29 u_threshold= -4.515449934959717928174e+01;
31 #ifdef __STDC__
32 float __exp10f(float x) /* wrapper exp10f */
33 #else
34 float __exp10f(x) /* wrapper exp10f */
35 float x;
36 #endif
38 #ifdef _IEEE_LIBM
39 return __ieee754_exp10f(x);
40 #else
41 float z;
42 z = __ieee754_exp10f(x);
43 if(_LIB_VERSION == _IEEE_) return z;
44 if(__finitef(x)) {
45 if(x>o_threshold)
46 /* exp overflow */
47 return (float)__kernel_standard((double)x,(double)x,146);
48 else if(x<u_threshold)
49 /* exp underflow */
50 return (float)__kernel_standard((double)x,(double)x,147);
52 return z;
53 #endif
55 weak_alias (__exp10f, exp10f)
56 strong_alias (__exp10f, __pow10f)
57 weak_alias (__pow10f, pow10f)