expm1(), expm1f(), expm1l() — Exponential minus one
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 |
both | z/OS V1R7 |
Format
#define _XOPEN_SOURCE_EXTENDED 1
#include <math.h>
double expm1(double x);
C99:
#define _ISOC99_SOURCE
#include <math.h>
float expm1f(float x);
long double expm1l(long double x);
C++ TR1 C99:
#define _TR1_C99
#include <math.h>
float expm1(float x);
long double expm1(long double x);
General description
The expm1()
functions calculate the function:
Note: The
following table shows the viable formats for these functions. See IEEE binary floating-point for more information about IEEE
Binary Floating-Point.
Function | Hex | IEEE |
---|---|---|
expm1 | X | X |
expm1f | X | X |
expm1l | X | X |
Returned value
If successful, expm1() returns the above function calculated on x.
If
unsuccessful, expm1() may fail as follows:
- If x is negative and exceeds an internally defined large value, expm1() functions will return -1.0.
- If the value of the function overflows, expm1() functions will return HUGE_VAL or HUGE_VALF or HUGE_VALL as appropriate, and set errno to ERANGE.