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

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 *-un-lft-identity49.1

    \[\leadsto 1.7 \cdot 10^{+308} \cdot t - \color{blue}{1 \cdot 1.7 \cdot 10^{+308}}\]
  4. Applied *-commutative49.1

    \[\leadsto \color{blue}{t \cdot 1.7 \cdot 10^{+308}} - 1 \cdot 1.7 \cdot 10^{+308}\]
  5. Applied distribute-rgt-out--0

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

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

Reproduce

herbie shell --seed 2019088 
(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))