Average Error: 43.2 → 9.7
Time: 9.3s
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.4044001424157714 \cdot 10^{115}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\ \mathbf{elif}\;t \le -2.8785002221205043 \cdot 10^{-308}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le 6.3004102494834298 \cdot 10^{-163}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \mathbf{elif}\;t \le 2.4398647795198149 \cdot 10^{48}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 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.4044001424157714 \cdot 10^{115}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r40775 = 2.0;
        double r40776 = sqrt(r40775);
        double r40777 = t;
        double r40778 = r40776 * r40777;
        double r40779 = x;
        double r40780 = 1.0;
        double r40781 = r40779 + r40780;
        double r40782 = r40779 - r40780;
        double r40783 = r40781 / r40782;
        double r40784 = l;
        double r40785 = r40784 * r40784;
        double r40786 = r40777 * r40777;
        double r40787 = r40775 * r40786;
        double r40788 = r40785 + r40787;
        double r40789 = r40783 * r40788;
        double r40790 = r40789 - r40785;
        double r40791 = sqrt(r40790);
        double r40792 = r40778 / r40791;
        return r40792;
}

double f(double x, double l, double t) {
        double r40793 = t;
        double r40794 = -2.4044001424157714e+115;
        bool r40795 = r40793 <= r40794;
        double r40796 = 2.0;
        double r40797 = sqrt(r40796);
        double r40798 = r40797 * r40793;
        double r40799 = 3.0;
        double r40800 = pow(r40797, r40799);
        double r40801 = x;
        double r40802 = 2.0;
        double r40803 = pow(r40801, r40802);
        double r40804 = r40800 * r40803;
        double r40805 = r40793 / r40804;
        double r40806 = r40797 * r40803;
        double r40807 = r40793 / r40806;
        double r40808 = r40797 * r40801;
        double r40809 = r40793 / r40808;
        double r40810 = r40793 * r40797;
        double r40811 = fma(r40796, r40809, r40810);
        double r40812 = fma(r40796, r40807, r40811);
        double r40813 = -r40812;
        double r40814 = fma(r40796, r40805, r40813);
        double r40815 = r40798 / r40814;
        double r40816 = -2.8785002221205043e-308;
        bool r40817 = r40793 <= r40816;
        double r40818 = pow(r40793, r40802);
        double r40819 = l;
        double r40820 = cbrt(r40801);
        double r40821 = r40820 * r40820;
        double r40822 = r40819 / r40821;
        double r40823 = r40819 / r40820;
        double r40824 = r40822 * r40823;
        double r40825 = 4.0;
        double r40826 = r40818 / r40801;
        double r40827 = r40825 * r40826;
        double r40828 = fma(r40796, r40824, r40827);
        double r40829 = fma(r40796, r40818, r40828);
        double r40830 = sqrt(r40829);
        double r40831 = r40798 / r40830;
        double r40832 = 6.30041024948343e-163;
        bool r40833 = r40793 <= r40832;
        double r40834 = r40796 * r40805;
        double r40835 = r40811 - r40834;
        double r40836 = fma(r40796, r40807, r40835);
        double r40837 = r40798 / r40836;
        double r40838 = 2.439864779519815e+48;
        bool r40839 = r40793 <= r40838;
        double r40840 = r40839 ? r40831 : r40837;
        double r40841 = r40833 ? r40837 : r40840;
        double r40842 = r40817 ? r40831 : r40841;
        double r40843 = r40795 ? r40815 : r40842;
        return r40843;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -2.4044001424157714e+115

    1. Initial program 52.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 2.9

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

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

    if -2.4044001424157714e+115 < t < -2.8785002221205043e-308 or 6.30041024948343e-163 < t < 2.439864779519815e+48

    1. Initial program 35.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 14.7

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \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}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    8. Applied times-frac37.3

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

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

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

    if -2.8785002221205043e-308 < t < 6.30041024948343e-163 or 2.439864779519815e+48 < t

    1. Initial program 49.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 12.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.4044001424157714 \cdot 10^{115}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\ \mathbf{elif}\;t \le -2.8785002221205043 \cdot 10^{-308}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le 6.3004102494834298 \cdot 10^{-163}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \mathbf{elif}\;t \le 2.4398647795198149 \cdot 10^{48}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \end{array}\]

Reproduce

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