Average Error: 43.3 → 9.6
Time: 29.8s
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.497186697554710081473314925566838223756 \cdot 10^{82}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{{x}^{2}} \cdot \left(\frac{2}{2 \cdot \sqrt{2}} - \frac{2}{\sqrt{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -7.265062434046062880671280333196464651815 \cdot 10^{-166}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}, 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{elif}\;t \le -3.600112372186980511777207822247642078219 \cdot 10^{-276}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{{x}^{2}} \cdot \left(\frac{2}{2 \cdot \sqrt{2}} - \frac{2}{\sqrt{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 6.841551951533339534532177087886888745651 \cdot 10^{60}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - \frac{t}{{x}^{2}} \cdot \left(\frac{2}{2 \cdot \sqrt{2}} - \frac{2}{\sqrt{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 -1.497186697554710081473314925566838223756 \cdot 10^{82}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{{x}^{2}} \cdot \left(\frac{2}{2 \cdot \sqrt{2}} - \frac{2}{\sqrt{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\

\mathbf{elif}\;t \le -7.265062434046062880671280333196464651815 \cdot 10^{-166}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}, 4 \cdot \frac{{t}^{2}}{x}\right)}}\\

\mathbf{elif}\;t \le -3.600112372186980511777207822247642078219 \cdot 10^{-276}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{{x}^{2}} \cdot \left(\frac{2}{2 \cdot \sqrt{2}} - \frac{2}{\sqrt{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\

\mathbf{elif}\;t \le 6.841551951533339534532177087886888745651 \cdot 10^{60}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - \frac{t}{{x}^{2}} \cdot \left(\frac{2}{2 \cdot \sqrt{2}} - \frac{2}{\sqrt{2}}\right)}\\

\end{array}
double f(double x, double l, double t) {
        double r45962 = 2.0;
        double r45963 = sqrt(r45962);
        double r45964 = t;
        double r45965 = r45963 * r45964;
        double r45966 = x;
        double r45967 = 1.0;
        double r45968 = r45966 + r45967;
        double r45969 = r45966 - r45967;
        double r45970 = r45968 / r45969;
        double r45971 = l;
        double r45972 = r45971 * r45971;
        double r45973 = r45964 * r45964;
        double r45974 = r45962 * r45973;
        double r45975 = r45972 + r45974;
        double r45976 = r45970 * r45975;
        double r45977 = r45976 - r45972;
        double r45978 = sqrt(r45977);
        double r45979 = r45965 / r45978;
        return r45979;
}

double f(double x, double l, double t) {
        double r45980 = t;
        double r45981 = -1.49718669755471e+82;
        bool r45982 = r45980 <= r45981;
        double r45983 = 2.0;
        double r45984 = sqrt(r45983);
        double r45985 = r45984 * r45980;
        double r45986 = x;
        double r45987 = 2.0;
        double r45988 = pow(r45986, r45987);
        double r45989 = r45980 / r45988;
        double r45990 = r45983 * r45984;
        double r45991 = r45983 / r45990;
        double r45992 = r45983 / r45984;
        double r45993 = r45991 - r45992;
        double r45994 = r45989 * r45993;
        double r45995 = r45984 * r45986;
        double r45996 = r45980 / r45995;
        double r45997 = r45980 * r45984;
        double r45998 = fma(r45983, r45996, r45997);
        double r45999 = r45994 - r45998;
        double r46000 = r45985 / r45999;
        double r46001 = -7.265062434046063e-166;
        bool r46002 = r45980 <= r46001;
        double r46003 = l;
        double r46004 = r45986 / r46003;
        double r46005 = r46003 / r46004;
        double r46006 = fma(r45980, r45980, r46005);
        double r46007 = sqrt(r46006);
        double r46008 = r46007 * r46007;
        double r46009 = 4.0;
        double r46010 = pow(r45980, r45987);
        double r46011 = r46010 / r45986;
        double r46012 = r46009 * r46011;
        double r46013 = fma(r45983, r46008, r46012);
        double r46014 = sqrt(r46013);
        double r46015 = r45985 / r46014;
        double r46016 = -3.6001123721869805e-276;
        bool r46017 = r45980 <= r46016;
        double r46018 = 6.84155195153334e+60;
        bool r46019 = r45980 <= r46018;
        double r46020 = fma(r45983, r46006, r46012);
        double r46021 = sqrt(r46020);
        double r46022 = r45985 / r46021;
        double r46023 = r45998 - r45994;
        double r46024 = r45985 / r46023;
        double r46025 = r46019 ? r46022 : r46024;
        double r46026 = r46017 ? r46000 : r46025;
        double r46027 = r46002 ? r46015 : r46026;
        double r46028 = r45982 ? r46000 : r46027;
        return r46028;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -1.49718669755471e+82 or -7.265062434046063e-166 < t < -3.6001123721869805e-276

    1. Initial program 52.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 11.4

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

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

    if -1.49718669755471e+82 < t < -7.265062434046063e-166

    1. Initial program 28.3

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{{\ell}^{2}}{x}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}}\]
    4. Using strategy rm
    5. Applied unpow211.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\]
    6. Applied associate-/l*5.4

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \color{blue}{\frac{\ell}{\frac{x}{\ell}}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\]
    7. Using strategy rm
    8. Applied add-sqr-sqrt5.4

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

    if -3.6001123721869805e-276 < t < 6.84155195153334e+60

    1. Initial program 42.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 19.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. Simplified19.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{{\ell}^{2}}{x}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}}\]
    4. Using strategy rm
    5. Applied unpow219.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\color{blue}{\ell \cdot \ell}}{x}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\]
    6. Applied associate-/l*16.0

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

    if 6.84155195153334e+60 < t

    1. Initial program 45.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 3.4

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.497186697554710081473314925566838223756 \cdot 10^{82}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{{x}^{2}} \cdot \left(\frac{2}{2 \cdot \sqrt{2}} - \frac{2}{\sqrt{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -7.265062434046062880671280333196464651815 \cdot 10^{-166}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}, 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{elif}\;t \le -3.600112372186980511777207822247642078219 \cdot 10^{-276}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{{x}^{2}} \cdot \left(\frac{2}{2 \cdot \sqrt{2}} - \frac{2}{\sqrt{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 6.841551951533339534532177087886888745651 \cdot 10^{60}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - \frac{t}{{x}^{2}} \cdot \left(\frac{2}{2 \cdot \sqrt{2}} - \frac{2}{\sqrt{2}}\right)}\\ \end{array}\]

Reproduce

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