![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
log1p() function in PHP
The log1p() function Returns log(1+number), computed in a way that is accurate even when the value of number is close to zero.
Syntax
log1p(val)
Parameters
val − The specified number
Return
The log1p() function Returns log(1+number), computed in a way that is accurate even when the value of number is close to zero.
Example
<?php echo(log1p(1)); ?>
Output
0.69314718055995
Example
Let us see another example −
<?php echo(log1p(0)); ?>
Output
0
Example
Let us see another example −
<?php echo(log1p(10)); echo(log1p(2.7)); ?>
Output
2.39789527279841.3083328196502
Advertisements