Average Error: 0 → 0
Time: 1.5s
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 r32605 = 2.0;
        double r32606 = 1.0;
        double r32607 = 9.0;
        double r32608 = r32606 / r32607;
        double r32609 = r32606 * r32608;
        double r32610 = r32608 * r32608;
        double r32611 = r32609 + r32610;
        double r32612 = r32608 * r32606;
        double r32613 = r32611 + r32612;
        double r32614 = r32605 * r32613;
        return r32614;
}

double f() {
        double r32615 = 2.0;
        double r32616 = 1.0;
        double r32617 = 9.0;
        double r32618 = r32616 / r32617;
        double r32619 = r32616 + r32618;
        double r32620 = r32616 + r32619;
        double r32621 = r32618 * r32620;
        double r32622 = r32615 * r32621;
        return r32622;
}

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