PHP expm1() Function
In this chapter you will learn:
- Definition for PHP expm1() Function
- Syntax for PHP expm1() Function
- Parameter for PHP expm1() Function
- Return for PHP expm1() Function
- 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
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/*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:
- Definition for PHP floor() Function
- Syntax for PHP floor() Function
- Parameter for PHP floor() Function
- Return for PHP floor() Function
- Note for PHP floor() Function
- Example - flooring a value
Home » PHP Tutorial » PHP Math Functions