Average Error: 0 → 0
Time: 852.0ms
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 r61190 = 2.0;
        double r61191 = 1.0;
        double r61192 = 9.0;
        double r61193 = r61191 / r61192;
        double r61194 = r61191 * r61193;
        double r61195 = r61193 * r61193;
        double r61196 = r61194 + r61195;
        double r61197 = r61193 * r61191;
        double r61198 = r61196 + r61197;
        double r61199 = r61190 * r61198;
        return r61199;
}

double f() {
        double r61200 = 2.0;
        double r61201 = 1.0;
        double r61202 = 9.0;
        double r61203 = r61201 / r61202;
        double r61204 = r61200 * r61203;
        double r61205 = r61201 + r61203;
        double r61206 = r61205 + r61201;
        double r61207 = r61204 * r61206;
        return r61207;
}

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