Average Error: 0 → 0
Time: 1.3s
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)\]
\[\frac{38}{81}\]
2 \cdot \left(\left(1 \cdot \frac{1}{9} + \frac{1}{9} \cdot \frac{1}{9}\right) + \frac{1}{9} \cdot 1\right)
\frac{38}{81}
double f() {
        double r1045940 = 2.0;
        double r1045941 = 1.0;
        double r1045942 = 9.0;
        double r1045943 = r1045941 / r1045942;
        double r1045944 = r1045941 * r1045943;
        double r1045945 = r1045943 * r1045943;
        double r1045946 = r1045944 + r1045945;
        double r1045947 = r1045943 * r1045941;
        double r1045948 = r1045946 + r1045947;
        double r1045949 = r1045940 * r1045948;
        return r1045949;
}

double f() {
        double r1045950 = 0.4691358024691358;
        return r1045950;
}

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}{\frac{38}{81}}\]
    3. Final simplification0

      \[\leadsto \frac{38}{81}\]

    Reproduce

    herbie shell --seed 2019151 +o rules:numerics
    (FPCore ()
      :name "Rectangular parallelepiped of dimension a×b×c"
    
      :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))))