How to use log10 in PHP

This article describe about log10() Function in PHP.
  • 1253

log10() Function

This function returns the base-10 logarithm of a number.

Syntax

log10(x)

 

Parameter Description
x Specified value for check.

Example

<html>
<?php
echo(log10(3.718) . "<br />");
echo(log10(2) . "<br />");
echo(log10(1) . "<br />");
echo(log10(0) . "<br />");
echo(log10(-1))
?>
</html>

 

Output


log10php.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.