Average Error: 61.8 → 0.3
Time: 59.6s
Precision: 64
Internal Precision: 576
\[\left(1 + t \cdot 2 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 2 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 2 \cdot 10^{-16}\right)\right)\]
\[\left(\left(t \cdot 3.9999999999999997 \cdot 10^{-32}\right) \cdot t + \left(1 + -1\right)\right) + t \cdot \left(4 \cdot 10^{-16} - 2 \cdot 10^{-16} \cdot 2\right)\]

Error

Bits error versus t

Target

Original61.8
Target50.6
Herbie0.3
\[(\left(1 + t \cdot 2 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 2 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 2 \cdot 10^{-16}\right)\right))_*\]

Derivation

  1. Initial program 61.8

    \[\left(1 + t \cdot 2 \cdot 10^{-16}\right) \cdot \left(1 + t \cdot 2 \cdot 10^{-16}\right) + \left(-1 - 2 \cdot \left(t \cdot 2 \cdot 10^{-16}\right)\right)\]
  2. Taylor expanded around inf 61.8

    \[\leadsto \color{blue}{\left(3.9999999999999997 \cdot 10^{-32} \cdot {t}^{2} + \left(1 + 4 \cdot 10^{-16} \cdot t\right)\right)} + \left(-1 - 2 \cdot \left(t \cdot 2 \cdot 10^{-16}\right)\right)\]
  3. Applied simplify0.3

    \[\leadsto \color{blue}{\left(\left(t \cdot 3.9999999999999997 \cdot 10^{-32}\right) \cdot t + \left(1 + -1\right)\right) + t \cdot \left(4 \cdot 10^{-16} - 2 \cdot 10^{-16} \cdot 2\right)}\]

Runtime

Time bar (total: 59.6s)Debug logProfile

herbie shell --seed '#(1072840222 1305617769 1692503039 1353360431 4178980589 1488672652)' 
(FPCore (t)
  :name "fma_test1"
  :pre (<= 0.9 t 1.1)

  :herbie-target
  (fma (+ 1 (* t 2e-16)) (+ 1 (* t 2e-16)) (- -1 (* 2 (* t 2e-16))))

  (+ (* (+ 1 (* t 2e-16)) (+ 1 (* t 2e-16))) (- -1 (* 2 (* t 2e-16)))))