Average Error: 42.7 → 10.2
Time: 34.5s
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 -8781316784794473.0:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\ \mathbf{elif}\;t \le -3.1340173156713147 \cdot 10^{-226}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)\right)}}}\\ \mathbf{elif}\;t \le -9.131577791002971 \cdot 10^{-250}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\ \mathbf{elif}\;t \le 4.3628481786376754 \cdot 10^{+71}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \left(\frac{\ell}{\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right)\right)} \cdot \frac{\ell}{\sqrt[3]{x}}\right) \cdot 2\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\sqrt{2}, t, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{-2 \cdot \frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}\right)\right)}\\ \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 -8781316784794473.0:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\

\mathbf{elif}\;t \le -3.1340173156713147 \cdot 10^{-226}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)\right)}}}\\

\mathbf{elif}\;t \le -9.131577791002971 \cdot 10^{-250}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\

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

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

\end{array}
double f(double x, double l, double t) {
        double r987825 = 2.0;
        double r987826 = sqrt(r987825);
        double r987827 = t;
        double r987828 = r987826 * r987827;
        double r987829 = x;
        double r987830 = 1.0;
        double r987831 = r987829 + r987830;
        double r987832 = r987829 - r987830;
        double r987833 = r987831 / r987832;
        double r987834 = l;
        double r987835 = r987834 * r987834;
        double r987836 = r987827 * r987827;
        double r987837 = r987825 * r987836;
        double r987838 = r987835 + r987837;
        double r987839 = r987833 * r987838;
        double r987840 = r987839 - r987835;
        double r987841 = sqrt(r987840);
        double r987842 = r987828 / r987841;
        return r987842;
}

double f(double x, double l, double t) {
        double r987843 = t;
        double r987844 = -8781316784794473.0;
        bool r987845 = r987843 <= r987844;
        double r987846 = 2.0;
        double r987847 = sqrt(r987846);
        double r987848 = r987847 * r987843;
        double r987849 = r987843 / r987847;
        double r987850 = r987849 / r987846;
        double r987851 = x;
        double r987852 = r987851 * r987851;
        double r987853 = r987850 / r987852;
        double r987854 = r987846 / r987851;
        double r987855 = r987849 / r987851;
        double r987856 = r987854 * r987855;
        double r987857 = fma(r987843, r987847, r987856);
        double r987858 = fma(r987854, r987849, r987857);
        double r987859 = -r987858;
        double r987860 = fma(r987853, r987846, r987859);
        double r987861 = r987848 / r987860;
        double r987862 = -3.1340173156713147e-226;
        bool r987863 = r987843 <= r987862;
        double r987864 = r987843 * r987843;
        double r987865 = r987864 / r987851;
        double r987866 = 4.0;
        double r987867 = l;
        double r987868 = r987851 / r987867;
        double r987869 = r987867 / r987868;
        double r987870 = r987846 * r987869;
        double r987871 = fma(r987865, r987866, r987870);
        double r987872 = fma(r987846, r987864, r987871);
        double r987873 = sqrt(r987872);
        double r987874 = sqrt(r987873);
        double r987875 = r987874 * r987874;
        double r987876 = r987848 / r987875;
        double r987877 = -9.131577791002971e-250;
        bool r987878 = r987843 <= r987877;
        double r987879 = 4.3628481786376754e+71;
        bool r987880 = r987843 <= r987879;
        double r987881 = cbrt(r987851);
        double r987882 = cbrt(r987881);
        double r987883 = r987882 * r987882;
        double r987884 = r987883 * r987883;
        double r987885 = r987883 * r987884;
        double r987886 = r987867 / r987885;
        double r987887 = r987867 / r987881;
        double r987888 = r987886 * r987887;
        double r987889 = r987888 * r987846;
        double r987890 = fma(r987865, r987866, r987889);
        double r987891 = fma(r987846, r987864, r987890);
        double r987892 = sqrt(r987891);
        double r987893 = r987848 / r987892;
        double r987894 = -2.0;
        double r987895 = r987894 * r987850;
        double r987896 = r987895 / r987852;
        double r987897 = fma(r987854, r987849, r987896);
        double r987898 = fma(r987847, r987843, r987897);
        double r987899 = r987848 / r987898;
        double r987900 = r987880 ? r987893 : r987899;
        double r987901 = r987878 ? r987861 : r987900;
        double r987902 = r987863 ? r987876 : r987901;
        double r987903 = r987845 ? r987861 : r987902;
        return r987903;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -8781316784794473.0 or -3.1340173156713147e-226 < t < -9.131577791002971e-250

    1. Initial program 43.8

      \[\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. Taylor expanded around -inf 7.1

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

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

    if -8781316784794473.0 < t < -3.1340173156713147e-226

    1. Initial program 37.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. Taylor expanded around inf 16.8

      \[\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)}}}\]
    3. Simplified16.8

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\ell \cdot \ell}{x} \cdot 2\right)\right)}}}\]
    4. Using strategy rm
    5. Applied associate-/l*12.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \color{blue}{\frac{\ell}{\frac{x}{\ell}}} \cdot 2\right)\right)}}\]
    6. Using strategy rm
    7. Applied add-sqr-sqrt12.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\ell}{\frac{x}{\ell}} \cdot 2\right)\right)} \cdot \sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\ell}{\frac{x}{\ell}} \cdot 2\right)\right)}}}}\]
    8. Applied sqrt-prod12.1

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

    if -9.131577791002971e-250 < t < 4.3628481786376754e+71

    1. Initial program 41.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. Taylor expanded around inf 20.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)}}}\]
    3. Simplified20.2

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \left(\frac{\ell}{\sqrt[3]{x} \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right)}} \cdot \frac{\ell}{\sqrt[3]{x}}\right) \cdot 2\right)\right)}}\]
    9. Applied add-cube-cbrt16.8

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \left(\frac{\ell}{\color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right)} \cdot \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right)} \cdot \frac{\ell}{\sqrt[3]{x}}\right) \cdot 2\right)\right)}}\]
    10. Applied swap-sqr16.8

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

    if 4.3628481786376754e+71 < t

    1. Initial program 46.3

      \[\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. Taylor expanded around inf 45.3

      \[\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)}}}\]
    3. Simplified45.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\ell \cdot \ell}{x} \cdot 2\right)\right)}}}\]
    4. Using strategy rm
    5. Applied associate-/l*42.9

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -8781316784794473.0:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\ \mathbf{elif}\;t \le -3.1340173156713147 \cdot 10^{-226}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)\right)}}}\\ \mathbf{elif}\;t \le -9.131577791002971 \cdot 10^{-250}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}, 2, -\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)\right)}\\ \mathbf{elif}\;t \le 4.3628481786376754 \cdot 10^{+71}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \left(\frac{\ell}{\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right)\right)} \cdot \frac{\ell}{\sqrt[3]{x}}\right) \cdot 2\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\sqrt{2}, t, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{-2 \cdot \frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x}\right)\right)}\\ \end{array}\]

Reproduce

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