Average Error: 43.1 → 11.0
Time: 13.9s
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 -3.489486864712887015990302667998566764533 \cdot 10^{84}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\ \mathbf{elif}\;t \le -2.709461606909830534876722198635777583364 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -1.837898093229335411549911881042127694691 \cdot 10^{-192}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\ \mathbf{elif}\;t \le 3.155486028136924257976948321778373331679 \cdot 10^{-278}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\left|\ell\right|}{\sqrt{x}} \cdot \frac{\left|\ell\right|}{\sqrt{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le 1.96678984226063996280598897990826570745 \cdot 10^{-145}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \mathbf{elif}\;t \le 1.40863433950518242825357667510921118382 \cdot 10^{-71}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{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 -3.489486864712887015990302667998566764533 \cdot 10^{84}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\

\mathbf{elif}\;t \le -2.709461606909830534876722198635777583364 \cdot 10^{-160}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\

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

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

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

\mathbf{elif}\;t \le 1.40863433950518242825357667510921118382 \cdot 10^{-71}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r56387 = 2.0;
        double r56388 = sqrt(r56387);
        double r56389 = t;
        double r56390 = r56388 * r56389;
        double r56391 = x;
        double r56392 = 1.0;
        double r56393 = r56391 + r56392;
        double r56394 = r56391 - r56392;
        double r56395 = r56393 / r56394;
        double r56396 = l;
        double r56397 = r56396 * r56396;
        double r56398 = r56389 * r56389;
        double r56399 = r56387 * r56398;
        double r56400 = r56397 + r56399;
        double r56401 = r56395 * r56400;
        double r56402 = r56401 - r56397;
        double r56403 = sqrt(r56402);
        double r56404 = r56390 / r56403;
        return r56404;
}

double f(double x, double l, double t) {
        double r56405 = t;
        double r56406 = -3.489486864712887e+84;
        bool r56407 = r56405 <= r56406;
        double r56408 = 2.0;
        double r56409 = sqrt(r56408);
        double r56410 = r56409 * r56405;
        double r56411 = 3.0;
        double r56412 = pow(r56409, r56411);
        double r56413 = x;
        double r56414 = 2.0;
        double r56415 = pow(r56413, r56414);
        double r56416 = r56412 * r56415;
        double r56417 = r56405 / r56416;
        double r56418 = r56409 * r56415;
        double r56419 = r56405 / r56418;
        double r56420 = r56409 * r56413;
        double r56421 = r56405 / r56420;
        double r56422 = r56405 * r56409;
        double r56423 = fma(r56408, r56421, r56422);
        double r56424 = fma(r56408, r56419, r56423);
        double r56425 = -r56424;
        double r56426 = fma(r56408, r56417, r56425);
        double r56427 = r56410 / r56426;
        double r56428 = -2.7094616069098305e-160;
        bool r56429 = r56405 <= r56428;
        double r56430 = pow(r56405, r56414);
        double r56431 = l;
        double r56432 = cbrt(r56431);
        double r56433 = r56432 * r56432;
        double r56434 = pow(r56433, r56414);
        double r56435 = pow(r56432, r56414);
        double r56436 = r56413 / r56435;
        double r56437 = r56434 / r56436;
        double r56438 = 4.0;
        double r56439 = r56430 / r56413;
        double r56440 = r56438 * r56439;
        double r56441 = fma(r56408, r56437, r56440);
        double r56442 = fma(r56408, r56430, r56441);
        double r56443 = sqrt(r56442);
        double r56444 = r56410 / r56443;
        double r56445 = -1.8378980932293354e-192;
        bool r56446 = r56405 <= r56445;
        double r56447 = 3.155486028136924e-278;
        bool r56448 = r56405 <= r56447;
        double r56449 = fabs(r56431);
        double r56450 = sqrt(r56413);
        double r56451 = r56449 / r56450;
        double r56452 = r56451 * r56451;
        double r56453 = fma(r56408, r56452, r56440);
        double r56454 = fma(r56408, r56430, r56453);
        double r56455 = sqrt(r56454);
        double r56456 = r56410 / r56455;
        double r56457 = 1.96678984226064e-145;
        bool r56458 = r56405 <= r56457;
        double r56459 = r56408 * r56417;
        double r56460 = r56423 - r56459;
        double r56461 = fma(r56408, r56419, r56460);
        double r56462 = r56410 / r56461;
        double r56463 = 1.4086343395051824e-71;
        bool r56464 = r56405 <= r56463;
        double r56465 = r56464 ? r56444 : r56462;
        double r56466 = r56458 ? r56462 : r56465;
        double r56467 = r56448 ? r56456 : r56466;
        double r56468 = r56446 ? r56427 : r56467;
        double r56469 = r56429 ? r56444 : r56468;
        double r56470 = r56407 ? r56427 : r56469;
        return r56470;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -3.489486864712887e+84 or -2.7094616069098305e-160 < t < -1.8378980932293354e-192

    1. Initial program 50.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 6.3

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

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

    if -3.489486864712887e+84 < t < -2.7094616069098305e-160 or 1.96678984226064e-145 < t < 1.4086343395051824e-71

    1. Initial program 29.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 10.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)}}}\]
    3. Simplified10.0

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

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

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

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

    if -1.8378980932293354e-192 < t < 3.155486028136924e-278

    1. Initial program 63.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. Taylor expanded around inf 30.8

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

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

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

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

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

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

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

    if 3.155486028136924e-278 < t < 1.96678984226064e-145 or 1.4086343395051824e-71 < t

    1. Initial program 42.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. Taylor expanded around inf 12.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.489486864712887015990302667998566764533 \cdot 10^{84}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\ \mathbf{elif}\;t \le -2.709461606909830534876722198635777583364 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -1.837898093229335411549911881042127694691 \cdot 10^{-192}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\ \mathbf{elif}\;t \le 3.155486028136924257976948321778373331679 \cdot 10^{-278}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\left|\ell\right|}{\sqrt{x}} \cdot \frac{\left|\ell\right|}{\sqrt{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le 1.96678984226063996280598897990826570745 \cdot 10^{-145}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \mathbf{elif}\;t \le 1.40863433950518242825357667510921118382 \cdot 10^{-71}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)}^{2}}{\frac{x}{{\left(\sqrt[3]{\ell}\right)}^{2}}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \end{array}\]

Reproduce

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