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(\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 r3556303 = 2.0;
        double r3556304 = 1.0;
        double r3556305 = 9.0;
        double r3556306 = r3556304 / r3556305;
        double r3556307 = r3556304 * r3556306;
        double r3556308 = r3556306 * r3556306;
        double r3556309 = r3556307 + r3556308;
        double r3556310 = r3556306 * r3556304;
        double r3556311 = r3556309 + r3556310;
        double r3556312 = r3556303 * r3556311;
        return r3556312;
}

double f() {
        double r3556313 = 2.0;
        double r3556314 = 1.0;
        double r3556315 = 9.0;
        double r3556316 = r3556314 / r3556315;
        double r3556317 = r3556314 + r3556314;
        double r3556318 = r3556316 + r3556317;
        double r3556319 = r3556316 * r3556318;
        double r3556320 = r3556313 * r3556319;
        return r3556320;
}

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 2019171 
    (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))))