Average Error: 45.2 → 13.7
Time: 27.2s
Precision: 64
Internal Precision: 2368
\[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
\[\log \left(e^{\left(\left((x \cdot y + z)_* - y \cdot x\right) - z\right) - 1}\right)\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original45.2
Target0
Herbie13.7
\[-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 add-log-exp47.1

    \[\leadsto (x \cdot y + z)_* - \color{blue}{\log \left(e^{1 + \left(x \cdot y + z\right)}\right)}\]
  4. Applied add-log-exp47.6

    \[\leadsto \color{blue}{\log \left(e^{(x \cdot y + z)_*}\right)} - \log \left(e^{1 + \left(x \cdot y + z\right)}\right)\]
  5. Applied diff-log47.6

    \[\leadsto \color{blue}{\log \left(\frac{e^{(x \cdot y + z)_*}}{e^{1 + \left(x \cdot y + z\right)}}\right)}\]
  6. Simplified34.7

    \[\leadsto \log \color{blue}{\left(e^{\left((x \cdot y + z)_* - y \cdot x\right) - \left(z + 1\right)}\right)}\]
  7. Using strategy rm
  8. Applied associate--r+13.7

    \[\leadsto \log \left(e^{\color{blue}{\left(\left((x \cdot y + z)_* - y \cdot x\right) - z\right) - 1}}\right)\]
  9. Final simplification13.7

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

Runtime

Time bar (total: 27.2s)Debug logProfile

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

  :herbie-target
  -1

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