Average Error: 0 → 0
Time: 6.8s
Precision: 64
\[2.0 \cdot \left(\left(1.0 \cdot \frac{1.0}{9.0} + \frac{1.0}{9.0} \cdot \frac{1.0}{9.0}\right) + \frac{1.0}{9.0} \cdot 1.0\right)\]
\[2.0 \cdot \left(\frac{1.0}{9.0} \cdot \left(\frac{1.0}{9.0} + \left(1.0 + 1.0\right)\right)\right)\]
2.0 \cdot \left(\left(1.0 \cdot \frac{1.0}{9.0} + \frac{1.0}{9.0} \cdot \frac{1.0}{9.0}\right) + \frac{1.0}{9.0} \cdot 1.0\right)
2.0 \cdot \left(\frac{1.0}{9.0} \cdot \left(\frac{1.0}{9.0} + \left(1.0 + 1.0\right)\right)\right)
double f() {
        double r5944056 = 2.0;
        double r5944057 = 1.0;
        double r5944058 = 9.0;
        double r5944059 = r5944057 / r5944058;
        double r5944060 = r5944057 * r5944059;
        double r5944061 = r5944059 * r5944059;
        double r5944062 = r5944060 + r5944061;
        double r5944063 = r5944059 * r5944057;
        double r5944064 = r5944062 + r5944063;
        double r5944065 = r5944056 * r5944064;
        return r5944065;
}

double f() {
        double r5944066 = 2.0;
        double r5944067 = 1.0;
        double r5944068 = 9.0;
        double r5944069 = r5944067 / r5944068;
        double r5944070 = r5944067 + r5944067;
        double r5944071 = r5944069 + r5944070;
        double r5944072 = r5944069 * r5944071;
        double r5944073 = r5944066 * r5944072;
        return r5944073;
}

Error

Try it out

Your Program's Arguments

    Results

    Enter valid numbers for all inputs

    Target

    Original0
    Target0
    Herbie0
    \[\left(\left(\frac{1.0}{9.0} \cdot 1.0\right) \cdot 2.0 + 2.0 \cdot \left(\frac{1.0}{9.0} \cdot \frac{1.0}{9.0}\right)\right) + 2.0 \cdot \left(1.0 \cdot \frac{1.0}{9.0}\right)\]

    Derivation

    1. Initial program 0

      \[2.0 \cdot \left(\left(1.0 \cdot \frac{1.0}{9.0} + \frac{1.0}{9.0} \cdot \frac{1.0}{9.0}\right) + \frac{1.0}{9.0} \cdot 1.0\right)\]
    2. Simplified0

      \[\leadsto \color{blue}{2.0 \cdot \left(\frac{1.0}{9.0} \cdot \left(\left(1.0 + 1.0\right) + \frac{1.0}{9.0}\right)\right)}\]
    3. Final simplification0

      \[\leadsto 2.0 \cdot \left(\frac{1.0}{9.0} \cdot \left(\frac{1.0}{9.0} + \left(1.0 + 1.0\right)\right)\right)\]

    Reproduce

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