Average Error: 42.9 → 9.7
Time: 11.5s
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 -9.41594804022456492 \cdot 10^{151}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le -5.73268587435871717 \cdot 10^{-164}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{1}}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -3.10938225222642598 \cdot 10^{-187}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.2204418831474139 \cdot 10^{-17}:\\ \;\;\;\;\frac{\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{1}}{\frac{x}{\ell}}, 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 -9.41594804022456492 \cdot 10^{151}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\

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

\mathbf{elif}\;t \le -3.10938225222642598 \cdot 10^{-187}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\

\mathbf{elif}\;t \le 1.2204418831474139 \cdot 10^{-17}:\\
\;\;\;\;\frac{\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{1}}{\frac{x}{\ell}}, 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 r38730 = 2.0;
        double r38731 = sqrt(r38730);
        double r38732 = t;
        double r38733 = r38731 * r38732;
        double r38734 = x;
        double r38735 = 1.0;
        double r38736 = r38734 + r38735;
        double r38737 = r38734 - r38735;
        double r38738 = r38736 / r38737;
        double r38739 = l;
        double r38740 = r38739 * r38739;
        double r38741 = r38732 * r38732;
        double r38742 = r38730 * r38741;
        double r38743 = r38740 + r38742;
        double r38744 = r38738 * r38743;
        double r38745 = r38744 - r38740;
        double r38746 = sqrt(r38745);
        double r38747 = r38733 / r38746;
        return r38747;
}

double f(double x, double l, double t) {
        double r38748 = t;
        double r38749 = -9.415948040224565e+151;
        bool r38750 = r38748 <= r38749;
        double r38751 = 2.0;
        double r38752 = sqrt(r38751);
        double r38753 = r38752 * r38748;
        double r38754 = r38748 * r38752;
        double r38755 = x;
        double r38756 = r38752 * r38755;
        double r38757 = r38748 / r38756;
        double r38758 = r38751 * r38757;
        double r38759 = r38754 + r38758;
        double r38760 = -r38759;
        double r38761 = r38753 / r38760;
        double r38762 = -5.732685874358717e-164;
        bool r38763 = r38748 <= r38762;
        double r38764 = sqrt(r38752);
        double r38765 = r38764 * r38748;
        double r38766 = r38764 * r38765;
        double r38767 = 2.0;
        double r38768 = pow(r38748, r38767);
        double r38769 = l;
        double r38770 = 1.0;
        double r38771 = pow(r38769, r38770);
        double r38772 = r38755 / r38769;
        double r38773 = r38771 / r38772;
        double r38774 = 4.0;
        double r38775 = r38768 / r38755;
        double r38776 = r38774 * r38775;
        double r38777 = fma(r38751, r38773, r38776);
        double r38778 = fma(r38751, r38768, r38777);
        double r38779 = sqrt(r38778);
        double r38780 = r38766 / r38779;
        double r38781 = -3.109382252226426e-187;
        bool r38782 = r38748 <= r38781;
        double r38783 = 1.2204418831474139e-17;
        bool r38784 = r38748 <= r38783;
        double r38785 = sqrt(r38764);
        double r38786 = r38785 * r38765;
        double r38787 = r38785 * r38786;
        double r38788 = r38787 / r38779;
        double r38789 = pow(r38755, r38767);
        double r38790 = r38752 * r38789;
        double r38791 = r38748 / r38790;
        double r38792 = fma(r38751, r38757, r38754);
        double r38793 = 3.0;
        double r38794 = pow(r38752, r38793);
        double r38795 = r38794 * r38789;
        double r38796 = r38748 / r38795;
        double r38797 = r38751 * r38796;
        double r38798 = r38792 - r38797;
        double r38799 = fma(r38751, r38791, r38798);
        double r38800 = r38753 / r38799;
        double r38801 = r38784 ? r38788 : r38800;
        double r38802 = r38782 ? r38761 : r38801;
        double r38803 = r38763 ? r38780 : r38802;
        double r38804 = r38750 ? r38761 : r38803;
        return r38804;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -9.415948040224565e+151 or -5.732685874358717e-164 < t < -3.109382252226426e-187

    1. Initial program 61.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 59.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. Simplified59.5

      \[\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. Taylor expanded around -inf 4.9

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

    if -9.415948040224565e+151 < t < -5.732685874358717e-164

    1. Initial program 24.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.4

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

      \[\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 sqr-pow10.4

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

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

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

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

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

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

    if -3.109382252226426e-187 < t < 1.2204418831474139e-17

    1. Initial program 51.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 24.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. Simplified24.2

      \[\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 sqr-pow24.2

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

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

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

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

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

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

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

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

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

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

    if 1.2204418831474139e-17 < t

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

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

      \[\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 4 regimes into one program.
  4. Final simplification9.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -9.41594804022456492 \cdot 10^{151}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le -5.73268587435871717 \cdot 10^{-164}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{1}}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -3.10938225222642598 \cdot 10^{-187}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.2204418831474139 \cdot 10^{-17}:\\ \;\;\;\;\frac{\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{1}}{\frac{x}{\ell}}, 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 2020034 +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)))))