Average Error: 44.9 → 12.9
Time: 2.6m
Precision: 64
Internal Precision: 2368
\[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
\[\left(\left((x \cdot y + z)_* - x \cdot y\right) - z\right) - 1\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original44.9
Target0
Herbie12.9
\[-1\]

Derivation

  1. Initial program 44.9

    \[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
  2. Initial simplification33.8

    \[\leadsto \left((x \cdot y + z)_* - x \cdot y\right) - \left(z + 1\right)\]
  3. Using strategy rm
  4. Applied associate--r+12.9

    \[\leadsto \color{blue}{\left(\left((x \cdot y + z)_* - x \cdot y\right) - z\right) - 1}\]
  5. Final simplification12.9

    \[\leadsto \left(\left((x \cdot y + z)_* - x \cdot y\right) - z\right) - 1\]

Runtime

Time bar (total: 2.6m)Debug logProfile

herbie shell --seed 2018225 
(FPCore (x y z)
  :name "simple fma test"

  :herbie-target
  -1

  (- (fma x y z) (+ 1 (+ (* x y) z))))