The java.lang.Math.log10() is one of the Java Math Library method which is used to return the base 10
logarithmic value of given double value as a parameter. There are various cases :
- If the argument is positive double value, Math.log10() method will return the logarithm of a given
- If the argument is NaN or less than zero, Math.log10() method will return NaN.
- If the argument is positive infinity, Math.log10() method will return the result as Positive Infinity.
- If the argument is positive or negative zero, Math.log10() method will return the result as Negative
public static double log10(double a)
a : User input
This method returns the base 10 logarithm of a.
Example :To show working of java.lang.Math.log10() method.
3.0 2.1621340805671756 NaN Infinity -Infinity
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- StrictMath log10() Method in Java
- BigIntegerMath log10() function | Guava | Java
- Java Guava | IntMath log10(int x, RoundingMode mode) method with Examples
- Java Guava | LongMath log10(long x, RoundingMode mode) method with Examples
- Java.util.LinkedList.poll(), pollFirst(), pollLast() with examples in Java
- Java Deprecated API Scanner tool (jdepscan) in Java 9 with Examples
- Java.util.Collections.rotate() Method in Java with Examples
- Java lang.Long.reverse() method in Java with Examples
- Java.util.Collections.disjoint() Method in java with Examples
- Java.util.LinkedList.offer(), offerFirst(), offerLast() in Java
- Java lang.Long.byteValue() method in Java with Examples
- Java.util.concurrent.Phaser class in Java with Examples
- Java lang.Long.lowestOneBit() method in Java with Examples
- Java lang.Long.numberOfTrailingZeros() method in Java with Examples
- Java lang.Long.numberOfLeadingZeros() method in Java with Examples
- Java lang.Long.highestOneBit() method in Java with Examples
- Java.util.LinkedList.peek() , peekfirst(), peeklast() in Java
- Java.lang.Short toString() method in Java with Examples
- Java.util.BitSet class methods in Java with Examples | Set 2
- Java.util.concurrent.RecursiveTask class in Java with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.