Average Error: 45.2 → 45.1
Time: 1.8m
Precision: 64
Internal Precision: 2368
\[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
\[\left((x \cdot y + z)_* - \left(\left(y \cdot x\right) \cdot \frac{y \cdot x}{y \cdot x - z} + 1\right)\right) + z \cdot \frac{z}{y \cdot x - z}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original45.2
Target0
Herbie45.1
\[-1\]

Derivation

  1. Initial program 45.2

    \[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
  2. Using strategy rm
  3. Applied flip-+45.5

    \[\leadsto (x \cdot y + z)_* - \left(1 + \color{blue}{\frac{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - z \cdot z}{x \cdot y - z}}\right)\]
  4. Using strategy rm
  5. Applied div-sub45.5

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

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

    \[\leadsto \color{blue}{\left((x \cdot y + z)_* - \left(1 + \frac{\left(x \cdot y\right) \cdot \left(x \cdot y\right)}{x \cdot y - z}\right)\right) + \frac{z \cdot z}{x \cdot y - z}}\]
  8. Using strategy rm
  9. Applied *-un-lft-identity45.5

    \[\leadsto \left((x \cdot y + z)_* - \left(1 + \frac{\left(x \cdot y\right) \cdot \left(x \cdot y\right)}{\color{blue}{1 \cdot \left(x \cdot y - z\right)}}\right)\right) + \frac{z \cdot z}{x \cdot y - z}\]
  10. Applied times-frac45.3

    \[\leadsto \left((x \cdot y + z)_* - \left(1 + \color{blue}{\frac{x \cdot y}{1} \cdot \frac{x \cdot y}{x \cdot y - z}}\right)\right) + \frac{z \cdot z}{x \cdot y - z}\]
  11. Simplified45.3

    \[\leadsto \left((x \cdot y + z)_* - \left(1 + \color{blue}{\left(y \cdot x\right)} \cdot \frac{x \cdot y}{x \cdot y - z}\right)\right) + \frac{z \cdot z}{x \cdot y - z}\]
  12. Using strategy rm
  13. Applied *-un-lft-identity45.3

    \[\leadsto \left((x \cdot y + z)_* - \left(1 + \left(y \cdot x\right) \cdot \frac{x \cdot y}{x \cdot y - z}\right)\right) + \frac{z \cdot z}{\color{blue}{1 \cdot \left(x \cdot y - z\right)}}\]
  14. Applied times-frac45.1

    \[\leadsto \left((x \cdot y + z)_* - \left(1 + \left(y \cdot x\right) \cdot \frac{x \cdot y}{x \cdot y - z}\right)\right) + \color{blue}{\frac{z}{1} \cdot \frac{z}{x \cdot y - z}}\]
  15. Simplified45.1

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

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

Runtime

Time bar (total: 1.8m)Debug logProfile

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

  :herbie-target
  -1

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