Average Error: 64.0 → 0
Time: 3.3s
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 r42130 = 1.7e+308;
        double r42131 = t;
        double r42132 = r42130 * r42131;
        double r42133 = r42132 - r42130;
        return r42133;
}

double f(double t) {
        double r42134 = 1.7e+308;
        double r42135 = t;
        double r42136 = -r42134;
        double r42137 = fma(r42134, r42135, r42136);
        return r42137;
}

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