Average Error: 0.0 → 0.0
Time: 14.4s
Precision: 64
Internal Precision: 128
\[a \cdot \left(\left(b + c\right) + d\right)\]
\[\left(c \cdot a + d \cdot a\right) + a \cdot b\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[a \cdot b + a \cdot \left(c + d\right)\]

Derivation

  1. Initial program 0.0

    \[a \cdot \left(\left(b + c\right) + d\right)\]
  2. Initial simplification0.0

    \[\leadsto \left(\left(b + c\right) + d\right) \cdot a\]
  3. Taylor expanded around -inf 0.0

    \[\leadsto \color{blue}{a \cdot d + \left(a \cdot b + a \cdot c\right)}\]
  4. Simplified0.0

    \[\leadsto \color{blue}{a \cdot \left(b + \left(d + c\right)\right)}\]
  5. Using strategy rm
  6. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{a \cdot b + a \cdot \left(d + c\right)}\]
  7. Using strategy rm
  8. Applied distribute-rgt-in0.0

    \[\leadsto a \cdot b + \color{blue}{\left(d \cdot a + c \cdot a\right)}\]
  9. Final simplification0.0

    \[\leadsto \left(c \cdot a + d \cdot a\right) + a \cdot b\]

Runtime

Time bar (total: 14.4s)Debug logProfile

herbie shell --seed 2018296 
(FPCore (a b c d)
  :name "Expression, p14"
  :pre (and (<= 56789 a 98765) (<= 0 b 1) (<= 0 c 0.0016773) (<= 0 d 0.0016773))

  :herbie-target
  (+ (* a b) (* a (+ c d)))

  (* a (+ (+ b c) d)))