Average Error: 64.0 → 0
Time: 3.9s
Precision: 64
\[1.899999999999999911182158029987476766109 \le t \le 2.100000000000000088817841970012523233891\]
\[1.699999999999999938830795788659981743333 \cdot 10^{308} \cdot t - 1.699999999999999938830795788659981743333 \cdot 10^{308}\]
\[\mathsf{fma}\left(1.699999999999999938830795788659981743333 \cdot 10^{308}, t, -1.699999999999999938830795788659981743333 \cdot 10^{308}\right)\]
1.699999999999999938830795788659981743333 \cdot 10^{308} \cdot t - 1.699999999999999938830795788659981743333 \cdot 10^{308}
\mathsf{fma}\left(1.699999999999999938830795788659981743333 \cdot 10^{308}, t, -1.699999999999999938830795788659981743333 \cdot 10^{308}\right)
double f(double t) {
        double r36428 = 1.7e+308;
        double r36429 = t;
        double r36430 = r36428 * r36429;
        double r36431 = r36430 - r36428;
        return r36431;
}

double f(double t) {
        double r36432 = 1.7e+308;
        double r36433 = t;
        double r36434 = -r36432;
        double r36435 = fma(r36432, r36433, r36434);
        return r36435;
}

Error

Bits error versus t

Target

Original64.0
Target0
Herbie0
\[\mathsf{fma}\left(1.699999999999999938830795788659981743333 \cdot 10^{308}, t, -1.699999999999999938830795788659981743333 \cdot 10^{308}\right)\]

Derivation

  1. Initial program 64.0

    \[1.699999999999999938830795788659981743333 \cdot 10^{308} \cdot t - 1.699999999999999938830795788659981743333 \cdot 10^{308}\]
  2. Using strategy rm
  3. Applied add-cube-cbrt64.0

    \[\leadsto 1.699999999999999938830795788659981743333 \cdot 10^{308} \cdot t - \color{blue}{\left(\sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}} \cdot \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}}\right) \cdot \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}}}\]
  4. Applied prod-diff1.6

    \[\leadsto \color{blue}{\mathsf{fma}\left(1.699999999999999938830795788659981743333 \cdot 10^{308}, t, -\sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}} \cdot \left(\sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}} \cdot \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}}, \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}} \cdot \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}}, \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}} \cdot \left(\sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}} \cdot \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}}\right)\right)}\]
  5. Simplified0

    \[\leadsto \color{blue}{\mathsf{fma}\left(1.699999999999999938830795788659981743333 \cdot 10^{308}, t, -1.699999999999999938830795788659981743333 \cdot 10^{308}\right)} + \mathsf{fma}\left(-\sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}}, \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}} \cdot \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}}, \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}} \cdot \left(\sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}} \cdot \sqrt[3]{1.699999999999999938830795788659981743333 \cdot 10^{308}}\right)\right)\]
  6. Simplified0

    \[\leadsto \mathsf{fma}\left(1.699999999999999938830795788659981743333 \cdot 10^{308}, t, -1.699999999999999938830795788659981743333 \cdot 10^{308}\right) + \color{blue}{0}\]
  7. Final simplification0

    \[\leadsto \mathsf{fma}\left(1.699999999999999938830795788659981743333 \cdot 10^{308}, t, -1.699999999999999938830795788659981743333 \cdot 10^{308}\right)\]

Reproduce

herbie shell --seed 2019174 +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))