Average Error: 0 → 0
Time: 1.0s
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(2 \cdot \frac{1}{9}\right) \cdot \left(\left(1 + \frac{1}{9}\right) + 1\right)\]
2 \cdot \left(\left(1 \cdot \frac{1}{9} + \frac{1}{9} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right)
\left(2 \cdot \frac{1}{9}\right) \cdot \left(\left(1 + \frac{1}{9}\right) + 1\right)
double f() {
        double r64548 = 2.0;
        double r64549 = 1.0;
        double r64550 = 9.0;
        double r64551 = r64549 / r64550;
        double r64552 = r64549 * r64551;
        double r64553 = r64551 * r64551;
        double r64554 = r64552 + r64553;
        double r64555 = r64551 * r64549;
        double r64556 = r64554 + r64555;
        double r64557 = r64548 * r64556;
        return r64557;
}

double f() {
        double r64558 = 2.0;
        double r64559 = 1.0;
        double r64560 = 9.0;
        double r64561 = r64559 / r64560;
        double r64562 = r64558 * r64561;
        double r64563 = r64559 + r64561;
        double r64564 = r64563 + r64559;
        double r64565 = r64562 * r64564;
        return r64565;
}

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. Final simplification0

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

    Reproduce

    herbie shell --seed 2019304 
    (FPCore ()
      :name "Rectangular parallelepiped of dimension a×b×c"
      :precision binary64
    
      :herbie-target
      (+ (+ (* (* (/ 1 9) 1) 2) (* 2 (* (/ 1 9) (/ 1 9)))) (* 2 (* 1 (/ 1 9))))
    
      (* 2 (+ (+ (* 1 (/ 1 9)) (* (/ 1 9) (/ 1 9))) (* (/ 1 9) 1))))