Average Error: 49.1 → 49.1
Time: 1.4s
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 r3774472 = 1.7e+308;
        double r3774473 = t;
        double r3774474 = r3774472 * r3774473;
        double r3774475 = r3774474 - r3774472;
        return r3774475;
}

double f(double t) {
        double r3774476 = 1.7e+308;
        double r3774477 = t;
        double r3774478 = r3774476 * r3774477;
        double r3774479 = r3774478 - r3774476;
        return r3774479;
}

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 2019102 
(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))