THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

PHP expm1() Function

PHP Math Reference PHP Math Reference

Example

Return exp() - 1:

<?php
echo(expm1(0) . "<br>");
echo(expm1(1) . "<br>");
echo(expm1(10) . "<br>");
echo(expm1(4.8));
?>
Run example »

Definition and Usage

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


Syntax

expm1(x);

Parameter Description
x Required. Specifies the exponent

Technical Details

Return Value: 'e' raised to the power of x minus 1
Return Type: Float
PHP Version: 4.1+
PHP Changelog: PHP 5.3: expm1() now available on all platforms

PHP Math Reference PHP Math Reference