The expm1() function returns exp(x) - 1.
PHP expm1() Function has the following syntax.
expm1(number);
Parameter | Is Required | Description |
---|---|---|
number | Required. | Set the exponent |
Item | Description |
---|---|
Return Value | 'e' raised to the power of x minus 1 |
Return Type | Float |
Return 'e' raised to the power of x minus 1
<?php
echo(expm1(0) . "\n");
echo(expm1(1) . "\n");
echo(expm1(10) . "\n");
echo(expm1(4.8). "\n");
?>
The code above generates the following result.