Average Error: 45.2 → 8.3
Time: 21.8s
Precision: 64
Internal Precision: 2368
\[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
\[-1 + \left((x \cdot y + z)_* - \left(z + x \cdot y\right)\right)\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original45.2
Target0
Herbie8.3
\[-1\]

Derivation

  1. Initial program 45.2

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

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

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

    \[\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\]
  7. Taylor expanded around -inf 8.3

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

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

Runtime

Time bar (total: 21.8s)Debug logProfile

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

  :herbie-target
  -1

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