Average Error: 43.3 → 9.2
Time: 26.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 -2.615673507435036296435750238402039962931 \cdot 10^{50}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -6.111047820265303935317690964852722629158 \cdot 10^{-179}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \left(\sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}\right)\right)}}\\ \mathbf{elif}\;t \le -1.323606909102099087479133351528995697428 \cdot 10^{-261}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 1.277987426228136459634363360568383475924 \cdot 10^{119}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \left(\sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2} - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\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 -2.615673507435036296435750238402039962931 \cdot 10^{50}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r44867 = 2.0;
        double r44868 = sqrt(r44867);
        double r44869 = t;
        double r44870 = r44868 * r44869;
        double r44871 = x;
        double r44872 = 1.0;
        double r44873 = r44871 + r44872;
        double r44874 = r44871 - r44872;
        double r44875 = r44873 / r44874;
        double r44876 = l;
        double r44877 = r44876 * r44876;
        double r44878 = r44869 * r44869;
        double r44879 = r44867 * r44878;
        double r44880 = r44877 + r44879;
        double r44881 = r44875 * r44880;
        double r44882 = r44881 - r44877;
        double r44883 = sqrt(r44882);
        double r44884 = r44870 / r44883;
        return r44884;
}

double f(double x, double l, double t) {
        double r44885 = t;
        double r44886 = -2.6156735074350363e+50;
        bool r44887 = r44885 <= r44886;
        double r44888 = 2.0;
        double r44889 = sqrt(r44888);
        double r44890 = r44889 * r44885;
        double r44891 = 3.0;
        double r44892 = pow(r44889, r44891);
        double r44893 = x;
        double r44894 = 2.0;
        double r44895 = pow(r44893, r44894);
        double r44896 = r44892 * r44895;
        double r44897 = r44885 / r44896;
        double r44898 = r44889 * r44895;
        double r44899 = r44885 / r44898;
        double r44900 = r44897 - r44899;
        double r44901 = r44888 * r44900;
        double r44902 = r44889 * r44893;
        double r44903 = r44885 / r44902;
        double r44904 = r44885 * r44889;
        double r44905 = fma(r44888, r44903, r44904);
        double r44906 = r44901 - r44905;
        double r44907 = r44890 / r44906;
        double r44908 = -6.111047820265304e-179;
        bool r44909 = r44885 <= r44908;
        double r44910 = 4.0;
        double r44911 = pow(r44885, r44894);
        double r44912 = r44911 / r44893;
        double r44913 = l;
        double r44914 = r44913 / r44893;
        double r44915 = r44913 * r44914;
        double r44916 = fma(r44885, r44885, r44915);
        double r44917 = sqrt(r44916);
        double r44918 = r44917 * r44917;
        double r44919 = r44888 * r44918;
        double r44920 = fma(r44910, r44912, r44919);
        double r44921 = sqrt(r44920);
        double r44922 = r44890 / r44921;
        double r44923 = -1.323606909102099e-261;
        bool r44924 = r44885 <= r44923;
        double r44925 = 1.2779874262281365e+119;
        bool r44926 = r44885 <= r44925;
        double r44927 = r44899 + r44903;
        double r44928 = r44888 * r44897;
        double r44929 = r44904 - r44928;
        double r44930 = fma(r44888, r44927, r44929);
        double r44931 = r44890 / r44930;
        double r44932 = r44926 ? r44922 : r44931;
        double r44933 = r44924 ? r44907 : r44932;
        double r44934 = r44909 ? r44922 : r44933;
        double r44935 = r44887 ? r44907 : r44934;
        return r44935;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -2.6156735074350363e+50 or -6.111047820265304e-179 < t < -1.323606909102099e-261

    1. Initial program 48.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 9.3

      \[\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(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)\right)}}\]
    3. Simplified9.3

      \[\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}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}}\]

    if -2.6156735074350363e+50 < t < -6.111047820265304e-179 or -1.323606909102099e-261 < t < 1.2779874262281365e+119

    1. Initial program 36.4

      \[\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.1

      \[\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.1

      \[\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)}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity16.1

      \[\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}{1 \cdot x}}\right)\right)}}\]
    6. Applied add-sqr-sqrt39.5

      \[\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}}{1 \cdot x}\right)\right)}}\]
    7. Applied unpow-prod-down39.5

      \[\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}}}{1 \cdot x}\right)\right)}}\]
    8. Applied times-frac37.5

      \[\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}}{1} \cdot \frac{{\left(\sqrt{\ell}\right)}^{2}}{x}}\right)\right)}}\]
    9. Simplified37.5

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

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

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

    if 1.2779874262281365e+119 < t

    1. Initial program 54.6

      \[\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 2.1

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.615673507435036296435750238402039962931 \cdot 10^{50}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -6.111047820265303935317690964852722629158 \cdot 10^{-179}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \left(\sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}\right)\right)}}\\ \mathbf{elif}\;t \le -1.323606909102099087479133351528995697428 \cdot 10^{-261}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 1.277987426228136459634363360568383475924 \cdot 10^{119}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \left(\sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2} - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \end{array}\]

Reproduce

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