Average Error: 0 → 0
Time: 3.2s
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 r5423816 = 2.0;
        double r5423817 = 1.0;
        double r5423818 = 9.0;
        double r5423819 = r5423817 / r5423818;
        double r5423820 = r5423817 * r5423819;
        double r5423821 = r5423819 * r5423819;
        double r5423822 = r5423820 + r5423821;
        double r5423823 = r5423819 * r5423817;
        double r5423824 = r5423822 + r5423823;
        double r5423825 = r5423816 * r5423824;
        return r5423825;
}

double f() {
        double r5423826 = 2.0;
        double r5423827 = 1.0;
        double r5423828 = 9.0;
        double r5423829 = r5423827 / r5423828;
        double r5423830 = r5423827 + r5423827;
        double r5423831 = r5423829 + r5423830;
        double r5423832 = r5423829 * r5423831;
        double r5423833 = r5423826 * r5423832;
        return r5423833;
}

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(\left(1 + 1\right) + \frac{1}{9}\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 2019169 
    (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))))