exp10
Return the value of 10 raised to the power of x.
Interface Definition
C interface:
float exp10f(float x);
double exp10(double x);
long double exp10l(long double x);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
x |
|
Floating-point value of the input data. |
Input |
Return Value
- The result y of 10 raised to the power of x is returned. y ∈ (0, +INF)
- If the input is +0, the return value is +1.
- If the input is -0, the return value is +1.
- If the input of exp10f is greater than 0x1.344135p5 (about 38.53), the return value is +∞. If the input of exp10 is greater than or equal to 0x1p9 (512), the return value is +∞.
- If the input of exp10f is less than -0x1.693c6ap5 (about -45.15), the return value is +0. If the input of exp10 is less than or equal to -0x1p9 (-512), the return value is +0.
- If the input is +∞, the return value is +∞.
- If the input is -∞, the return value is +0.
- If the input is NaN, the return value is NaN.
Dependency
C: "km.h"
Example
C interface:
// typical usage
double x1 = 1.0, x2 = 2.0;
double a = 0.0, b = INFINITY, c = -INFINITY, d = NAN, e = 1024.0;
// print result
printf("exp10(1.0) = %.15f\n", exp10(x1));
printf("exp10(2.0) = %.15f\n", exp10(x2));
printf("exp10(1024.0) = %.15f\n", exp10(e));
printf("exp10(0.0) = %.15f\n", exp10(a));
printf("exp10(INFINITY) = %.15f\n", exp10(b));
printf("exp10(-INFINITY) = %.15f\n", exp10(c));
printf("exp10(NAN) = %.15f\n", exp10(d));
/*
* exp10(1.0) = 10.000000000000000
* exp10(2.0) = 100.000000000000000
* exp10(1024.0) = inf
* exp10(0.0) = 1.000000000000000
* exp10(INFINITY) = inf
* exp10(-INFINITY) = 0.000000000000000
* exp10(NAN) = nan
*
* */
Parent topic: Exponential and Logarithmic Functions