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

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Target

Original0.0
Comparison0.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. Using strategy rm
  3. Applied distribute-lft-in 0.0

    \[\leadsto \color{blue}{a \cdot \left(b + c\right) + a \cdot d}\]
  4. Removed slow pow expressions

Runtime

Time bar (total: 15.8s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3145295585 855669224 997889558 2634167216 1270689682 2208711043)'
(FPCore (a b c d)
  :name "Expression, p14"
  :pre (and (<= 56789 a 98765) (<= 0 b 1) (<= 0 c 0.0016773) (<= 0 d 0.0016773))

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

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