PHP expm1()Functions

PHP Math 参考手册PHP Math Reference Manual

Examples

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 returnsexp(x) - 1。


Syntax

expm1(x);

Parameters Description
x Required. Specifies the exponent.

Technical Details

Return value: 'e' to thexpower minus 1.
Return type: Float
PHP Version: 4.1+
PHP Changelog: PHP 5.3: The expm1() function is available on all platforms.


PHP Math 参考手册PHP Math Reference Manual Other Extensions