Average Error: 0 → 0
Time: 3.0m
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 r3168149 = 2.0;
        double r3168150 = 1.0;
        double r3168151 = 9.0;
        double r3168152 = r3168150 / r3168151;
        double r3168153 = r3168150 * r3168152;
        double r3168154 = r3168152 * r3168152;
        double r3168155 = r3168153 + r3168154;
        double r3168156 = r3168152 * r3168150;
        double r3168157 = r3168155 + r3168156;
        double r3168158 = r3168149 * r3168157;
        return r3168158;
}

double f() {
        double r3168159 = 2.0;
        double r3168160 = 1.0;
        double r3168161 = 9.0;
        double r3168162 = r3168160 / r3168161;
        double r3168163 = r3168160 + r3168160;
        double r3168164 = r3168162 + r3168163;
        double r3168165 = r3168162 * r3168164;
        double r3168166 = r3168159 * r3168165;
        return r3168166;
}

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