Average Error: 0 → 0
Time: 5.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)\]
\[\left(\frac{1}{9} \cdot \left(\left(1 + 1\right) + \frac{1}{9}\right)\right) \cdot 2\]
2 \cdot \left(\left(1 \cdot \frac{1}{9} + \frac{1}{9} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right)
\left(\frac{1}{9} \cdot \left(\left(1 + 1\right) + \frac{1}{9}\right)\right) \cdot 2
double f() {
        double r4097456 = 2.0;
        double r4097457 = 1.0;
        double r4097458 = 9.0;
        double r4097459 = r4097457 / r4097458;
        double r4097460 = r4097457 * r4097459;
        double r4097461 = r4097459 * r4097459;
        double r4097462 = r4097460 + r4097461;
        double r4097463 = r4097459 * r4097457;
        double r4097464 = r4097462 + r4097463;
        double r4097465 = r4097456 * r4097464;
        return r4097465;
}

double f() {
        double r4097466 = 1.0;
        double r4097467 = 9.0;
        double r4097468 = r4097466 / r4097467;
        double r4097469 = r4097466 + r4097466;
        double r4097470 = r4097469 + r4097468;
        double r4097471 = r4097468 * r4097470;
        double r4097472 = 2.0;
        double r4097473 = r4097471 * r4097472;
        return r4097473;
}

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

    Reproduce

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