static class Logarithm extends PostfixMathCommand { public Logarithm() { numberOfParameters = 1; } private static final double LOG_10 = Math.log(10); public final double operation(double[] params) throws ParseException { return Math.log(params[0]) / LOG_10; } }
public final double operation(double[] params) throws ParseException { return Math.log(params[0]); }