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