Rev 4872 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4349 | Serge | 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 | < |
||
18 | INDEX |
||
19 | pow10 |
||
20 | INDEX |
||
21 | pow10f |
||
22 | |||
23 | ANSI_SYNOPSIS |
||
24 | #include |
||
25 | double pow10(double <[x]>); |
||
26 | float pow10f(float <[x]>); |
||
27 | |||
28 | TRAD_SYNOPSIS |
||
29 | #include |
||
30 | double pow10(<[x]>); |
||
31 | double <[x]>; |
||
32 | |||
33 | float pow10f(<[x]>); |
||
34 | float <[x]>; |
||
35 | |||
36 | DESCRIPTION |
||
37 | < |
||
38 | @ifnottex |
||
39 | 10 raised to the power <[x]>. |
||
40 | @end ifnottex |
||
41 | @tex |
||
42 | $10^x$ |
||
43 | @end tex |
||
44 | |||
45 | You can use the (non-ANSI) function < |
||
46 | error handling for these functions. |
||
47 | |||
48 | RETURNS |
||
49 | On success, < |
||
50 | If the result underflows, the returned value is <<0>>. If the |
||
51 | result overflows, the returned value is < |
||
52 | either case, < |
||
53 | |||
54 | PORTABILITY |
||
55 | < |
||
56 | */ |
||
57 | |||
58 | /* |
||
59 | * wrapper pow10(x) |
||
60 | */ |
||
61 | |||
62 | #undef pow10 |
||
63 | #include "fdlibm.h" |
||
64 | #include |
||
65 | #include |
||
66 | |||
67 | #ifndef _DOUBLE_IS_32BITS |
||
68 | |||
69 | #ifdef __STDC__ |
||
70 | double pow10(double x) /* wrapper pow10 */ |
||
71 | #else |
||
72 | double pow10(x) /* wrapper pow10 */ |
||
73 | double x; |
||
74 | #endif |
||
75 | { |
||
76 | return pow(10.0, x); |
||
77 | } |
||
78 | |||
79 | #endif /* defined(_DOUBLE_IS_32BITS) */ |