PHP: log10() function
Description
The log10() function returns the base-10 logarithm of a number.
Version:
(PHP 4 and above)
Syntax:
log10(num)
Parameter:
Name | Description | Required / Optional |
Type |
---|---|---|---|
num | The argument to process. | Required | Float |
Return value
The base-10 logarithm of num.
Value Type: Float.
Example:
<?php
echo(log10(2) . "<br />");
echo(log10(1.234) . "<br />");
echo(log10(0) . "<br />");
echo(log10(1) . "<br />");
?>
Output:
0.301029995664 0.0913151596972 -INF 0
View the example in the browser
See also
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics