Average Error: 43.2 → 9.6
Time: 31.3s
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 -2.844233894159641388530429799149212129938 \cdot 10^{80}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le 1.642183381367754509410412778162598210708 \cdot 10^{146}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\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 -2.844233894159641388530429799149212129938 \cdot 10^{80}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\

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

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

\end{array}
double f(double x, double l, double t) {
        double r35230 = 2.0;
        double r35231 = sqrt(r35230);
        double r35232 = t;
        double r35233 = r35231 * r35232;
        double r35234 = x;
        double r35235 = 1.0;
        double r35236 = r35234 + r35235;
        double r35237 = r35234 - r35235;
        double r35238 = r35236 / r35237;
        double r35239 = l;
        double r35240 = r35239 * r35239;
        double r35241 = r35232 * r35232;
        double r35242 = r35230 * r35241;
        double r35243 = r35240 + r35242;
        double r35244 = r35238 * r35243;
        double r35245 = r35244 - r35240;
        double r35246 = sqrt(r35245);
        double r35247 = r35233 / r35246;
        return r35247;
}

double f(double x, double l, double t) {
        double r35248 = t;
        double r35249 = -2.8442338941596414e+80;
        bool r35250 = r35248 <= r35249;
        double r35251 = 2.0;
        double r35252 = sqrt(r35251);
        double r35253 = r35252 * r35248;
        double r35254 = 3.0;
        double r35255 = pow(r35252, r35254);
        double r35256 = x;
        double r35257 = 2.0;
        double r35258 = pow(r35256, r35257);
        double r35259 = r35255 * r35258;
        double r35260 = r35248 / r35259;
        double r35261 = r35252 * r35256;
        double r35262 = r35248 / r35261;
        double r35263 = r35260 - r35262;
        double r35264 = r35251 * r35263;
        double r35265 = r35248 * r35252;
        double r35266 = r35264 - r35265;
        double r35267 = r35253 / r35266;
        double r35268 = 1.6421833813677545e+146;
        bool r35269 = r35248 <= r35268;
        double r35270 = l;
        double r35271 = fabs(r35270);
        double r35272 = r35271 / r35256;
        double r35273 = r35271 * r35272;
        double r35274 = fma(r35248, r35248, r35273);
        double r35275 = 4.0;
        double r35276 = pow(r35248, r35257);
        double r35277 = r35276 / r35256;
        double r35278 = r35275 * r35277;
        double r35279 = fma(r35251, r35274, r35278);
        double r35280 = sqrt(r35279);
        double r35281 = r35253 / r35280;
        double r35282 = r35251 * r35262;
        double r35283 = fma(r35248, r35252, r35282);
        double r35284 = r35253 / r35283;
        double r35285 = r35269 ? r35281 : r35284;
        double r35286 = r35250 ? r35267 : r35285;
        return r35286;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -2.8442338941596414e+80

    1. Initial program 48.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. Simplified48.0

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 47.4

      \[\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)}}}\]
    4. Simplified47.4

      \[\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)}}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity47.4

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

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

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

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

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

      \[\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} + t \cdot \sqrt{2}\right)}}\]
    12. Simplified3.7

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

    if -2.8442338941596414e+80 < t < 1.6421833813677545e+146

    1. Initial program 37.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. Simplified37.3

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x - 1} - \ell \cdot \ell}}}\]
    3. 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)}}}\]
    4. Simplified17.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)}}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity17.7

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

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

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

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

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

    if 1.6421833813677545e+146 < t

    1. Initial program 60.4

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

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 60.9

      \[\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)}}}\]
    4. Simplified60.9

      \[\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)}}}\]
    5. Taylor expanded around inf 2.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}}}\]
    6. Simplified2.3

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.844233894159641388530429799149212129938 \cdot 10^{80}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le 1.642183381367754509410412778162598210708 \cdot 10^{146}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}\right), 4 \cdot \frac{{t}^{2}}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \end{array}\]

Reproduce

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