The static method log()
in java.lang.Math class is used to calculate the x
and computes .
static double log(double x)
x
: It takes a number of type double.
log()
will return a natural logarithm of double type.
NaN
if the argument value is less than zero or NaN.log()
will return the natural log.log()
will return NaN.log()
will return infinity.log()
will return NAN.// Load math libraryimport java.lang.Math;// Main classclass EdPresso{public static void main( String args[] ) {System.out.println(Math.log(89.3));}}