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 r1472225 = 2.0;
        double r1472226 = 1.0;
        double r1472227 = 9.0;
        double r1472228 = r1472226 / r1472227;
        double r1472229 = r1472226 * r1472228;
        double r1472230 = r1472228 * r1472228;
        double r1472231 = r1472229 + r1472230;
        double r1472232 = r1472228 * r1472226;
        double r1472233 = r1472231 + r1472232;
        double r1472234 = r1472225 * r1472233;
        return r1472234;
}

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

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 2019138 +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))))