Java Как использовать журнал
// Java program to demonstrate working
// of java.lang.Math.log() method
import java.lang.Math;
class Gfg {
// driver code
public static void main(String args[])
{
double a = -2.55;
double b = 1.0 / 0;
double c = 0, d = 145.256;
// negative integer as argument, output NAN
System.out.println(Math.log(a));
// positive infinity as argument, output Infinity
System.out.println(Math.log(b));
// positive zero as argument, output -Infinity
System.out.println(Math.log(c));
// positive double as argument
System.out.println(Math.log(d));
}
}
GJizss