The expm1() function Returns e raised to the power x - 1 i.e
ex -1
Syntax
expm1(val)
Parameters
val − This is the power
Return
The expm1() function Returns e raised to the power x - 1
Example
<?php echo(expm1(0) . "<br>"); echo(expm1(1)); ?>
Output
0<br>1.718281828459
Let us see another example −
Example
<?php $val = 1; echo "e^", $val, "-1 = ", expm1($val); ?>
Output
e^1-1 = 1.718281828459