Online Java Compiler By
JavaTpoint.com
public class LogExample2 { public static void main(String[] args) { double x = -70.4; // Input negative double, output NaN System.out.println(Math.log(x)); } }
Output