Average Error: 0 → 0
Time: 3.6s
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 r89065 = 2.0;
        double r89066 = 1.0;
        double r89067 = 9.0;
        double r89068 = r89066 / r89067;
        double r89069 = r89066 * r89068;
        double r89070 = r89068 * r89068;
        double r89071 = r89069 + r89070;
        double r89072 = r89068 * r89066;
        double r89073 = r89071 + r89072;
        double r89074 = r89065 * r89073;
        return r89074;
}

double f() {
        double r89075 = 2.0;
        double r89076 = 1.0;
        double r89077 = 9.0;
        double r89078 = r89076 / r89077;
        double r89079 = r89075 * r89078;
        double r89080 = r89076 + r89078;
        double r89081 = r89080 + r89076;
        double r89082 = r89079 * r89081;
        return r89082;
}

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