PHP expm1() Function

In this chapter you will learn:

  1. Definition for PHP expm1() Function
  2. Syntax for PHP expm1() Function
  3. Parameter for PHP expm1() Function
  4. Return for PHP expm1() Function
  5. Example - 'e' raised to the power of x minus 1

Definition

The expm1() function returns exp(x) - 1.

Syntax

PHP expm1() Function has the following syntax.

expm1(number);

Parameter

ParameterIs Required Description
numberRequired. Set the exponent

Return

Item Description
Return Value 'e' raised to the power of x minus 1
Return Type Float

Example

Return 'e' raised to the power of x minus 1


<?php/*from j a  va 2  s.  c  o m*/
echo(expm1(0) . "\n");
echo(expm1(1) . "\n");
echo(expm1(10) . "\n");
echo(expm1(4.8). "\n");
?>

The code above generates the following result.

Next chapter...

What you will learn in the next chapter:

  1. Definition for PHP floor() Function
  2. Syntax for PHP floor() Function
  3. Parameter for PHP floor() Function
  4. Return for PHP floor() Function
  5. Note for PHP floor() Function
  6. Example - flooring a value