Average Error: 45.4 → 8.6
Time: 26.8s
Precision: 64
Internal Precision: 128
\[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
\[\left((x \cdot y + z)_* - \left(z + x \cdot y\right)\right) - 1\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original45.4
Target0
Herbie8.6
\[-1\]

Derivation

  1. Initial program 45.4

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

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

    \[\leadsto \left((x \cdot y + z)_* - x \cdot y\right) - \color{blue}{\left(z + \left(--1\right)\right)}\]
  5. Applied associate--r+14.0

    \[\leadsto \color{blue}{\left(\left((x \cdot y + z)_* - x \cdot y\right) - z\right) - \left(--1\right)}\]
  6. Simplified14.0

    \[\leadsto \left(\left((x \cdot y + z)_* - x \cdot y\right) - z\right) - \color{blue}{1}\]
  7. Using strategy rm
  8. Applied flip--31.8

    \[\leadsto \left(\color{blue}{\frac{(x \cdot y + z)_* \cdot (x \cdot y + z)_* - \left(x \cdot y\right) \cdot \left(x \cdot y\right)}{(x \cdot y + z)_* + x \cdot y}} - z\right) - 1\]
  9. Taylor expanded around -inf 8.6

    \[\leadsto \color{blue}{\left((x \cdot y + z)_* - \left(z + x \cdot y\right)\right)} - 1\]
  10. Final simplification8.6

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

Runtime

Time bar (total: 26.8s)Debug logProfile

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

  :herbie-target
  -1

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