Average Error: 41.8 → 9.1
Time: 25.4s
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 -5.415525381702613 \cdot 10^{+62}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(\sqrt{2}, t, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\ \mathbf{elif}\;t \le 3.4759257316157413 \cdot 10^{-284}:\\ \;\;\;\;\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(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\ \mathbf{elif}\;t \le 9.831366213789788 \cdot 10^{-187}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x} \cdot -2\right)\right)\right)}\\ \mathbf{elif}\;t \le 1.0888219445242733 \cdot 10^{+135}:\\ \;\;\;\;\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(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x} \cdot -2\right)\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 -5.415525381702613 \cdot 10^{+62}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(\sqrt{2}, t, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\

\mathbf{elif}\;t \le 3.4759257316157413 \cdot 10^{-284}:\\
\;\;\;\;\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(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\

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

\mathbf{elif}\;t \le 1.0888219445242733 \cdot 10^{+135}:\\
\;\;\;\;\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(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r392803 = 2.0;
        double r392804 = sqrt(r392803);
        double r392805 = t;
        double r392806 = r392804 * r392805;
        double r392807 = x;
        double r392808 = 1.0;
        double r392809 = r392807 + r392808;
        double r392810 = r392807 - r392808;
        double r392811 = r392809 / r392810;
        double r392812 = l;
        double r392813 = r392812 * r392812;
        double r392814 = r392805 * r392805;
        double r392815 = r392803 * r392814;
        double r392816 = r392813 + r392815;
        double r392817 = r392811 * r392816;
        double r392818 = r392817 - r392813;
        double r392819 = sqrt(r392818);
        double r392820 = r392806 / r392819;
        return r392820;
}

double f(double x, double l, double t) {
        double r392821 = t;
        double r392822 = -5.415525381702613e+62;
        bool r392823 = r392821 <= r392822;
        double r392824 = 2.0;
        double r392825 = sqrt(r392824);
        double r392826 = r392825 * r392821;
        double r392827 = r392824 * r392825;
        double r392828 = r392824 / r392827;
        double r392829 = x;
        double r392830 = r392829 * r392829;
        double r392831 = r392821 / r392830;
        double r392832 = r392824 / r392825;
        double r392833 = r392821 / r392829;
        double r392834 = r392831 * r392832;
        double r392835 = fma(r392825, r392821, r392834);
        double r392836 = fma(r392832, r392833, r392835);
        double r392837 = -r392836;
        double r392838 = fma(r392828, r392831, r392837);
        double r392839 = r392826 / r392838;
        double r392840 = 3.4759257316157413e-284;
        bool r392841 = r392821 <= r392840;
        double r392842 = cbrt(r392825);
        double r392843 = r392842 * r392821;
        double r392844 = r392842 * r392842;
        double r392845 = r392843 * r392844;
        double r392846 = l;
        double r392847 = r392829 / r392846;
        double r392848 = r392846 / r392847;
        double r392849 = r392821 * r392821;
        double r392850 = r392849 / r392829;
        double r392851 = 4.0;
        double r392852 = r392850 * r392851;
        double r392853 = fma(r392849, r392824, r392852);
        double r392854 = fma(r392848, r392824, r392853);
        double r392855 = sqrt(r392854);
        double r392856 = r392845 / r392855;
        double r392857 = 9.831366213789788e-187;
        bool r392858 = r392821 <= r392857;
        double r392859 = r392824 / r392830;
        double r392860 = r392821 / r392825;
        double r392861 = r392824 / r392829;
        double r392862 = r392860 / r392824;
        double r392863 = r392862 / r392830;
        double r392864 = -2.0;
        double r392865 = r392863 * r392864;
        double r392866 = fma(r392861, r392860, r392865);
        double r392867 = fma(r392821, r392825, r392866);
        double r392868 = fma(r392859, r392860, r392867);
        double r392869 = r392826 / r392868;
        double r392870 = 1.0888219445242733e+135;
        bool r392871 = r392821 <= r392870;
        double r392872 = r392871 ? r392856 : r392869;
        double r392873 = r392858 ? r392869 : r392872;
        double r392874 = r392841 ? r392856 : r392873;
        double r392875 = r392823 ? r392839 : r392874;
        return r392875;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -5.415525381702613e+62

    1. Initial program 45.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 3.6

      \[\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. Simplified3.6

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

    if -5.415525381702613e+62 < t < 3.4759257316157413e-284 or 9.831366213789788e-187 < t < 1.0888219445242733e+135

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

      \[\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. Simplified14.9

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

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

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

      \[\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(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, 4 \cdot \frac{t \cdot t}{x}\right)\right)}}\]
    8. Applied associate-*l*10.8

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

    if 3.4759257316157413e-284 < t < 9.831366213789788e-187 or 1.0888219445242733e+135 < t

    1. Initial program 57.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 10.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -5.415525381702613 \cdot 10^{+62}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(\sqrt{2}, t, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\ \mathbf{elif}\;t \le 3.4759257316157413 \cdot 10^{-284}:\\ \;\;\;\;\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(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\ \mathbf{elif}\;t \le 9.831366213789788 \cdot 10^{-187}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x} \cdot -2\right)\right)\right)}\\ \mathbf{elif}\;t \le 1.0888219445242733 \cdot 10^{+135}:\\ \;\;\;\;\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(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x} \cdot -2\right)\right)\right)}\\ \end{array}\]

Reproduce

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