expm1d32(), expm1d64(), expm1d128() — Exponential minus one

Standards

Standards / Extensions C or C++ Dependencies
C/C++ DFP both z/OS® V1.11

Format

#define __STDC_WANT_DEC_FP__
#include <math.h>

_Decimal32  expm1d32(_Decimal32 x); 
_Decimal64  expm1d64(_Decimal64 x); 
_Decimal128 expm1d128(_Decimal128 x); 

_Decimal32  expm1(_Decimal32 x);      /* C++ only */
_Decimal64  expm1(_Decimal64 x);      /* C++ only */
_Decimal128 expm1(_Decimal128 x);     /* C++ only */

General description

The expm1() functions calculate the function:
Formula of the functions
Notes:
  1. These functions work in IEEE decimal floating-point format. See IEEE decimal floating-pointIEEE Decimal Floating-Point for more information.
  2. To use IEEE decimal floating-point, the hardware must have the Decimal Floating-Point Facility installed.

Returned value

If successful, expm1() returns the above function calculated on x.

If unsuccessful, expm1() may fail as follows:

Example

⁄* CELEBE13

   This example illustrates the expm1d32() function.

*⁄

#define  __STDC_WANT_DEC_FP__
#include <math.h>
#include <stdio.h>

void main(void)
{
   _Decimal32 x, y;

   x = 2.5DF;
   y = expm1d32(x);

   printf("expm1d32(%Hf) = %Hf\n", x, y);
}

Related information