Average Error: 0 → 0
Time: 1.2s
Precision: 64
Internal Precision: 128
\[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}\]

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

    Details

    Time bar (total: 1.1s)Debug log

    sample46.0ms

    Algorithm
    intervals

    simplify84.0ms

    Counts
    1 → 1
    Calls
    1 calls:
    Slowest
    84.0ms
    (* 2 (+ (+ (* 1 (/ 1 9)) (* (/ 1 9) (/ 1 9))) (* (/ 1 9) 1)))

    prune7.0ms

    Pruning

    1 alts after pruning (1 fresh and 0 done)

    Merged error: 0b

    localize1.0ms

    Local error

    Found 0 expressions with local error:

    rewrite0.0ms

    Algorithm
    rewrite-expression-head
    Rules
    Counts
    0 → 0
    Calls
    0 calls:
    Slowest

    series0.0ms

    Counts
    0 → 0
    Calls
    0 calls:
    Slowest

    simplify0.0ms

    Counts
    0 → 0
    Calls
    0 calls:
    Slowest

    prune3.0ms

    Pruning

    1 alts after pruning (0 fresh and 1 done)

    Merged error: 0b

    end0.0ms

    sample914.0ms

    Algorithm
    intervals