Average Error: 0 → 0
Time: 4.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)\]
\[2 \cdot \left(\frac{1}{9} \cdot \left(1 + \left(1 + \frac{1}{9}\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(1 + \left(1 + \frac{1}{9}\right)\right)\right)
double f() {
        double r52606 = 2.0;
        double r52607 = 1.0;
        double r52608 = 9.0;
        double r52609 = r52607 / r52608;
        double r52610 = r52607 * r52609;
        double r52611 = r52609 * r52609;
        double r52612 = r52610 + r52611;
        double r52613 = r52609 * r52607;
        double r52614 = r52612 + r52613;
        double r52615 = r52606 * r52614;
        return r52615;
}

double f() {
        double r52616 = 2.0;
        double r52617 = 1.0;
        double r52618 = 9.0;
        double r52619 = r52617 / r52618;
        double r52620 = r52617 + r52619;
        double r52621 = r52617 + r52620;
        double r52622 = r52619 * r52621;
        double r52623 = r52616 * r52622;
        return r52623;
}

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

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

    Reproduce

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