Average Error: 41.9 → 8.9
Time: 26.1s
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 -1.3258761248569655 \cdot 10^{+101}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot \left(-t\right) + \frac{\frac{\left(-t\right) \cdot 2}{x}}{\sqrt{2}}}\\ \mathbf{elif}\;t \le 7.466234522592741 \cdot 10^{-275}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right) + \frac{t \cdot t}{x} \cdot 4}}\\ \mathbf{elif}\;t \le 3.9773559035809034 \cdot 10^{-165}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2 \cdot t}{x \cdot \sqrt{2}} - \frac{2}{x \cdot x} \cdot \frac{t}{2 \cdot \sqrt{2}}\right) + \left(\sqrt{2} \cdot t + 2 \cdot \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.190119698582846 \cdot 10^{+73}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + 2 \cdot \left(\sqrt{\ell \cdot \frac{\ell}{x} + t \cdot t} \cdot \sqrt{\ell \cdot \frac{\ell}{x} + t \cdot t}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2 \cdot t}{x \cdot \sqrt{2}} - \frac{2}{x \cdot x} \cdot \frac{t}{2 \cdot \sqrt{2}}\right) + \left(\sqrt{2} \cdot t + 2 \cdot \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 -1.3258761248569655 \cdot 10^{+101}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot \left(-t\right) + \frac{\frac{\left(-t\right) \cdot 2}{x}}{\sqrt{2}}}\\

\mathbf{elif}\;t \le 7.466234522592741 \cdot 10^{-275}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right) + \frac{t \cdot t}{x} \cdot 4}}\\

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

\mathbf{elif}\;t \le 1.190119698582846 \cdot 10^{+73}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + 2 \cdot \left(\sqrt{\ell \cdot \frac{\ell}{x} + t \cdot t} \cdot \sqrt{\ell \cdot \frac{\ell}{x} + t \cdot t}\right)}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r565799 = 2.0;
        double r565800 = sqrt(r565799);
        double r565801 = t;
        double r565802 = r565800 * r565801;
        double r565803 = x;
        double r565804 = 1.0;
        double r565805 = r565803 + r565804;
        double r565806 = r565803 - r565804;
        double r565807 = r565805 / r565806;
        double r565808 = l;
        double r565809 = r565808 * r565808;
        double r565810 = r565801 * r565801;
        double r565811 = r565799 * r565810;
        double r565812 = r565809 + r565811;
        double r565813 = r565807 * r565812;
        double r565814 = r565813 - r565809;
        double r565815 = sqrt(r565814);
        double r565816 = r565802 / r565815;
        return r565816;
}

double f(double x, double l, double t) {
        double r565817 = t;
        double r565818 = -1.3258761248569655e+101;
        bool r565819 = r565817 <= r565818;
        double r565820 = 2.0;
        double r565821 = sqrt(r565820);
        double r565822 = r565821 * r565817;
        double r565823 = -r565817;
        double r565824 = r565821 * r565823;
        double r565825 = r565823 * r565820;
        double r565826 = x;
        double r565827 = r565825 / r565826;
        double r565828 = r565827 / r565821;
        double r565829 = r565824 + r565828;
        double r565830 = r565822 / r565829;
        double r565831 = 7.466234522592741e-275;
        bool r565832 = r565817 <= r565831;
        double r565833 = l;
        double r565834 = r565833 / r565826;
        double r565835 = r565833 * r565834;
        double r565836 = r565817 * r565817;
        double r565837 = r565835 + r565836;
        double r565838 = r565820 * r565837;
        double r565839 = r565836 / r565826;
        double r565840 = 4.0;
        double r565841 = r565839 * r565840;
        double r565842 = r565838 + r565841;
        double r565843 = sqrt(r565842);
        double r565844 = r565822 / r565843;
        double r565845 = 3.9773559035809034e-165;
        bool r565846 = r565817 <= r565845;
        double r565847 = r565820 * r565817;
        double r565848 = r565826 * r565821;
        double r565849 = r565847 / r565848;
        double r565850 = r565826 * r565826;
        double r565851 = r565820 / r565850;
        double r565852 = r565820 * r565821;
        double r565853 = r565817 / r565852;
        double r565854 = r565851 * r565853;
        double r565855 = r565849 - r565854;
        double r565856 = r565817 / r565821;
        double r565857 = r565856 / r565850;
        double r565858 = r565820 * r565857;
        double r565859 = r565822 + r565858;
        double r565860 = r565855 + r565859;
        double r565861 = r565822 / r565860;
        double r565862 = 1.190119698582846e+73;
        bool r565863 = r565817 <= r565862;
        double r565864 = sqrt(r565837);
        double r565865 = r565864 * r565864;
        double r565866 = r565820 * r565865;
        double r565867 = r565841 + r565866;
        double r565868 = sqrt(r565867);
        double r565869 = r565822 / r565868;
        double r565870 = r565863 ? r565869 : r565861;
        double r565871 = r565846 ? r565861 : r565870;
        double r565872 = r565832 ? r565844 : r565871;
        double r565873 = r565819 ? r565830 : r565872;
        return r565873;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if t < -1.3258761248569655e+101

    1. Initial program 50.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 50.3

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right) + \frac{t \cdot t}{x} \cdot 4}}}\]
    4. Using strategy rm
    5. Applied associate-/l*49.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \color{blue}{\frac{\ell}{\frac{x}{\ell}}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    6. Taylor expanded around -inf 2.9

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

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

    if -1.3258761248569655e+101 < t < 7.466234522592741e-275

    1. Initial program 37.6

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right) + \frac{t \cdot t}{x} \cdot 4}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity17.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{\color{blue}{1 \cdot x}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    6. Applied times-frac13.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \color{blue}{\frac{\ell}{1} \cdot \frac{\ell}{x}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    7. Simplified13.3

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

    if 7.466234522592741e-275 < t < 3.9773559035809034e-165 or 1.190119698582846e+73 < t

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

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

    if 3.9773559035809034e-165 < t < 1.190119698582846e+73

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{x}\right) + \frac{t \cdot t}{x} \cdot 4}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity9.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \frac{\ell \cdot \ell}{\color{blue}{1 \cdot x}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    6. Applied times-frac4.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \color{blue}{\frac{\ell}{1} \cdot \frac{\ell}{x}}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    7. Simplified4.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(t \cdot t + \color{blue}{\ell} \cdot \frac{\ell}{x}\right) + \frac{t \cdot t}{x} \cdot 4}}\]
    8. Using strategy rm
    9. Applied add-sqr-sqrt4.7

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.3258761248569655 \cdot 10^{+101}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot \left(-t\right) + \frac{\frac{\left(-t\right) \cdot 2}{x}}{\sqrt{2}}}\\ \mathbf{elif}\;t \le 7.466234522592741 \cdot 10^{-275}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right) + \frac{t \cdot t}{x} \cdot 4}}\\ \mathbf{elif}\;t \le 3.9773559035809034 \cdot 10^{-165}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2 \cdot t}{x \cdot \sqrt{2}} - \frac{2}{x \cdot x} \cdot \frac{t}{2 \cdot \sqrt{2}}\right) + \left(\sqrt{2} \cdot t + 2 \cdot \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.190119698582846 \cdot 10^{+73}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{t \cdot t}{x} \cdot 4 + 2 \cdot \left(\sqrt{\ell \cdot \frac{\ell}{x} + t \cdot t} \cdot \sqrt{\ell \cdot \frac{\ell}{x} + t \cdot t}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2 \cdot t}{x \cdot \sqrt{2}} - \frac{2}{x \cdot x} \cdot \frac{t}{2 \cdot \sqrt{2}}\right) + \left(\sqrt{2} \cdot t + 2 \cdot \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2019154 
(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)))))