Average Error: 43.1 → 10.1
Time: 30.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 -2.303460822673397315215412157251637183073 \cdot 10^{149}:\\ \;\;\;\;\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.230065150000774851732639496826971723637 \cdot 10^{-149}:\\ \;\;\;\;\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{elif}\;t \le -4.303938162079978611630039682650481103959 \cdot 10^{-243}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 3.190616919639676067581902350380230729983 \cdot 10^{-45}:\\ \;\;\;\;\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.303460822673397315215412157251637183073 \cdot 10^{149}:\\
\;\;\;\;\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.230065150000774851732639496826971723637 \cdot 10^{-149}:\\
\;\;\;\;\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{elif}\;t \le -4.303938162079978611630039682650481103959 \cdot 10^{-243}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\

\mathbf{elif}\;t \le 3.190616919639676067581902350380230729983 \cdot 10^{-45}:\\
\;\;\;\;\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 r37361 = 2.0;
        double r37362 = sqrt(r37361);
        double r37363 = t;
        double r37364 = r37362 * r37363;
        double r37365 = x;
        double r37366 = 1.0;
        double r37367 = r37365 + r37366;
        double r37368 = r37365 - r37366;
        double r37369 = r37367 / r37368;
        double r37370 = l;
        double r37371 = r37370 * r37370;
        double r37372 = r37363 * r37363;
        double r37373 = r37361 * r37372;
        double r37374 = r37371 + r37373;
        double r37375 = r37369 * r37374;
        double r37376 = r37375 - r37371;
        double r37377 = sqrt(r37376);
        double r37378 = r37364 / r37377;
        return r37378;
}

double f(double x, double l, double t) {
        double r37379 = t;
        double r37380 = -2.3034608226733973e+149;
        bool r37381 = r37379 <= r37380;
        double r37382 = 2.0;
        double r37383 = sqrt(r37382);
        double r37384 = r37383 * r37379;
        double r37385 = x;
        double r37386 = r37383 * r37385;
        double r37387 = r37379 / r37386;
        double r37388 = r37382 * r37387;
        double r37389 = fma(r37379, r37383, r37388);
        double r37390 = -r37389;
        double r37391 = r37384 / r37390;
        double r37392 = -1.2300651500007749e-149;
        bool r37393 = r37379 <= r37392;
        double r37394 = l;
        double r37395 = r37394 / r37385;
        double r37396 = r37394 * r37395;
        double r37397 = fma(r37379, r37379, r37396);
        double r37398 = sqrt(r37397);
        double r37399 = r37398 * r37398;
        double r37400 = 4.0;
        double r37401 = 2.0;
        double r37402 = pow(r37379, r37401);
        double r37403 = r37402 / r37385;
        double r37404 = r37400 * r37403;
        double r37405 = fma(r37382, r37399, r37404);
        double r37406 = sqrt(r37405);
        double r37407 = r37384 / r37406;
        double r37408 = -4.3039381620799786e-243;
        bool r37409 = r37379 <= r37408;
        double r37410 = 3.190616919639676e-45;
        bool r37411 = r37379 <= r37410;
        double r37412 = r37384 / r37389;
        double r37413 = r37411 ? r37407 : r37412;
        double r37414 = r37409 ? r37391 : r37413;
        double r37415 = r37393 ? r37407 : r37414;
        double r37416 = r37381 ? r37391 : r37415;
        return r37416;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -2.3034608226733973e+149 or -1.2300651500007749e-149 < t < -4.3039381620799786e-243

    1. Initial program 60.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. Simplified60.6

      \[\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 53.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)}}}\]
    4. Simplified53.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)}}}\]
    5. Taylor expanded around -inf 11.1

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

      \[\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.3034608226733973e+149 < t < -1.2300651500007749e-149 or -4.3039381620799786e-243 < t < 3.190616919639676e-45

    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.2

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

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

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

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

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

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

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

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

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

      \[\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 3.190616919639676e-45 < t

    1. Initial program 39.5

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.303460822673397315215412157251637183073 \cdot 10^{149}:\\ \;\;\;\;\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.230065150000774851732639496826971723637 \cdot 10^{-149}:\\ \;\;\;\;\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{elif}\;t \le -4.303938162079978611630039682650481103959 \cdot 10^{-243}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 3.190616919639676067581902350380230729983 \cdot 10^{-45}:\\ \;\;\;\;\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 2019326 +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)))))