Average Error: 43.3 → 10.6
Time: 34.9s
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 -8.435929301784521604503627472201569663835 \cdot 10^{106}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le -8.68838282607017033593451153364695886961 \cdot 10^{-163}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \frac{4}{\frac{x}{t \cdot t}}}}\\ \mathbf{elif}\;t \le -1.619144312720762822244529648017528882505 \cdot 10^{-287}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le 4.008879664456036295439864906185096395333 \cdot 10^{-293} \lor \neg \left(t \le 8.463507043182295426017842152139754327429 \cdot 10^{-160}\right) \land t \le 730958659336468015611904:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{4}{\frac{x}{t \cdot t}} + \left(\sqrt{\frac{\ell}{x} \cdot \ell + t \cdot t} \cdot \left(\sqrt{\sqrt{\frac{\ell}{x} \cdot \ell + t \cdot t}} \cdot \sqrt{\sqrt{\frac{\ell}{x} \cdot \ell + t \cdot t}}\right)\right) \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t}\\ \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 -8.435929301784521604503627472201569663835 \cdot 10^{106}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\

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

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

\mathbf{elif}\;t \le 4.008879664456036295439864906185096395333 \cdot 10^{-293} \lor \neg \left(t \le 8.463507043182295426017842152139754327429 \cdot 10^{-160}\right) \land t \le 730958659336468015611904:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{4}{\frac{x}{t \cdot t}} + \left(\sqrt{\frac{\ell}{x} \cdot \ell + t \cdot t} \cdot \left(\sqrt{\sqrt{\frac{\ell}{x} \cdot \ell + t \cdot t}} \cdot \sqrt{\sqrt{\frac{\ell}{x} \cdot \ell + t \cdot t}}\right)\right) \cdot 2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t}\\

\end{array}
double f(double x, double l, double t) {
        double r53914 = 2.0;
        double r53915 = sqrt(r53914);
        double r53916 = t;
        double r53917 = r53915 * r53916;
        double r53918 = x;
        double r53919 = 1.0;
        double r53920 = r53918 + r53919;
        double r53921 = r53918 - r53919;
        double r53922 = r53920 / r53921;
        double r53923 = l;
        double r53924 = r53923 * r53923;
        double r53925 = r53916 * r53916;
        double r53926 = r53914 * r53925;
        double r53927 = r53924 + r53926;
        double r53928 = r53922 * r53927;
        double r53929 = r53928 - r53924;
        double r53930 = sqrt(r53929);
        double r53931 = r53917 / r53930;
        return r53931;
}

double f(double x, double l, double t) {
        double r53932 = t;
        double r53933 = -8.435929301784522e+106;
        bool r53934 = r53932 <= r53933;
        double r53935 = 2.0;
        double r53936 = sqrt(r53935);
        double r53937 = r53936 * r53932;
        double r53938 = x;
        double r53939 = r53932 / r53938;
        double r53940 = r53935 / r53936;
        double r53941 = r53939 * r53940;
        double r53942 = r53941 + r53937;
        double r53943 = -r53942;
        double r53944 = r53937 / r53943;
        double r53945 = -8.68838282607017e-163;
        bool r53946 = r53932 <= r53945;
        double r53947 = r53932 * r53932;
        double r53948 = l;
        double r53949 = r53938 / r53948;
        double r53950 = r53948 / r53949;
        double r53951 = r53947 + r53950;
        double r53952 = r53951 * r53935;
        double r53953 = 4.0;
        double r53954 = r53938 / r53947;
        double r53955 = r53953 / r53954;
        double r53956 = r53952 + r53955;
        double r53957 = sqrt(r53956);
        double r53958 = r53937 / r53957;
        double r53959 = -1.6191443127207628e-287;
        bool r53960 = r53932 <= r53959;
        double r53961 = 4.0088796644560363e-293;
        bool r53962 = r53932 <= r53961;
        double r53963 = 8.463507043182295e-160;
        bool r53964 = r53932 <= r53963;
        double r53965 = !r53964;
        double r53966 = 7.30958659336468e+23;
        bool r53967 = r53932 <= r53966;
        bool r53968 = r53965 && r53967;
        bool r53969 = r53962 || r53968;
        double r53970 = r53948 / r53938;
        double r53971 = r53970 * r53948;
        double r53972 = r53971 + r53947;
        double r53973 = sqrt(r53972);
        double r53974 = sqrt(r53973);
        double r53975 = r53974 * r53974;
        double r53976 = r53973 * r53975;
        double r53977 = r53976 * r53935;
        double r53978 = r53955 + r53977;
        double r53979 = sqrt(r53978);
        double r53980 = r53937 / r53979;
        double r53981 = r53937 / r53942;
        double r53982 = r53969 ? r53980 : r53981;
        double r53983 = r53960 ? r53944 : r53982;
        double r53984 = r53946 ? r53958 : r53983;
        double r53985 = r53934 ? r53944 : r53984;
        return r53985;
}

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 < -8.435929301784522e+106 or -8.68838282607017e-163 < t < -1.6191443127207628e-287

    1. Initial program 55.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 46.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. Simplified46.0

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

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

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

    if -8.435929301784522e+106 < t < -8.68838282607017e-163

    1. Initial program 26.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.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. Simplified10.2

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

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

    if -1.6191443127207628e-287 < t < 4.0088796644560363e-293 or 8.463507043182295e-160 < t < 7.30958659336468e+23

    1. Initial program 35.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 13.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. Simplified13.6

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

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

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

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

      \[\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{4}{\frac{x}{t \cdot t}}}}\]
    10. Simplified8.9

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

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

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

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

    if 4.0088796644560363e-293 < t < 8.463507043182295e-160 or 7.30958659336468e+23 < t

    1. Initial program 47.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 38.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. Simplified38.3

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\sqrt{2} \cdot t + 2 \cdot \frac{t}{\sqrt{2} \cdot x}}}\]
    5. Simplified12.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2} + \frac{2}{\sqrt{2}} \cdot \frac{t}{x}}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification10.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -8.435929301784521604503627472201569663835 \cdot 10^{106}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le -8.68838282607017033593451153364695886961 \cdot 10^{-163}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \frac{4}{\frac{x}{t \cdot t}}}}\\ \mathbf{elif}\;t \le -1.619144312720762822244529648017528882505 \cdot 10^{-287}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\left(\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le 4.008879664456036295439864906185096395333 \cdot 10^{-293} \lor \neg \left(t \le 8.463507043182295426017842152139754327429 \cdot 10^{-160}\right) \land t \le 730958659336468015611904:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{4}{\frac{x}{t \cdot t}} + \left(\sqrt{\frac{\ell}{x} \cdot \ell + t \cdot t} \cdot \left(\sqrt{\sqrt{\frac{\ell}{x} \cdot \ell + t \cdot t}} \cdot \sqrt{\sqrt{\frac{\ell}{x} \cdot \ell + t \cdot t}}\right)\right) \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x} \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t}\\ \end{array}\]

Reproduce

herbie shell --seed 2019194 
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))