logarithm

ReturnMethodSummary
static doublelog(double a)Returns the natural logarithm (base e) of a double value.
static doublelog10(double a)Returns the base 10 logarithm of a double value.
static doublelog1p(double x)Returns the natural logarithm of the sum of the argument and 1.

public class Main {
  public static void main(String[] args) throws Exception {
    System.out.println(Math.log(2));
  }

}

The output:


0.6931471805599453
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.