|
|
PHP log() - Math Functions
|
Tutorials » Php »
|
Topic |
What is log Function?
|
|
Explanation |
|
The "log()" function returns the natural logarithm of a number.
Syntax:
log(x,base)
In the above syntax "x" is the number for which to find the natural logarithm, "base" is an optional value.
Example:>
<?php
echo(log(2.7183)."<br />");
echo(log(-1));
?>
Result:
1.00000668491
NAN
In the above example the negative value returns NAN value.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|