Average Error: 42.5 → 8.9
Time: 47.0s
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.3433794278040432 \cdot 10^{+67}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)}\\ \mathbf{elif}\;t \le 8.264925603641206 \cdot 10^{-260}:\\ \;\;\;\;\frac{\left(\sqrt{\sqrt[3]{\sqrt{2}}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)\right) \cdot \sqrt{\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}}}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{elif}\;t \le 3.464075321521421 \cdot 10^{-166}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x}, \sqrt{2} \cdot t\right) - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.4994412213892464 \cdot 10^{+108}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x}, \sqrt{2} \cdot t\right) - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\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.3433794278040432 \cdot 10^{+67}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)}\\

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r1190746 = 2.0;
        double r1190747 = sqrt(r1190746);
        double r1190748 = t;
        double r1190749 = r1190747 * r1190748;
        double r1190750 = x;
        double r1190751 = 1.0;
        double r1190752 = r1190750 + r1190751;
        double r1190753 = r1190750 - r1190751;
        double r1190754 = r1190752 / r1190753;
        double r1190755 = l;
        double r1190756 = r1190755 * r1190755;
        double r1190757 = r1190748 * r1190748;
        double r1190758 = r1190746 * r1190757;
        double r1190759 = r1190756 + r1190758;
        double r1190760 = r1190754 * r1190759;
        double r1190761 = r1190760 - r1190756;
        double r1190762 = sqrt(r1190761);
        double r1190763 = r1190749 / r1190762;
        return r1190763;
}

double f(double x, double l, double t) {
        double r1190764 = t;
        double r1190765 = -2.3433794278040432e+67;
        bool r1190766 = r1190764 <= r1190765;
        double r1190767 = 2.0;
        double r1190768 = sqrt(r1190767);
        double r1190769 = r1190768 * r1190764;
        double r1190770 = r1190764 / r1190768;
        double r1190771 = x;
        double r1190772 = r1190771 * r1190771;
        double r1190773 = r1190770 / r1190772;
        double r1190774 = r1190770 / r1190771;
        double r1190775 = r1190767 / r1190771;
        double r1190776 = r1190775 * r1190774;
        double r1190777 = fma(r1190774, r1190767, r1190776);
        double r1190778 = fma(r1190764, r1190768, r1190777);
        double r1190779 = r1190773 - r1190778;
        double r1190780 = r1190769 / r1190779;
        double r1190781 = 8.264925603641206e-260;
        bool r1190782 = r1190764 <= r1190781;
        double r1190783 = cbrt(r1190768);
        double r1190784 = sqrt(r1190783);
        double r1190785 = sqrt(r1190768);
        double r1190786 = r1190764 * r1190785;
        double r1190787 = r1190784 * r1190786;
        double r1190788 = r1190783 * r1190783;
        double r1190789 = sqrt(r1190788);
        double r1190790 = r1190787 * r1190789;
        double r1190791 = l;
        double r1190792 = r1190771 / r1190791;
        double r1190793 = r1190791 / r1190792;
        double r1190794 = fma(r1190764, r1190764, r1190793);
        double r1190795 = 4.0;
        double r1190796 = r1190764 * r1190795;
        double r1190797 = r1190764 * r1190796;
        double r1190798 = r1190797 / r1190771;
        double r1190799 = fma(r1190767, r1190794, r1190798);
        double r1190800 = sqrt(r1190799);
        double r1190801 = r1190790 / r1190800;
        double r1190802 = 3.464075321521421e-166;
        bool r1190803 = r1190764 <= r1190802;
        double r1190804 = r1190767 / r1190772;
        double r1190805 = fma(r1190767, r1190774, r1190769);
        double r1190806 = r1190805 - r1190773;
        double r1190807 = fma(r1190804, r1190770, r1190806);
        double r1190808 = r1190769 / r1190807;
        double r1190809 = 1.4994412213892464e+108;
        bool r1190810 = r1190764 <= r1190809;
        double r1190811 = r1190769 / r1190800;
        double r1190812 = r1190810 ? r1190811 : r1190808;
        double r1190813 = r1190803 ? r1190808 : r1190812;
        double r1190814 = r1190782 ? r1190801 : r1190813;
        double r1190815 = r1190766 ? r1190780 : r1190814;
        return r1190815;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -2.3433794278040432e+67

    1. Initial program 46.7

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

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

    if -2.3433794278040432e+67 < t < 8.264925603641206e-260

    1. Initial program 41.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 18.5

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

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

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

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

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

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

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

    if 8.264925603641206e-260 < t < 3.464075321521421e-166 or 1.4994412213892464e+108 < t

    1. Initial program 53.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 10.1

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

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

    if 3.464075321521421e-166 < t < 1.4994412213892464e+108

    1. Initial program 27.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 10.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.3433794278040432 \cdot 10^{+67}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)}\\ \mathbf{elif}\;t \le 8.264925603641206 \cdot 10^{-260}:\\ \;\;\;\;\frac{\left(\sqrt{\sqrt[3]{\sqrt{2}}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)\right) \cdot \sqrt{\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}}}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{elif}\;t \le 3.464075321521421 \cdot 10^{-166}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x}, \sqrt{2} \cdot t\right) - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.4994412213892464 \cdot 10^{+108}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x}, \sqrt{2} \cdot t\right) - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \end{array}\]

Reproduce

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