PHP expm1() Function
Definition
The expm1() function returns exp(x) - 1.
Syntax
PHP expm1() Function has the following syntax.
expm1(number);
Parameter
Parameter | Is Required | Description |
---|---|---|
number | Required. | 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//w w w . j a v a 2 s.co 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.