1 /* @(#)s_pow10.c 5.1 93/09/24 */
2 /* Modification from s_exp10.c Yaakov Selkowitz 2007.  */
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 /*
16 FUNCTION
17 	<<pow10>>, <<pow10f>>---base 10 power functions
18 INDEX
19 	pow10
20 INDEX
21 	pow10f
22 
23 SYNOPSIS
24 	#include <math.h>
25 	double pow10(double <[x]>);
26 	float pow10f(float <[x]>);
27 
28 DESCRIPTION
29 	<<pow10>> and <<pow10f>> calculate 10 ^ <[x]>, that is,
30 	@ifnottex
31 	10 raised to the power <[x]>.
32 	@end ifnottex
33 	@tex
34 	$10^x$
35 	@end tex
36 
37 RETURNS
38 	On success, <<pow10>> and <<pow10f>> return the calculated value.
39 	If the result underflows, the returned value is <<0>>.  If the
40 	result overflows, the returned value is <<HUGE_VAL>>.  In
41 	either case, <<errno>> is set to <<ERANGE>>.
42 
43 PORTABILITY
44 	<<pow10>> and <<pow10f>> are GNU extensions.
45 */
46 
47 /*
48  * wrapper pow10(x)
49  */
50 
51 #undef pow10
52 #include "fdlibm.h"
53 #include <errno.h>
54 #include <math.h>
55 
56 #ifdef _NEED_FLOAT64
57 
pow1064(__float64 x)58 __float64 pow1064(__float64 x)		/* wrapper pow10 */
59 {
60   return _pow64(_F_64(10.0), x);
61 }
62 
63 _MATH_ALIAS_d_d(pow10)
64 
65 #endif /* _NEED_FLOAT64 */
66