PHP log1p () function
Examples
Return a different number of log (1 + number):
<?php
echo(log1p(2.7183) . "<br>");
echo(log1p(2) . "<br>");
echo(log1p(1) . "<br>");
echo(log1p(0));
?>
echo(log1p(2.7183) . "<br>");
echo(log1p(2) . "<br>");
echo(log1p(1) . "<br>");
echo(log1p(0));
?>
Running instance »
Definition and Usage
log1p () function returns log (1 + number), even when the value of number is close to zero can also calculate the exact results.
grammar
log1p( number );
参数 | 描述 |
---|---|
number | 必需。规定要处理的数。 |
technical details
return value: | log (1 + number) |
---|---|
Return type: | Float |
PHP version: | 4.1+ |
PHP Update Log: | PHP 5.3: log1p () function is available on all platforms. |
PHP Math Reference