Math.log10()
Math.log10() returns natural log value of input number with base 10.
Syntax
Math.log10(input_number)
Here are some examples with different type of numbers.
System.out.println(Math.log10(4)); //0.6020599913279624
System.out.println(Math.log10(1)); //0.0
System.out.println(Math.log10(0)); //-Infinity
System.out.println(Math.log10(4.12));//0.6148972160331346
Using negative input numbers
System.out.println(Math.log10(-4.12)); //NaN
System.out.println(Math.log10(-1)); //NaN
« All Math functions
This article is written by plus2net.com team.
plus2net.com