Average Error: 49.1 → 49.1
Time: 1.3s
Precision: 64
\[1.7 \cdot 10^{+308} \cdot t - 1.7 \cdot 10^{+308}\]
\[1.7 \cdot 10^{+308} \cdot t - 1.7 \cdot 10^{+308}\]
double f(double t) {
        double r2934588 = 1.7e+308;
        double r2934589 = t;
        double r2934590 = r2934588 * r2934589;
        double r2934591 = r2934590 - r2934588;
        return r2934591;
}

double f(double t) {
        double r2934592 = 1.7e+308;
        double r2934593 = t;
        double r2934594 = r2934592 * r2934593;
        double r2934595 = r2934594 - r2934592;
        return r2934595;
}

1.7 \cdot 10^{+308} \cdot t - 1.7 \cdot 10^{+308}
1.7 \cdot 10^{+308} \cdot t - 1.7 \cdot 10^{+308}

Error

Bits error versus t

Target

Original49.1
Target0
Herbie49.1
\[(\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. Final simplification49.1

    \[\leadsto 1.7 \cdot 10^{+308} \cdot t - 1.7 \cdot 10^{+308}\]

Reproduce

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