expm1 - C math.h

C examples for math.h:expm1

Type

function

From

<cmath>
<ctgmath>
<math.h>

Description

Returns e raised to the power x minus one: e^x-1.

Prototype

long double expm1l (long double x);
long double expm1 (long double x);
     double expm1  (double x);
      float expm1f (float x);
      float expm1 (float x);
     double expm1 (T x);           

Parameters

Parameter Description
x Value of the exponent.

Return Value

e raised to the power of x, minus one.

Example

Demo Code

#include <stdio.h>
#include <math.h> /* expm1 */

int main ()// w w w.jav  a 2  s.  c  o m
{
  double param = 1.0;
  
  double result = expm1 (param);
  
  printf ("expm1 (%f) = %f.\n", param, result );
  
  return 0;
}

Related Tutorials