Average Error: 0 → 0
Time: 2.9m
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(\frac{1}{9} + \left(1 + 1\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(\frac{1}{9} + \left(1 + 1\right)\right)\right)
double f() {
        double r5710208 = 2.0;
        double r5710209 = 1.0;
        double r5710210 = 9.0;
        double r5710211 = r5710209 / r5710210;
        double r5710212 = r5710209 * r5710211;
        double r5710213 = r5710211 * r5710211;
        double r5710214 = r5710212 + r5710213;
        double r5710215 = r5710211 * r5710209;
        double r5710216 = r5710214 + r5710215;
        double r5710217 = r5710208 * r5710216;
        return r5710217;
}

double f() {
        double r5710218 = 2.0;
        double r5710219 = 1.0;
        double r5710220 = 9.0;
        double r5710221 = r5710219 / r5710220;
        double r5710222 = r5710219 + r5710219;
        double r5710223 = r5710221 + r5710222;
        double r5710224 = r5710221 * r5710223;
        double r5710225 = r5710218 * r5710224;
        return r5710225;
}

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

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

    Reproduce

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