Average Error: 43.2 → 9.9
Time: 25.8s
Precision: 64
\[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;t \le -1.45871046711995538 \cdot 10^{125}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le -9.22209258437025154 \cdot 10^{-219}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)\right)}}\\ \mathbf{elif}\;t \le -1.6506396057830864 \cdot 10^{-267}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 1.1078784155040597 \cdot 10^{-245} \lor \neg \left(t \le 5.50990658974305019 \cdot 10^{-162}\right) \land t \le 9.0463317445752689 \cdot 10^{25}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, \mathsf{fma}\left(\sqrt{2}, t, 2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}}\right)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}\\ \end{array}\]
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;t \le -1.45871046711995538 \cdot 10^{125}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\

\mathbf{elif}\;t \le -9.22209258437025154 \cdot 10^{-219}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)\right)}}\\

\mathbf{elif}\;t \le -1.6506396057830864 \cdot 10^{-267}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\

\mathbf{elif}\;t \le 1.1078784155040597 \cdot 10^{-245} \lor \neg \left(t \le 5.50990658974305019 \cdot 10^{-162}\right) \land t \le 9.0463317445752689 \cdot 10^{25}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, \mathsf{fma}\left(\sqrt{2}, t, 2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}}\right)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}\\

\end{array}
double f(double x, double l, double t) {
        double r43688 = 2.0;
        double r43689 = sqrt(r43688);
        double r43690 = t;
        double r43691 = r43689 * r43690;
        double r43692 = x;
        double r43693 = 1.0;
        double r43694 = r43692 + r43693;
        double r43695 = r43692 - r43693;
        double r43696 = r43694 / r43695;
        double r43697 = l;
        double r43698 = r43697 * r43697;
        double r43699 = r43690 * r43690;
        double r43700 = r43688 * r43699;
        double r43701 = r43698 + r43700;
        double r43702 = r43696 * r43701;
        double r43703 = r43702 - r43698;
        double r43704 = sqrt(r43703);
        double r43705 = r43691 / r43704;
        return r43705;
}

double f(double x, double l, double t) {
        double r43706 = t;
        double r43707 = -1.4587104671199554e+125;
        bool r43708 = r43706 <= r43707;
        double r43709 = 2.0;
        double r43710 = sqrt(r43709);
        double r43711 = r43710 * r43706;
        double r43712 = 3.0;
        double r43713 = pow(r43710, r43712);
        double r43714 = x;
        double r43715 = 2.0;
        double r43716 = pow(r43714, r43715);
        double r43717 = r43713 * r43716;
        double r43718 = r43706 / r43717;
        double r43719 = r43710 * r43714;
        double r43720 = r43706 / r43719;
        double r43721 = r43718 - r43720;
        double r43722 = r43709 * r43721;
        double r43723 = r43722 - r43711;
        double r43724 = r43711 / r43723;
        double r43725 = -9.222092584370252e-219;
        bool r43726 = r43706 <= r43725;
        double r43727 = 4.0;
        double r43728 = pow(r43706, r43715);
        double r43729 = r43728 / r43714;
        double r43730 = l;
        double r43731 = cbrt(r43714);
        double r43732 = r43731 * r43731;
        double r43733 = r43730 / r43732;
        double r43734 = r43730 / r43731;
        double r43735 = r43733 * r43734;
        double r43736 = fma(r43706, r43706, r43735);
        double r43737 = r43709 * r43736;
        double r43738 = fma(r43727, r43729, r43737);
        double r43739 = sqrt(r43738);
        double r43740 = r43711 / r43739;
        double r43741 = -1.6506396057830864e-267;
        bool r43742 = r43706 <= r43741;
        double r43743 = 1.1078784155040597e-245;
        bool r43744 = r43706 <= r43743;
        double r43745 = 5.50990658974305e-162;
        bool r43746 = r43706 <= r43745;
        double r43747 = !r43746;
        double r43748 = 9.046331744575269e+25;
        bool r43749 = r43706 <= r43748;
        bool r43750 = r43747 && r43749;
        bool r43751 = r43744 || r43750;
        double r43752 = r43714 / r43730;
        double r43753 = r43730 / r43752;
        double r43754 = fma(r43706, r43706, r43753);
        double r43755 = r43709 * r43754;
        double r43756 = fma(r43727, r43729, r43755);
        double r43757 = sqrt(r43756);
        double r43758 = r43711 / r43757;
        double r43759 = r43710 * r43716;
        double r43760 = r43706 / r43759;
        double r43761 = r43709 * r43760;
        double r43762 = fma(r43710, r43706, r43761);
        double r43763 = fma(r43709, r43720, r43762);
        double r43764 = r43709 * r43718;
        double r43765 = r43763 - r43764;
        double r43766 = r43711 / r43765;
        double r43767 = r43751 ? r43758 : r43766;
        double r43768 = r43742 ? r43724 : r43767;
        double r43769 = r43726 ? r43740 : r43768;
        double r43770 = r43708 ? r43724 : r43769;
        return r43770;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -1.4587104671199554e+125 or -9.222092584370252e-219 < t < -1.6506396057830864e-267

    1. Initial program 55.9

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\]
    2. Simplified55.9

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}}\]
    3. Taylor expanded around inf 51.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot {t}^{2} + \left(2 \cdot \frac{{\ell}^{2}}{x} + 4 \cdot \frac{{t}^{2}}{x}\right)}}}\]
    4. Simplified51.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{{\ell}^{2}}{x}\right)\right)}}}\]
    5. Taylor expanded around -inf 7.9

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(\sqrt{2} \cdot t + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}}\]
    6. Simplified7.9

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}}\]

    if -1.4587104671199554e+125 < t < -9.222092584370252e-219

    1. Initial program 31.5

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\]
    2. Simplified31.5

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}}\]
    3. Taylor expanded around inf 14.2

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot {t}^{2} + \left(2 \cdot \frac{{\ell}^{2}}{x} + 4 \cdot \frac{{t}^{2}}{x}\right)}}}\]
    4. Simplified14.2

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{{\ell}^{2}}{x}\right)\right)}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt14.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{{\ell}^{2}}{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}\right)\right)}}\]
    7. Applied add-sqr-sqrt38.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{{\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)}}^{2}}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}\right)\right)}}\]
    8. Applied unpow-prod-down38.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\color{blue}{{\left(\sqrt{\ell}\right)}^{2} \cdot {\left(\sqrt{\ell}\right)}^{2}}}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}\right)\right)}}\]
    9. Applied times-frac36.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \color{blue}{\frac{{\left(\sqrt{\ell}\right)}^{2}}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{{\left(\sqrt{\ell}\right)}^{2}}{\sqrt[3]{x}}}\right)\right)}}\]
    10. Simplified36.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \color{blue}{\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}}} \cdot \frac{{\left(\sqrt{\ell}\right)}^{2}}{\sqrt[3]{x}}\right)\right)}}\]
    11. Simplified9.2

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \color{blue}{\frac{\ell}{\sqrt[3]{x}}}\right)\right)}}\]

    if -1.6506396057830864e-267 < t < 1.1078784155040597e-245 or 5.50990658974305e-162 < t < 9.046331744575269e+25

    1. Initial program 38.9

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\]
    2. Simplified38.9

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}}\]
    3. Taylor expanded around inf 16.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot {t}^{2} + \left(2 \cdot \frac{{\ell}^{2}}{x} + 4 \cdot \frac{{t}^{2}}{x}\right)}}}\]
    4. Simplified16.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{{\ell}^{2}}{x}\right)\right)}}}\]
    5. Using strategy rm
    6. Applied unpow216.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right)\right)}}\]
    7. Applied associate-/l*12.6

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \color{blue}{\frac{\ell}{\frac{x}{\ell}}}\right)\right)}}\]

    if 1.1078784155040597e-245 < t < 5.50990658974305e-162 or 9.046331744575269e+25 < t

    1. Initial program 47.1

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\]
    2. Simplified47.1

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x - 1}, \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right), -\ell \cdot \ell\right)}}}\]
    3. Taylor expanded around inf 10.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \left(\sqrt{2} \cdot t + 2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}}\right)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}}\]
    4. Simplified10.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, \mathsf{fma}\left(\sqrt{2}, t, 2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}}\right)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification9.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.45871046711995538 \cdot 10^{125}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le -9.22209258437025154 \cdot 10^{-219}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}\right)\right)}}\\ \mathbf{elif}\;t \le -1.6506396057830864 \cdot 10^{-267}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 1.1078784155040597 \cdot 10^{-245} \lor \neg \left(t \le 5.50990658974305019 \cdot 10^{-162}\right) \land t \le 9.0463317445752689 \cdot 10^{25}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, \mathsf{fma}\left(\sqrt{2}, t, 2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}}\right)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019195 +o rules:numerics
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))