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

\mathbf{elif}\;t \le 1.642183381367754509410412778162598210708 \cdot 10^{146}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{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 r36520 = 2.0;
        double r36521 = sqrt(r36520);
        double r36522 = t;
        double r36523 = r36521 * r36522;
        double r36524 = x;
        double r36525 = 1.0;
        double r36526 = r36524 + r36525;
        double r36527 = r36524 - r36525;
        double r36528 = r36526 / r36527;
        double r36529 = l;
        double r36530 = r36529 * r36529;
        double r36531 = r36522 * r36522;
        double r36532 = r36520 * r36531;
        double r36533 = r36530 + r36532;
        double r36534 = r36528 * r36533;
        double r36535 = r36534 - r36530;
        double r36536 = sqrt(r36535);
        double r36537 = r36523 / r36536;
        return r36537;
}

double f(double x, double l, double t) {
        double r36538 = t;
        double r36539 = -2.8442338941596414e+80;
        bool r36540 = r36538 <= r36539;
        double r36541 = 2.0;
        double r36542 = sqrt(r36541);
        double r36543 = r36542 * r36538;
        double r36544 = x;
        double r36545 = r36542 * r36544;
        double r36546 = r36538 / r36545;
        double r36547 = r36541 * r36546;
        double r36548 = fma(r36538, r36542, r36547);
        double r36549 = -r36548;
        double r36550 = r36543 / r36549;
        double r36551 = 1.6421833813677545e+146;
        bool r36552 = r36538 <= r36551;
        double r36553 = l;
        double r36554 = r36553 / r36544;
        double r36555 = r36553 * r36554;
        double r36556 = fma(r36538, r36538, r36555);
        double r36557 = sqrt(r36556);
        double r36558 = r36557 * r36557;
        double r36559 = 4.0;
        double r36560 = 2.0;
        double r36561 = pow(r36538, r36560);
        double r36562 = r36561 / r36544;
        double r36563 = r36559 * r36562;
        double r36564 = fma(r36541, r36558, r36563);
        double r36565 = sqrt(r36564);
        double r36566 = r36543 / r36565;
        double r36567 = r36543 / r36548;
        double r36568 = r36552 ? r36566 : r36567;
        double r36569 = r36540 ? r36550 : r36568;
        return r36569;
}

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. Taylor expanded around -inf 3.7

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

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

    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-sqrt40.9

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \color{blue}{\sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{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}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.642183381367754509410412778162598210708 \cdot 10^{146}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)} \cdot \sqrt{\mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{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)))))