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
Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.
- Java Guava | LongMath log10(long x, RoundingMode mode) method with Examples
- Java Guava | IntMath log10(int x, RoundingMode mode) method with Examples
- StrictMath log10() Method in Java
- BigIntegerMath log10() function | Guava | Java
- Java 8 | DoubleToIntFunction Interface in Java with Example
- Arrays.deepToString() in Java with Example
- NavigableMap Interface in Java with Example
- Deque interface in Java with Example
- Swapping items of a list in Java : Collections.swap() with Example
- StringTokenizer class in Java with example | Set 1 ( Constructors)
- Collections.singleton() method in Java with example
- java.util.Currency methods with example
- Beginning Java programming with Hello World Example
- Serialization and Deserialization in Java with Example
- Java Math asin() method with Example
- Map.Entry interface in Java with example
- Arraylist lastIndexOf() in Java with example
- ArrayList trimToSize() in Java with example
- ArrayList isEmpty() in Java with example
- Java String isEmpty() method with example
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.