Average Error: 0 → 0
Time: 3.6s
Precision: 64
\[2 \cdot \left(\left(1 \cdot \frac{1}{9} + \frac{1}{9} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right)\]
\[2 \cdot \left(\frac{1}{9} \cdot \left(1 + \left(1 + \frac{1}{9}\right)\right)\right)\]
2 \cdot \left(\left(1 \cdot \frac{1}{9} + \frac{1}{9} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right)
2 \cdot \left(\frac{1}{9} \cdot \left(1 + \left(1 + \frac{1}{9}\right)\right)\right)
double f() {
        double r5971840 = 2.0;
        double r5971841 = 1.0;
        double r5971842 = 9.0;
        double r5971843 = r5971841 / r5971842;
        double r5971844 = r5971841 * r5971843;
        double r5971845 = r5971843 * r5971843;
        double r5971846 = r5971844 + r5971845;
        double r5971847 = r5971843 * r5971841;
        double r5971848 = r5971846 + r5971847;
        double r5971849 = r5971840 * r5971848;
        return r5971849;
}

double f() {
        double r5971850 = 2.0;
        double r5971851 = 1.0;
        double r5971852 = 9.0;
        double r5971853 = r5971851 / r5971852;
        double r5971854 = r5971851 + r5971853;
        double r5971855 = r5971851 + r5971854;
        double r5971856 = r5971853 * r5971855;
        double r5971857 = r5971850 * r5971856;
        return r5971857;
}

Error

Try it out

Your Program's Arguments

    Results

    Enter valid numbers for all inputs

    Target

    Original0
    Target0
    Herbie0
    \[\left(\left(\frac{1}{9} \cdot 1\right) \cdot 2 + 2 \cdot \left(\frac{1}{9} \cdot \frac{1}{9}\right)\right) + 2 \cdot \left(1 \cdot \frac{1}{9}\right)\]

    Derivation

    1. Initial program 0

      \[2 \cdot \left(\left(1 \cdot \frac{1}{9} + \frac{1}{9} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right)\]
    2. Simplified0

      \[\leadsto \color{blue}{2 \cdot \left(\frac{1}{9} \cdot \left(1 + \left(1 + \frac{1}{9}\right)\right)\right)}\]
    3. Final simplification0

      \[\leadsto 2 \cdot \left(\frac{1}{9} \cdot \left(1 + \left(1 + \frac{1}{9}\right)\right)\right)\]

    Reproduce

    herbie shell --seed 2019173 
    (FPCore ()
      :name "Rectangular parallelepiped of dimension a×b×c"
    
      :herbie-target
      (+ (+ (* (* (/ 1.0 9.0) 1.0) 2.0) (* 2.0 (* (/ 1.0 9.0) (/ 1.0 9.0)))) (* 2.0 (* 1.0 (/ 1.0 9.0))))
    
      (* 2.0 (+ (+ (* 1.0 (/ 1.0 9.0)) (* (/ 1.0 9.0) (/ 1.0 9.0))) (* (/ 1.0 9.0) 1.0))))