@@ -0,0 +1,625 @@
+package edu.neu.ccs.pyramid.eval;%0A%0A/**%0A * Created by chengli on 3/2/16.%0A */%0Apublic class SafeDivide %7B%0A%0A    /**%0A     * allow 0/0 to return a default value%0A     * @param numerator a%0A     * @param denominator b%0A     * @param defaultValue 0/0%0A     * @return a/b%0A     */%0A    public static double divide(double numerator, double denominator, double defaultValue)%7B%0A        if (denominator==0)%7B%0A            if (numerator==0)%7B%0A                return defaultValue;%0A            %7D else %7B%0A                throw new ArithmeticException(%22non-zero number divided by 0%22);%0A            %7D%0A        %7D%0A        return numerator/denominator;%0A    %7D%0A%7D%0A

add SafeDivide