Java StrictMath.log10(double a)

Syntax

StrictMath.log10(double a) has the following syntax.

public static double log10(double a)

Example

In the following code shows how to use StrictMath.log10(double a) method.


/*www .j a va 2 s .  c o  m*/
public class Main {

  public static void main(String[] args) {
  
    double d1 = 0.0 , d2 = 1234.5, d3 = (1.0/0.0), d4 = 1;

    System.out.println("Log " + d1 + " with base 10 = " + StrictMath.log10(d1));
     
    System.out.println("Log " + d2 + " with base 10 = " + StrictMath.log10(d2));
     
    System.out.println("Log " + d3 + " with base 10 = " + StrictMath.log10(d3));
     
    System.out.println("Log " + d4 + " with base 10 = " + StrictMath.log10(d4));
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable