Average Error: 64.0 → 0
Time: 3.4s
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 r31671 = 1.7e+308;
        double r31672 = t;
        double r31673 = r31671 * r31672;
        double r31674 = r31673 - r31671;
        return r31674;
}

double f(double t) {
        double r31675 = 1.7e+308;
        double r31676 = t;
        double r31677 = -r31675;
        double r31678 = fma(r31675, r31676, r31677);
        return r31678;
}

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 2019196 +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))