Get the base 10 logarithm of a double value in Java

Description

The following code shows how to get the base 10 logarithm of a double value.

Example


// w w w .jav  a2s .c  o  m
public class Main {
  public static void main(String[] args) {

    System.out.println("log10(y)  = " + Math.log10(0.5));
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    Development »




Java Algorithms
Java Clipboard
Java Compiler
Java Desktop
Java Virtual Machine
Java Math
OS
Random
Java Robot
Java RuntimeMXBean
Java Timer
Java UUID
Java Internationalization