Average Error: 44.9 → 8.1
Time: 22.7s
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

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

Derivation

  1. Initial program 44.9

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

    \[\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.4

    \[\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.1

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

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

Runtime

Time bar (total: 22.7s)Debug logProfile

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

  :herbie-target
  -1

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