Average Error: 43.3 → 9.6
Time: 29.5s
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 r46069 = 2.0;
        double r46070 = sqrt(r46069);
        double r46071 = t;
        double r46072 = r46070 * r46071;
        double r46073 = x;
        double r46074 = 1.0;
        double r46075 = r46073 + r46074;
        double r46076 = r46073 - r46074;
        double r46077 = r46075 / r46076;
        double r46078 = l;
        double r46079 = r46078 * r46078;
        double r46080 = r46071 * r46071;
        double r46081 = r46069 * r46080;
        double r46082 = r46079 + r46081;
        double r46083 = r46077 * r46082;
        double r46084 = r46083 - r46079;
        double r46085 = sqrt(r46084);
        double r46086 = r46072 / r46085;
        return r46086;
}

double f(double x, double l, double t) {
        double r46087 = t;
        double r46088 = -1.49718669755471e+82;
        bool r46089 = r46087 <= r46088;
        double r46090 = 2.0;
        double r46091 = sqrt(r46090);
        double r46092 = r46091 * r46087;
        double r46093 = x;
        double r46094 = 2.0;
        double r46095 = pow(r46093, r46094);
        double r46096 = r46087 / r46095;
        double r46097 = r46090 * r46091;
        double r46098 = r46090 / r46097;
        double r46099 = r46090 / r46091;
        double r46100 = r46098 - r46099;
        double r46101 = r46096 * r46100;
        double r46102 = r46091 * r46093;
        double r46103 = r46087 / r46102;
        double r46104 = r46087 * r46091;
        double r46105 = fma(r46090, r46103, r46104);
        double r46106 = r46101 - r46105;
        double r46107 = r46092 / r46106;
        double r46108 = -7.265062434046063e-166;
        bool r46109 = r46087 <= r46108;
        double r46110 = l;
        double r46111 = r46093 / r46110;
        double r46112 = r46110 / r46111;
        double r46113 = fma(r46087, r46087, r46112);
        double r46114 = sqrt(r46113);
        double r46115 = r46114 * r46114;
        double r46116 = 4.0;
        double r46117 = pow(r46087, r46094);
        double r46118 = r46117 / r46093;
        double r46119 = r46116 * r46118;
        double r46120 = fma(r46090, r46115, r46119);
        double r46121 = sqrt(r46120);
        double r46122 = r46092 / r46121;
        double r46123 = -3.6001123721869805e-276;
        bool r46124 = r46087 <= r46123;
        double r46125 = 6.84155195153334e+60;
        bool r46126 = r46087 <= r46125;
        double r46127 = fma(r46090, r46113, r46119);
        double r46128 = sqrt(r46127);
        double r46129 = r46092 / r46128;
        double r46130 = r46105 - r46101;
        double r46131 = r46092 / r46130;
        double r46132 = r46126 ? r46129 : r46131;
        double r46133 = r46124 ? r46107 : r46132;
        double r46134 = r46109 ? r46122 : r46133;
        double r46135 = r46089 ? r46107 : r46134;
        return r46135;
}

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)))))