Average Error: 0 → 0
Time: 3.1s
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 r41591 = 2.0;
        double r41592 = 1.0;
        double r41593 = 9.0;
        double r41594 = r41592 / r41593;
        double r41595 = r41592 * r41594;
        double r41596 = r41594 * r41594;
        double r41597 = r41595 + r41596;
        double r41598 = r41594 * r41592;
        double r41599 = r41597 + r41598;
        double r41600 = r41591 * r41599;
        return r41600;
}

double f() {
        double r41601 = 2.0;
        double r41602 = 1.0;
        double r41603 = 9.0;
        double r41604 = r41602 / r41603;
        double r41605 = r41602 + r41604;
        double r41606 = r41602 + r41605;
        double r41607 = r41604 * r41606;
        double r41608 = r41601 * r41607;
        return r41608;
}

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