Computes a power of e minus 1.
#include <math.h> double expm1(double x); float expm1l(float x); long double expm1l(long double x);
x
A value from which to compute.
This function returns eX - 1. This function may be more accurate than calling exp(x) and subtracting 1.0 from its result.
If x is too large, the function sets errno to ERANGE and fpclassify(exp2(x)) does not return FP_NORMAL.
This facility may not be available on configurations of the EWL that run on platforms that do not have floating-point math capabilities.
#include <math.h> #include <stdio.h> int main(void) { double j = 12; printf("e^%f - 1 = %f\n",j,expm1(j)); return 0; } Output: e^12.000000 - 1 = 162753.791419