Average Error: 43.1 → 11.0
Time: 13.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 -3.489486864712887015990302667998566764533 \cdot 10^{84}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -2.709461606909830534876722198635777583364 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}}\\ \mathbf{elif}\;t \le -1.837898093229335411549911881042127694691 \cdot 10^{-192}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 3.155486028136924257976948321778373331679 \cdot 10^{-278}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\left|\ell\right|}{\sqrt{x}} \cdot \frac{\left|\ell\right|}{\sqrt{x}}\right)}}\\ \mathbf{elif}\;t \le 1.96678984226063996280598897990826570745 \cdot 10^{-145}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \mathbf{elif}\;t \le 1.40863433950518242825357667510921118382 \cdot 10^{-71}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 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 -3.489486864712887015990302667998566764533 \cdot 10^{84}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\

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

\mathbf{elif}\;t \le -1.837898093229335411549911881042127694691 \cdot 10^{-192}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r53885 = 2.0;
        double r53886 = sqrt(r53885);
        double r53887 = t;
        double r53888 = r53886 * r53887;
        double r53889 = x;
        double r53890 = 1.0;
        double r53891 = r53889 + r53890;
        double r53892 = r53889 - r53890;
        double r53893 = r53891 / r53892;
        double r53894 = l;
        double r53895 = r53894 * r53894;
        double r53896 = r53887 * r53887;
        double r53897 = r53885 * r53896;
        double r53898 = r53895 + r53897;
        double r53899 = r53893 * r53898;
        double r53900 = r53899 - r53895;
        double r53901 = sqrt(r53900);
        double r53902 = r53888 / r53901;
        return r53902;
}

double f(double x, double l, double t) {
        double r53903 = t;
        double r53904 = -3.489486864712887e+84;
        bool r53905 = r53903 <= r53904;
        double r53906 = 2.0;
        double r53907 = sqrt(r53906);
        double r53908 = r53907 * r53903;
        double r53909 = 3.0;
        double r53910 = pow(r53907, r53909);
        double r53911 = x;
        double r53912 = 2.0;
        double r53913 = pow(r53911, r53912);
        double r53914 = r53910 * r53913;
        double r53915 = r53903 / r53914;
        double r53916 = r53907 * r53913;
        double r53917 = r53903 / r53916;
        double r53918 = r53915 - r53917;
        double r53919 = r53906 * r53918;
        double r53920 = r53919 - r53908;
        double r53921 = r53907 * r53911;
        double r53922 = r53903 / r53921;
        double r53923 = r53906 * r53922;
        double r53924 = r53920 - r53923;
        double r53925 = r53908 / r53924;
        double r53926 = -2.7094616069098305e-160;
        bool r53927 = r53903 <= r53926;
        double r53928 = 4.0;
        double r53929 = pow(r53903, r53912);
        double r53930 = r53929 / r53911;
        double r53931 = r53928 * r53930;
        double r53932 = l;
        double r53933 = cbrt(r53932);
        double r53934 = r53933 * r53933;
        double r53935 = pow(r53934, r53912);
        double r53936 = pow(r53933, r53912);
        double r53937 = r53911 / r53936;
        double r53938 = r53935 / r53937;
        double r53939 = r53929 + r53938;
        double r53940 = r53906 * r53939;
        double r53941 = r53931 + r53940;
        double r53942 = sqrt(r53941);
        double r53943 = r53908 / r53942;
        double r53944 = -1.8378980932293354e-192;
        bool r53945 = r53903 <= r53944;
        double r53946 = 3.155486028136924e-278;
        bool r53947 = r53903 <= r53946;
        double r53948 = fabs(r53932);
        double r53949 = sqrt(r53911);
        double r53950 = r53948 / r53949;
        double r53951 = r53950 * r53950;
        double r53952 = r53929 + r53951;
        double r53953 = r53906 * r53952;
        double r53954 = r53931 + r53953;
        double r53955 = sqrt(r53954);
        double r53956 = r53908 / r53955;
        double r53957 = 1.96678984226064e-145;
        bool r53958 = r53903 <= r53957;
        double r53959 = r53917 + r53922;
        double r53960 = r53906 * r53959;
        double r53961 = r53906 * r53915;
        double r53962 = r53908 - r53961;
        double r53963 = r53960 + r53962;
        double r53964 = r53908 / r53963;
        double r53965 = 1.4086343395051824e-71;
        bool r53966 = r53903 <= r53965;
        double r53967 = r53966 ? r53943 : r53964;
        double r53968 = r53958 ? r53964 : r53967;
        double r53969 = r53947 ? r53956 : r53968;
        double r53970 = r53945 ? r53925 : r53969;
        double r53971 = r53927 ? r53943 : r53970;
        double r53972 = r53905 ? r53925 : r53971;
        return r53972;
}

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 < -3.489486864712887e+84 or -2.7094616069098305e-160 < t < -1.8378980932293354e-192

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

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

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

    if -3.489486864712887e+84 < t < -2.7094616069098305e-160 or 1.96678984226064e-145 < t < 1.4086343395051824e-71

    1. Initial program 29.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 10.0

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\color{blue}{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2} \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}}{x}\right)}}\]
    7. Applied associate-/l*6.5

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

    if -1.8378980932293354e-192 < t < 3.155486028136924e-278

    1. Initial program 63.0

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}\right)}}\]
    6. Applied add-sqr-sqrt30.8

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

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

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

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

    if 3.155486028136924e-278 < t < 1.96678984226064e-145 or 1.4086343395051824e-71 < t

    1. Initial program 42.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 12.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. Simplified12.0

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.489486864712887015990302667998566764533 \cdot 10^{84}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -2.709461606909830534876722198635777583364 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}}\\ \mathbf{elif}\;t \le -1.837898093229335411549911881042127694691 \cdot 10^{-192}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 3.155486028136924257976948321778373331679 \cdot 10^{-278}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\left|\ell\right|}{\sqrt{x}} \cdot \frac{\left|\ell\right|}{\sqrt{x}}\right)}}\\ \mathbf{elif}\;t \le 1.96678984226063996280598897990826570745 \cdot 10^{-145}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \mathbf{elif}\;t \le 1.40863433950518242825357667510921118382 \cdot 10^{-71}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \end{array}\]

Reproduce

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