Average Error: 0 → 0
Time: 2.9m
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(\frac{1}{9} + \left(1 + 1\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(\frac{1}{9} + \left(1 + 1\right)\right)\right)
double f() {
        double r5432747 = 2.0;
        double r5432748 = 1.0;
        double r5432749 = 9.0;
        double r5432750 = r5432748 / r5432749;
        double r5432751 = r5432748 * r5432750;
        double r5432752 = r5432750 * r5432750;
        double r5432753 = r5432751 + r5432752;
        double r5432754 = r5432750 * r5432748;
        double r5432755 = r5432753 + r5432754;
        double r5432756 = r5432747 * r5432755;
        return r5432756;
}

double f() {
        double r5432757 = 2.0;
        double r5432758 = 1.0;
        double r5432759 = 9.0;
        double r5432760 = r5432758 / r5432759;
        double r5432761 = r5432758 + r5432758;
        double r5432762 = r5432760 + r5432761;
        double r5432763 = r5432760 * r5432762;
        double r5432764 = r5432757 * r5432763;
        return r5432764;
}

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(\frac{1}{9} + \left(1 + 1\right)\right)\right)}\]
    3. Final simplification0

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

    Reproduce

    herbie shell --seed 2019174 
    (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))))