Exemplo n.º 1
0
  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;
    }
  }
Exemplo n.º 2
0
 public final double operation(double[] params) throws ParseException {
   return Math.log(params[0]);
 }