PHP expm1() - Math Functions

What is expm1 Function?

Explanation

The "expm1()" function returns the value of Ex-1, its equivalent to exp(number)-1, where "E" is the Euler's constant.

Syntax:


expm1(x)

In the above syntax "x" is the number passed to the function.

Example :


<?php
echo(expm1(1). "<br/>");
?>
Result :

1.718281828459045

In the above example the number "1", is passed to the function to calculate the exponent and negate "1" from it.

PHP Topics


Ask Questions

Ask Question