English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
log1The p() function returns log(1 + number), even if the value of the number is close to zero, it is calculated accurately.
log1p(val)
val-the specified number
log1The p() function returns log(1 + number), even if the value of the number is close to zero, it is calculated accurately.
<?php echo(log1p(1)); ?>
Output Result
0.69314718055995
Let's look at another example-
<?php echo(log1p(0)); ?>
Output Result
0
Let's look at another example-
<?php echo(log1p(10)); echo(log1p(2.7)); ?>
Output Result
2.39789527279841.3083328196502