Average Error: 0 → 0
Time: 1.2s
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 r3508466 = 2.0;
        double r3508467 = 1.0;
        double r3508468 = 9.0;
        double r3508469 = r3508467 / r3508468;
        double r3508470 = r3508467 * r3508469;
        double r3508471 = r3508469 * r3508469;
        double r3508472 = r3508470 + r3508471;
        double r3508473 = r3508469 * r3508467;
        double r3508474 = r3508472 + r3508473;
        double r3508475 = r3508466 * r3508474;
        return r3508475;
}

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

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