Average Error: 43.3 → 9.4
Time: 9.4s
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.09314035729689678 \cdot 10^{118}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\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)\right)\right)}\\ \mathbf{elif}\;t \le -7.0895915203531395 \cdot 10^{-211}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\frac{\left|\ell\right|}{\sqrt[3]{x}}}{\sqrt[3]{x}} \cdot \frac{\left|\ell\right|}{\sqrt[3]{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -9.1577416971198005 \cdot 10^{-244}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\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)\right)\right)}\\ \mathbf{elif}\;t \le 4.8080161767920681 \cdot 10^{61}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\frac{\left|\ell\right|}{\sqrt[3]{x}}}{\sqrt[3]{x}} \cdot \frac{\left|\ell\right|}{\sqrt[3]{x}}, 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}, t \cdot \sqrt{2} - 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.09314035729689678 \cdot 10^{118}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\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)\right)\right)}\\

\mathbf{elif}\;t \le -7.0895915203531395 \cdot 10^{-211}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\frac{\left|\ell\right|}{\sqrt[3]{x}}}{\sqrt[3]{x}} \cdot \frac{\left|\ell\right|}{\sqrt[3]{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\

\mathbf{elif}\;t \le -9.1577416971198005 \cdot 10^{-244}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\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)\right)\right)}\\

\mathbf{elif}\;t \le 4.8080161767920681 \cdot 10^{61}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\frac{\left|\ell\right|}{\sqrt[3]{x}}}{\sqrt[3]{x}} \cdot \frac{\left|\ell\right|}{\sqrt[3]{x}}, 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}, t \cdot \sqrt{2} - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\

\end{array}
double f(double x, double l, double t) {
        double r39906 = 2.0;
        double r39907 = sqrt(r39906);
        double r39908 = t;
        double r39909 = r39907 * r39908;
        double r39910 = x;
        double r39911 = 1.0;
        double r39912 = r39910 + r39911;
        double r39913 = r39910 - r39911;
        double r39914 = r39912 / r39913;
        double r39915 = l;
        double r39916 = r39915 * r39915;
        double r39917 = r39908 * r39908;
        double r39918 = r39906 * r39917;
        double r39919 = r39916 + r39918;
        double r39920 = r39914 * r39919;
        double r39921 = r39920 - r39916;
        double r39922 = sqrt(r39921);
        double r39923 = r39909 / r39922;
        return r39923;
}

double f(double x, double l, double t) {
        double r39924 = t;
        double r39925 = -3.093140357296897e+118;
        bool r39926 = r39924 <= r39925;
        double r39927 = 2.0;
        double r39928 = sqrt(r39927);
        double r39929 = r39928 * r39924;
        double r39930 = 3.0;
        double r39931 = pow(r39928, r39930);
        double r39932 = x;
        double r39933 = 2.0;
        double r39934 = pow(r39932, r39933);
        double r39935 = r39931 * r39934;
        double r39936 = r39924 / r39935;
        double r39937 = r39928 * r39934;
        double r39938 = r39924 / r39937;
        double r39939 = r39928 * r39932;
        double r39940 = r39924 / r39939;
        double r39941 = r39924 * r39928;
        double r39942 = fma(r39927, r39940, r39941);
        double r39943 = fma(r39927, r39938, r39942);
        double r39944 = -r39943;
        double r39945 = fma(r39927, r39936, r39944);
        double r39946 = r39929 / r39945;
        double r39947 = -7.0895915203531395e-211;
        bool r39948 = r39924 <= r39947;
        double r39949 = pow(r39924, r39933);
        double r39950 = l;
        double r39951 = fabs(r39950);
        double r39952 = cbrt(r39932);
        double r39953 = r39951 / r39952;
        double r39954 = r39953 / r39952;
        double r39955 = r39954 * r39953;
        double r39956 = 4.0;
        double r39957 = r39949 / r39932;
        double r39958 = r39956 * r39957;
        double r39959 = fma(r39927, r39955, r39958);
        double r39960 = fma(r39927, r39949, r39959);
        double r39961 = sqrt(r39960);
        double r39962 = r39929 / r39961;
        double r39963 = -9.1577416971198e-244;
        bool r39964 = r39924 <= r39963;
        double r39965 = 4.808016176792068e+61;
        bool r39966 = r39924 <= r39965;
        double r39967 = r39927 * r39936;
        double r39968 = r39941 - r39967;
        double r39969 = fma(r39927, r39940, r39968);
        double r39970 = r39929 / r39969;
        double r39971 = r39966 ? r39962 : r39970;
        double r39972 = r39964 ? r39946 : r39971;
        double r39973 = r39948 ? r39962 : r39972;
        double r39974 = r39926 ? r39946 : r39973;
        return r39974;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -3.093140357296897e+118 or -7.0895915203531395e-211 < t < -9.1577416971198e-244

    1. Initial program 55.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.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}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\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)\right)\right)}}\]

    if -3.093140357296897e+118 < t < -7.0895915203531395e-211 or -9.1577416971198e-244 < t < 4.808016176792068e+61

    1. Initial program 38.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 17.7

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

      \[\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 add-cube-cbrt17.8

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\color{blue}{\sqrt{{\ell}^{2}} \cdot \sqrt{{\ell}^{2}}}}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    7. Applied times-frac17.8

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

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

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

    if 4.808016176792068e+61 < t

    1. Initial program 45.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 44.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. Simplified44.8

      \[\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 add-cube-cbrt44.8

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\color{blue}{\sqrt{{\ell}^{2}} \cdot \sqrt{{\ell}^{2}}}}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    7. Applied times-frac44.8

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\frac{\left|\ell\right|}{\sqrt[3]{x}}}{\sqrt[3]{x}} \cdot \color{blue}{\frac{\left|\ell\right|}{\sqrt[3]{x}}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    10. Taylor expanded around inf 4.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.09314035729689678 \cdot 10^{118}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\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)\right)\right)}\\ \mathbf{elif}\;t \le -7.0895915203531395 \cdot 10^{-211}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\frac{\left|\ell\right|}{\sqrt[3]{x}}}{\sqrt[3]{x}} \cdot \frac{\left|\ell\right|}{\sqrt[3]{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -9.1577416971198005 \cdot 10^{-244}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\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)\right)\right)}\\ \mathbf{elif}\;t \le 4.8080161767920681 \cdot 10^{61}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\frac{\left|\ell\right|}{\sqrt[3]{x}}}{\sqrt[3]{x}} \cdot \frac{\left|\ell\right|}{\sqrt[3]{x}}, 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}, t \cdot \sqrt{2} - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2020020 +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)))))