PHP Tutorial - PHP expm1() Function






Definition

The expm1() function returns exp(x) - 1.

Syntax

PHP expm1() Function has the following syntax.

expm1(number);

Parameter

ParameterIs Required Description
numberRequired. 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
echo(expm1(0) . "\n");
echo(expm1(1) . "\n");
echo(expm1(10) . "\n");
echo(expm1(4.8). "\n");
?>

The code above generates the following result.