Everything

expm1 / expm1f / expm1l


Calculates the value of natural logarithm base e raised to the power d and subtracts 1 from the result.

[Format]

#include <math.h>

double expm1(double d);

float expm1f(float d);

long double expm1l(long double d);

[Parameters]

d Power value to which natural logarithm base e is to be raised

[Return values]

Normal: Value obtained by subtracting 1 from natural logarithm base e raised to the power d

Abnormal: Range error: Returns -HUGE_VAL, –HUGE_VALF, or –HUGE_VALL depending on the function.

[Remarks]

expm1(d) provides more accurate calculation than exp(x) – 1 even when d is near to 0.