Average Error: 42.2 → 9.1
Time: 44.6s
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 -6.672844895221041 \cdot 10^{+114}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - \mathsf{fma}\left(t, \left(\sqrt{2}\right), \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right)\right)}\\ \mathbf{elif}\;t \le -4.160066229623769 \cdot 10^{-162}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\left(\mathsf{fma}\left(\left(\frac{\ell}{x}\right), \ell, \left(t \cdot t\right)\right)\right), 2, \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -6.121305619177623 \cdot 10^{-245}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - \mathsf{fma}\left(t, \left(\sqrt{2}\right), \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right)\right)}\\ \mathbf{elif}\;t \le 5.297367434077148 \cdot 10^{-282}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\left(\mathsf{fma}\left(\left(\frac{\ell}{x}\right), \ell, \left(t \cdot t\right)\right)\right), 2, \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right)\right)}}\\ \mathbf{elif}\;t \le 1.3204993393461479 \cdot 10^{-183}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\left(\frac{t}{\sqrt{2} \cdot x}\right), 2, \left(\sqrt{2} \cdot t\right)\right) + \frac{\frac{2}{x}}{x} \cdot \left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right)}\\ \mathbf{elif}\;t \le 8.66496591056846 \cdot 10^{+24}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\left(\mathsf{fma}\left(\left(\frac{\ell}{x}\right), \ell, \left(t \cdot t\right)\right)\right), 2, \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\left(\frac{t}{\sqrt{2} \cdot x}\right), 2, \left(\sqrt{2} \cdot t\right)\right) + \frac{\frac{2}{x}}{x} \cdot \left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{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 -6.672844895221041 \cdot 10^{+114}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - \mathsf{fma}\left(t, \left(\sqrt{2}\right), \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right)\right)}\\

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

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

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r1600803 = 2.0;
        double r1600804 = sqrt(r1600803);
        double r1600805 = t;
        double r1600806 = r1600804 * r1600805;
        double r1600807 = x;
        double r1600808 = 1.0;
        double r1600809 = r1600807 + r1600808;
        double r1600810 = r1600807 - r1600808;
        double r1600811 = r1600809 / r1600810;
        double r1600812 = l;
        double r1600813 = r1600812 * r1600812;
        double r1600814 = r1600805 * r1600805;
        double r1600815 = r1600803 * r1600814;
        double r1600816 = r1600813 + r1600815;
        double r1600817 = r1600811 * r1600816;
        double r1600818 = r1600817 - r1600813;
        double r1600819 = sqrt(r1600818);
        double r1600820 = r1600806 / r1600819;
        return r1600820;
}

double f(double x, double l, double t) {
        double r1600821 = t;
        double r1600822 = -6.672844895221041e+114;
        bool r1600823 = r1600821 <= r1600822;
        double r1600824 = 2.0;
        double r1600825 = sqrt(r1600824);
        double r1600826 = r1600825 * r1600821;
        double r1600827 = 1.0;
        double r1600828 = r1600827 / r1600825;
        double r1600829 = x;
        double r1600830 = r1600829 * r1600829;
        double r1600831 = r1600821 / r1600830;
        double r1600832 = r1600828 * r1600831;
        double r1600833 = r1600824 / r1600825;
        double r1600834 = r1600821 / r1600829;
        double r1600835 = r1600834 + r1600831;
        double r1600836 = r1600833 * r1600835;
        double r1600837 = fma(r1600821, r1600825, r1600836);
        double r1600838 = r1600832 - r1600837;
        double r1600839 = r1600826 / r1600838;
        double r1600840 = -4.160066229623769e-162;
        bool r1600841 = r1600821 <= r1600840;
        double r1600842 = cbrt(r1600825);
        double r1600843 = r1600842 * r1600821;
        double r1600844 = r1600842 * r1600842;
        double r1600845 = r1600843 * r1600844;
        double r1600846 = l;
        double r1600847 = r1600846 / r1600829;
        double r1600848 = r1600821 * r1600821;
        double r1600849 = fma(r1600847, r1600846, r1600848);
        double r1600850 = 4.0;
        double r1600851 = r1600850 * r1600848;
        double r1600852 = r1600851 / r1600829;
        double r1600853 = fma(r1600849, r1600824, r1600852);
        double r1600854 = sqrt(r1600853);
        double r1600855 = r1600845 / r1600854;
        double r1600856 = -6.121305619177623e-245;
        bool r1600857 = r1600821 <= r1600856;
        double r1600858 = 5.297367434077148e-282;
        bool r1600859 = r1600821 <= r1600858;
        double r1600860 = 1.3204993393461479e-183;
        bool r1600861 = r1600821 <= r1600860;
        double r1600862 = r1600825 * r1600829;
        double r1600863 = r1600821 / r1600862;
        double r1600864 = fma(r1600863, r1600824, r1600826);
        double r1600865 = r1600824 / r1600829;
        double r1600866 = r1600865 / r1600829;
        double r1600867 = r1600821 / r1600825;
        double r1600868 = r1600867 / r1600824;
        double r1600869 = r1600867 - r1600868;
        double r1600870 = r1600866 * r1600869;
        double r1600871 = r1600864 + r1600870;
        double r1600872 = r1600826 / r1600871;
        double r1600873 = 8.66496591056846e+24;
        bool r1600874 = r1600821 <= r1600873;
        double r1600875 = r1600874 ? r1600855 : r1600872;
        double r1600876 = r1600861 ? r1600872 : r1600875;
        double r1600877 = r1600859 ? r1600855 : r1600876;
        double r1600878 = r1600857 ? r1600839 : r1600877;
        double r1600879 = r1600841 ? r1600855 : r1600878;
        double r1600880 = r1600823 ? r1600839 : r1600879;
        return r1600880;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -6.672844895221041e+114 or -4.160066229623769e-162 < t < -6.121305619177623e-245

    1. Initial program 55.2

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

      \[\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. Simplified8.5

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

    if -6.672844895221041e+114 < t < -4.160066229623769e-162 or -6.121305619177623e-245 < t < 5.297367434077148e-282 or 1.3204993393461479e-183 < t < 8.66496591056846e+24

    1. Initial program 32.2

      \[\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 13.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. Simplified9.0

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

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

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

    if 5.297367434077148e-282 < t < 1.3204993393461479e-183 or 8.66496591056846e+24 < t

    1. Initial program 45.2

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\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) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}}\]
    3. Simplified9.8

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -6.672844895221041 \cdot 10^{+114}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - \mathsf{fma}\left(t, \left(\sqrt{2}\right), \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right)\right)}\\ \mathbf{elif}\;t \le -4.160066229623769 \cdot 10^{-162}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\left(\mathsf{fma}\left(\left(\frac{\ell}{x}\right), \ell, \left(t \cdot t\right)\right)\right), 2, \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -6.121305619177623 \cdot 10^{-245}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - \mathsf{fma}\left(t, \left(\sqrt{2}\right), \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right)\right)}\\ \mathbf{elif}\;t \le 5.297367434077148 \cdot 10^{-282}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\left(\mathsf{fma}\left(\left(\frac{\ell}{x}\right), \ell, \left(t \cdot t\right)\right)\right), 2, \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right)\right)}}\\ \mathbf{elif}\;t \le 1.3204993393461479 \cdot 10^{-183}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\left(\frac{t}{\sqrt{2} \cdot x}\right), 2, \left(\sqrt{2} \cdot t\right)\right) + \frac{\frac{2}{x}}{x} \cdot \left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right)}\\ \mathbf{elif}\;t \le 8.66496591056846 \cdot 10^{+24}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\left(\mathsf{fma}\left(\left(\frac{\ell}{x}\right), \ell, \left(t \cdot t\right)\right)\right), 2, \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\left(\frac{t}{\sqrt{2} \cdot x}\right), 2, \left(\sqrt{2} \cdot t\right)\right) + \frac{\frac{2}{x}}{x} \cdot \left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2019121 +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)))))