Calculate log in Java
Description
The following code shows how to calculate log.
Example
/*from w w w . j a v a2s . c o m*/
public class Main {
public static void main(String[] args) {
double x = 11.635;
double y = 2.76;
System.out.println("The value of e is " + Math.E);
System.out.println("log(" + x + ") is " + Math.log(x));
}
}
The code above generates the following result.