Average Error: 49.1 → 0
Time: 1.9s
Precision: 64
Internal Precision: 128
\[1.7 \cdot 10^{+308} \cdot t - 1.7 \cdot 10^{+308}\]
\[(\left( 1.7 \cdot 10^{+308} \right) \cdot t + \left(-1.7 \cdot 10^{+308}\right))_*\]

Error

Bits error versus t

Target

Original49.1
Target0
Herbie0
\[(\left( 1.7 \cdot 10^{+308} \right) \cdot t + \left(-1.7 \cdot 10^{+308}\right))_*\]

Derivation

  1. Initial program 49.1

    \[1.7 \cdot 10^{+308} \cdot t - 1.7 \cdot 10^{+308}\]
  2. Using strategy rm
  3. Applied fma-neg0

    \[\leadsto \color{blue}{(\left( 1.7 \cdot 10^{+308} \right) \cdot t + \left(-1.7 \cdot 10^{+308}\right))_*}\]
  4. Final simplification0

    \[\leadsto (\left( 1.7 \cdot 10^{+308} \right) \cdot t + \left(-1.7 \cdot 10^{+308}\right))_*\]

Reproduce

herbie shell --seed 2019090 +o rules:numerics
(FPCore (t)
  :name "fma_test2"
  :pre (<= 1.9 t 2.1)

  :herbie-target
  (fma 1.7e+308 t (- 1.7e+308))

  (- (* 1.7e+308 t) 1.7e+308))