Average Error: 42.1 → 9.0
Time: 43.7s
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.3972712623864903 \cdot 10^{+34}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le -5.1631397836325573 \cdot 10^{-172}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\ \mathbf{elif}\;t \le -2.228350845174889 \cdot 10^{-195}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le 8.566610103260225 \cdot 10^{-208}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\ \mathbf{elif}\;t \le 1.6397433314236832 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x} + (\left(\frac{t}{\sqrt{2} \cdot x}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_*}\\ \mathbf{elif}\;t \le 8.057122643744713 \cdot 10^{+135}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x} + (\left(\frac{t}{\sqrt{2} \cdot x}\right) \cdot 2 + \left(\sqrt{2} \cdot t\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.3972712623864903 \cdot 10^{+34}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\

\mathbf{elif}\;t \le -5.1631397836325573 \cdot 10^{-172}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\

\mathbf{elif}\;t \le -2.228350845174889 \cdot 10^{-195}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\

\mathbf{elif}\;t \le 8.566610103260225 \cdot 10^{-208}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\

\mathbf{elif}\;t \le 1.6397433314236832 \cdot 10^{-160}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x} + (\left(\frac{t}{\sqrt{2} \cdot x}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_*}\\

\mathbf{elif}\;t \le 8.057122643744713 \cdot 10^{+135}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x} + (\left(\frac{t}{\sqrt{2} \cdot x}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_*}\\

\end{array}
double f(double x, double l, double t) {
        double r1582394 = 2.0;
        double r1582395 = sqrt(r1582394);
        double r1582396 = t;
        double r1582397 = r1582395 * r1582396;
        double r1582398 = x;
        double r1582399 = 1.0;
        double r1582400 = r1582398 + r1582399;
        double r1582401 = r1582398 - r1582399;
        double r1582402 = r1582400 / r1582401;
        double r1582403 = l;
        double r1582404 = r1582403 * r1582403;
        double r1582405 = r1582396 * r1582396;
        double r1582406 = r1582394 * r1582405;
        double r1582407 = r1582404 + r1582406;
        double r1582408 = r1582402 * r1582407;
        double r1582409 = r1582408 - r1582404;
        double r1582410 = sqrt(r1582409);
        double r1582411 = r1582397 / r1582410;
        return r1582411;
}

double f(double x, double l, double t) {
        double r1582412 = t;
        double r1582413 = -3.3972712623864903e+34;
        bool r1582414 = r1582412 <= r1582413;
        double r1582415 = 2.0;
        double r1582416 = sqrt(r1582415);
        double r1582417 = r1582416 * r1582412;
        double r1582418 = 1.0;
        double r1582419 = r1582418 / r1582416;
        double r1582420 = x;
        double r1582421 = r1582420 * r1582420;
        double r1582422 = r1582412 / r1582421;
        double r1582423 = r1582419 * r1582422;
        double r1582424 = r1582415 / r1582416;
        double r1582425 = r1582412 / r1582420;
        double r1582426 = r1582425 + r1582422;
        double r1582427 = r1582424 * r1582426;
        double r1582428 = fma(r1582412, r1582416, r1582427);
        double r1582429 = r1582423 - r1582428;
        double r1582430 = r1582417 / r1582429;
        double r1582431 = -5.1631397836325573e-172;
        bool r1582432 = r1582412 <= r1582431;
        double r1582433 = l;
        double r1582434 = r1582433 / r1582420;
        double r1582435 = r1582412 * r1582412;
        double r1582436 = fma(r1582434, r1582433, r1582435);
        double r1582437 = 4.0;
        double r1582438 = r1582435 * r1582437;
        double r1582439 = r1582438 / r1582420;
        double r1582440 = fma(r1582436, r1582415, r1582439);
        double r1582441 = sqrt(r1582440);
        double r1582442 = r1582417 / r1582441;
        double r1582443 = -2.228350845174889e-195;
        bool r1582444 = r1582412 <= r1582443;
        double r1582445 = 8.566610103260225e-208;
        bool r1582446 = r1582412 <= r1582445;
        double r1582447 = sqrt(r1582416);
        double r1582448 = r1582447 * r1582412;
        double r1582449 = r1582447 * r1582448;
        double r1582450 = r1582449 / r1582441;
        double r1582451 = 1.6397433314236832e-160;
        bool r1582452 = r1582412 <= r1582451;
        double r1582453 = r1582412 / r1582416;
        double r1582454 = r1582453 / r1582415;
        double r1582455 = r1582453 - r1582454;
        double r1582456 = r1582415 / r1582420;
        double r1582457 = r1582456 / r1582420;
        double r1582458 = r1582455 * r1582457;
        double r1582459 = r1582416 * r1582420;
        double r1582460 = r1582412 / r1582459;
        double r1582461 = fma(r1582460, r1582415, r1582417);
        double r1582462 = r1582458 + r1582461;
        double r1582463 = r1582417 / r1582462;
        double r1582464 = 8.057122643744713e+135;
        bool r1582465 = r1582412 <= r1582464;
        double r1582466 = r1582465 ? r1582442 : r1582463;
        double r1582467 = r1582452 ? r1582463 : r1582466;
        double r1582468 = r1582446 ? r1582450 : r1582467;
        double r1582469 = r1582444 ? r1582430 : r1582468;
        double r1582470 = r1582432 ? r1582442 : r1582469;
        double r1582471 = r1582414 ? r1582430 : r1582470;
        return r1582471;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -3.3972712623864903e+34 or -5.1631397836325573e-172 < t < -2.228350845174889e-195

    1. Initial program 44.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 6.0

      \[\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(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)\right)}}\]
    3. Simplified6.0

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

    if -3.3972712623864903e+34 < t < -5.1631397836325573e-172 or 1.6397433314236832e-160 < t < 8.057122643744713e+135

    1. Initial program 26.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 10.6

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt5.4

      \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}\right)} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\]
    6. Applied associate-*l*5.4

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot t\right)}}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\]
    7. Taylor expanded around 0 5.4

      \[\leadsto \frac{\color{blue}{t \cdot \sqrt{2}}}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\]

    if -2.228350845174889e-195 < t < 8.566610103260225e-208

    1. Initial program 61.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 30.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. Simplified29.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt29.1

      \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}\right)} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\]
    6. Applied associate-*l*29.1

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot t\right)}}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\]
    7. Taylor expanded around 0 29.1

      \[\leadsto \frac{\color{blue}{t \cdot \sqrt{2}}}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\]
    8. Using strategy rm
    9. Applied add-sqr-sqrt29.2

      \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)}}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\]
    10. Applied associate-*r*29.2

      \[\leadsto \frac{\color{blue}{\left(t \cdot \sqrt{\sqrt{2}}\right) \cdot \sqrt{\sqrt{2}}}}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\]

    if 8.566610103260225e-208 < t < 1.6397433314236832e-160 or 8.057122643744713e+135 < t

    1. Initial program 58.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 7.6

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\frac{\frac{2}{x}}{x} \cdot \left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) + (\left(\frac{t}{\sqrt{2} \cdot x}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_*}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification9.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.3972712623864903 \cdot 10^{+34}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le -5.1631397836325573 \cdot 10^{-172}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\ \mathbf{elif}\;t \le -2.228350845174889 \cdot 10^{-195}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le 8.566610103260225 \cdot 10^{-208}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\ \mathbf{elif}\;t \le 1.6397433314236832 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x} + (\left(\frac{t}{\sqrt{2} \cdot x}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_*}\\ \mathbf{elif}\;t \le 8.057122643744713 \cdot 10^{+135}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x} + (\left(\frac{t}{\sqrt{2} \cdot x}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_*}\\ \end{array}\]

Reproduce

herbie shell --seed 2019112 +o rules:numerics
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  (/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))))