Average Error: 42.1 → 9.2
Time: 29.7s
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 -6.215042401537606 \cdot 10^{+109}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{2 \cdot \sqrt{2}}}{x \cdot x} \cdot 2 - \left(\frac{2 \cdot t}{\left(\sqrt{2} \cdot x\right) \cdot x} + \sqrt{2} \cdot t\right)\right) - \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -2.0085308378865194 \cdot 10^{-143}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}}} \cdot \sqrt{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}}}}\\ \mathbf{elif}\;t \le -4.903859847993851 \cdot 10^{-271}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{2 \cdot \sqrt{2}}}{x \cdot x} \cdot 2 - \left(\frac{2 \cdot t}{\left(\sqrt{2} \cdot x\right) \cdot x} + \sqrt{2} \cdot t\right)\right) - \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 1.2558204415951766 \cdot 10^{-249}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{t \cdot t}{x} + \left(t \cdot t + \frac{\ell}{\sqrt[3]{x}} \cdot \frac{\frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}\right) \cdot 2}}\\ \mathbf{elif}\;t \le 5.4024136247167366 \cdot 10^{-161}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2 \cdot t}{\left(\sqrt{2} \cdot x\right) \cdot x} - \frac{\frac{t}{2 \cdot \sqrt{2}}}{x \cdot x} \cdot 2\right) + \left(\frac{2 \cdot t}{\sqrt{2} \cdot x} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le 4.930352686166445 \cdot 10^{+153}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{t \cdot t}{x} + \left(t \cdot t + \frac{\ell}{\sqrt[3]{x}} \cdot \frac{\frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}\right) \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2 \cdot t}{\left(\sqrt{2} \cdot x\right) \cdot x} - \frac{\frac{t}{2 \cdot \sqrt{2}}}{x \cdot x} \cdot 2\right) + \left(\frac{2 \cdot t}{\sqrt{2} \cdot x} + \sqrt{2} \cdot t\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 -6.215042401537606 \cdot 10^{+109}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{2 \cdot \sqrt{2}}}{x \cdot x} \cdot 2 - \left(\frac{2 \cdot t}{\left(\sqrt{2} \cdot x\right) \cdot x} + \sqrt{2} \cdot t\right)\right) - \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\

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

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

\mathbf{elif}\;t \le 1.2558204415951766 \cdot 10^{-249}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{t \cdot t}{x} + \left(t \cdot t + \frac{\ell}{\sqrt[3]{x}} \cdot \frac{\frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}\right) \cdot 2}}\\

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

\mathbf{elif}\;t \le 4.930352686166445 \cdot 10^{+153}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{t \cdot t}{x} + \left(t \cdot t + \frac{\ell}{\sqrt[3]{x}} \cdot \frac{\frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}\right) \cdot 2}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r780829 = 2.0;
        double r780830 = sqrt(r780829);
        double r780831 = t;
        double r780832 = r780830 * r780831;
        double r780833 = x;
        double r780834 = 1.0;
        double r780835 = r780833 + r780834;
        double r780836 = r780833 - r780834;
        double r780837 = r780835 / r780836;
        double r780838 = l;
        double r780839 = r780838 * r780838;
        double r780840 = r780831 * r780831;
        double r780841 = r780829 * r780840;
        double r780842 = r780839 + r780841;
        double r780843 = r780837 * r780842;
        double r780844 = r780843 - r780839;
        double r780845 = sqrt(r780844);
        double r780846 = r780832 / r780845;
        return r780846;
}

double f(double x, double l, double t) {
        double r780847 = t;
        double r780848 = -6.215042401537606e+109;
        bool r780849 = r780847 <= r780848;
        double r780850 = 2.0;
        double r780851 = sqrt(r780850);
        double r780852 = r780851 * r780847;
        double r780853 = r780850 * r780851;
        double r780854 = r780847 / r780853;
        double r780855 = x;
        double r780856 = r780855 * r780855;
        double r780857 = r780854 / r780856;
        double r780858 = r780857 * r780850;
        double r780859 = r780850 * r780847;
        double r780860 = r780851 * r780855;
        double r780861 = r780860 * r780855;
        double r780862 = r780859 / r780861;
        double r780863 = r780862 + r780852;
        double r780864 = r780858 - r780863;
        double r780865 = r780859 / r780860;
        double r780866 = r780864 - r780865;
        double r780867 = r780852 / r780866;
        double r780868 = -2.0085308378865194e-143;
        bool r780869 = r780847 <= r780868;
        double r780870 = l;
        double r780871 = r780870 / r780855;
        double r780872 = r780870 * r780871;
        double r780873 = r780847 * r780847;
        double r780874 = r780872 + r780873;
        double r780875 = r780850 * r780874;
        double r780876 = 4.0;
        double r780877 = r780873 / r780855;
        double r780878 = r780876 * r780877;
        double r780879 = r780875 + r780878;
        double r780880 = sqrt(r780879);
        double r780881 = sqrt(r780880);
        double r780882 = r780881 * r780881;
        double r780883 = r780852 / r780882;
        double r780884 = -4.903859847993851e-271;
        bool r780885 = r780847 <= r780884;
        double r780886 = 1.2558204415951766e-249;
        bool r780887 = r780847 <= r780886;
        double r780888 = cbrt(r780855);
        double r780889 = r780870 / r780888;
        double r780890 = r780889 / r780888;
        double r780891 = r780889 * r780890;
        double r780892 = r780873 + r780891;
        double r780893 = r780892 * r780850;
        double r780894 = r780878 + r780893;
        double r780895 = sqrt(r780894);
        double r780896 = r780852 / r780895;
        double r780897 = 5.4024136247167366e-161;
        bool r780898 = r780847 <= r780897;
        double r780899 = r780862 - r780858;
        double r780900 = r780865 + r780852;
        double r780901 = r780899 + r780900;
        double r780902 = r780852 / r780901;
        double r780903 = 4.930352686166445e+153;
        bool r780904 = r780847 <= r780903;
        double r780905 = r780904 ? r780896 : r780902;
        double r780906 = r780898 ? r780902 : r780905;
        double r780907 = r780887 ? r780896 : r780906;
        double r780908 = r780885 ? r780867 : r780907;
        double r780909 = r780869 ? r780883 : r780908;
        double r780910 = r780849 ? r780867 : r780909;
        return r780910;
}

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 < -6.215042401537606e+109 or -2.0085308378865194e-143 < t < -4.903859847993851e-271

    1. Initial program 54.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 11.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. Simplified11.5

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

    if -6.215042401537606e+109 < t < -2.0085308378865194e-143

    1. Initial program 22.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.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. Simplified9.2

      \[\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. Taylor expanded around 0 9.2

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

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

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

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

    if -4.903859847993851e-271 < t < 1.2558204415951766e-249 or 5.4024136247167366e-161 < t < 4.930352686166445e+153

    1. Initial program 29.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 14.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. Simplified14.2

      \[\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 add-cube-cbrt14.3

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

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

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

    if 1.2558204415951766e-249 < t < 5.4024136247167366e-161 or 4.930352686166445e+153 < t

    1. Initial program 61.8

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -6.215042401537606 \cdot 10^{+109}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{2 \cdot \sqrt{2}}}{x \cdot x} \cdot 2 - \left(\frac{2 \cdot t}{\left(\sqrt{2} \cdot x\right) \cdot x} + \sqrt{2} \cdot t\right)\right) - \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -2.0085308378865194 \cdot 10^{-143}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}}} \cdot \sqrt{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right) + 4 \cdot \frac{t \cdot t}{x}}}}\\ \mathbf{elif}\;t \le -4.903859847993851 \cdot 10^{-271}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{2 \cdot \sqrt{2}}}{x \cdot x} \cdot 2 - \left(\frac{2 \cdot t}{\left(\sqrt{2} \cdot x\right) \cdot x} + \sqrt{2} \cdot t\right)\right) - \frac{2 \cdot t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 1.2558204415951766 \cdot 10^{-249}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{t \cdot t}{x} + \left(t \cdot t + \frac{\ell}{\sqrt[3]{x}} \cdot \frac{\frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}\right) \cdot 2}}\\ \mathbf{elif}\;t \le 5.4024136247167366 \cdot 10^{-161}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2 \cdot t}{\left(\sqrt{2} \cdot x\right) \cdot x} - \frac{\frac{t}{2 \cdot \sqrt{2}}}{x \cdot x} \cdot 2\right) + \left(\frac{2 \cdot t}{\sqrt{2} \cdot x} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le 4.930352686166445 \cdot 10^{+153}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{t \cdot t}{x} + \left(t \cdot t + \frac{\ell}{\sqrt[3]{x}} \cdot \frac{\frac{\ell}{\sqrt[3]{x}}}{\sqrt[3]{x}}\right) \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2 \cdot t}{\left(\sqrt{2} \cdot x\right) \cdot x} - \frac{\frac{t}{2 \cdot \sqrt{2}}}{x \cdot x} \cdot 2\right) + \left(\frac{2 \cdot t}{\sqrt{2} \cdot x} + \sqrt{2} \cdot t\right)}\\ \end{array}\]

Reproduce

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