Average Error: 43.3 → 9.6
Time: 29.0s
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 -1.497186697554710081473314925566838223756 \cdot 10^{82}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{{x}^{2}} \cdot \left(\frac{2}{\sqrt{2} \cdot 2} - \frac{2}{\sqrt{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -7.265062434046062880671280333196464651815 \cdot 10^{-166}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left(\sqrt{t \cdot t + \frac{\ell}{\frac{x}{\ell}}} \cdot \sqrt{t \cdot t + \frac{\ell}{\frac{x}{\ell}}}\right)}}\\ \mathbf{elif}\;t \le -3.600112372186980511777207822247642078219 \cdot 10^{-276}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{{x}^{2}} \cdot \left(\frac{2}{\sqrt{2} \cdot 2} - \frac{2}{\sqrt{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 6.841551951533339534532177087886888745651 \cdot 10^{60}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right) - \frac{t}{{x}^{2}} \cdot \left(\frac{2}{\sqrt{2} \cdot 2} - \frac{2}{\sqrt{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 -1.497186697554710081473314925566838223756 \cdot 10^{82}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{{x}^{2}} \cdot \left(\frac{2}{\sqrt{2} \cdot 2} - \frac{2}{\sqrt{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\

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

\mathbf{elif}\;t \le -3.600112372186980511777207822247642078219 \cdot 10^{-276}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{{x}^{2}} \cdot \left(\frac{2}{\sqrt{2} \cdot 2} - \frac{2}{\sqrt{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\

\mathbf{elif}\;t \le 6.841551951533339534532177087886888745651 \cdot 10^{60}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r43500 = 2.0;
        double r43501 = sqrt(r43500);
        double r43502 = t;
        double r43503 = r43501 * r43502;
        double r43504 = x;
        double r43505 = 1.0;
        double r43506 = r43504 + r43505;
        double r43507 = r43504 - r43505;
        double r43508 = r43506 / r43507;
        double r43509 = l;
        double r43510 = r43509 * r43509;
        double r43511 = r43502 * r43502;
        double r43512 = r43500 * r43511;
        double r43513 = r43510 + r43512;
        double r43514 = r43508 * r43513;
        double r43515 = r43514 - r43510;
        double r43516 = sqrt(r43515);
        double r43517 = r43503 / r43516;
        return r43517;
}

double f(double x, double l, double t) {
        double r43518 = t;
        double r43519 = -1.49718669755471e+82;
        bool r43520 = r43518 <= r43519;
        double r43521 = 2.0;
        double r43522 = sqrt(r43521);
        double r43523 = r43522 * r43518;
        double r43524 = x;
        double r43525 = 2.0;
        double r43526 = pow(r43524, r43525);
        double r43527 = r43518 / r43526;
        double r43528 = r43522 * r43521;
        double r43529 = r43521 / r43528;
        double r43530 = r43521 / r43522;
        double r43531 = r43529 - r43530;
        double r43532 = r43527 * r43531;
        double r43533 = r43532 - r43523;
        double r43534 = r43522 * r43524;
        double r43535 = r43518 / r43534;
        double r43536 = r43521 * r43535;
        double r43537 = r43533 - r43536;
        double r43538 = r43523 / r43537;
        double r43539 = -7.265062434046063e-166;
        bool r43540 = r43518 <= r43539;
        double r43541 = 4.0;
        double r43542 = pow(r43518, r43525);
        double r43543 = r43542 / r43524;
        double r43544 = r43541 * r43543;
        double r43545 = r43518 * r43518;
        double r43546 = l;
        double r43547 = r43524 / r43546;
        double r43548 = r43546 / r43547;
        double r43549 = r43545 + r43548;
        double r43550 = sqrt(r43549);
        double r43551 = r43550 * r43550;
        double r43552 = r43521 * r43551;
        double r43553 = r43544 + r43552;
        double r43554 = sqrt(r43553);
        double r43555 = r43523 / r43554;
        double r43556 = -3.6001123721869805e-276;
        bool r43557 = r43518 <= r43556;
        double r43558 = 6.84155195153334e+60;
        bool r43559 = r43518 <= r43558;
        double r43560 = r43521 * r43549;
        double r43561 = r43544 + r43560;
        double r43562 = sqrt(r43561);
        double r43563 = r43523 / r43562;
        double r43564 = r43518 * r43522;
        double r43565 = r43536 + r43564;
        double r43566 = r43565 - r43532;
        double r43567 = r43523 / r43566;
        double r43568 = r43559 ? r43563 : r43567;
        double r43569 = r43557 ? r43538 : r43568;
        double r43570 = r43540 ? r43555 : r43569;
        double r43571 = r43520 ? r43538 : r43570;
        return r43571;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if t < -1.49718669755471e+82 or -7.265062434046063e-166 < t < -3.6001123721869805e-276

    1. Initial program 52.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 11.4

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

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

    if -1.49718669755471e+82 < t < -7.265062434046063e-166

    1. Initial program 28.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 11.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)}}}\]
    3. Simplified11.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left(t \cdot t + \frac{{\ell}^{2}}{x}\right)}}}\]
    4. Using strategy rm
    5. Applied unpow211.1

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

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

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

    if -3.6001123721869805e-276 < t < 6.84155195153334e+60

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left(t \cdot t + \frac{{\ell}^{2}}{x}\right)}}}\]
    4. Using strategy rm
    5. Applied unpow219.7

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

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

    if 6.84155195153334e+60 < t

    1. Initial program 45.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 3.4

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.497186697554710081473314925566838223756 \cdot 10^{82}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{{x}^{2}} \cdot \left(\frac{2}{\sqrt{2} \cdot 2} - \frac{2}{\sqrt{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -7.265062434046062880671280333196464651815 \cdot 10^{-166}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left(\sqrt{t \cdot t + \frac{\ell}{\frac{x}{\ell}}} \cdot \sqrt{t \cdot t + \frac{\ell}{\frac{x}{\ell}}}\right)}}\\ \mathbf{elif}\;t \le -3.600112372186980511777207822247642078219 \cdot 10^{-276}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{t}{{x}^{2}} \cdot \left(\frac{2}{\sqrt{2} \cdot 2} - \frac{2}{\sqrt{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 6.841551951533339534532177087886888745651 \cdot 10^{60}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left(t \cdot t + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right) - \frac{t}{{x}^{2}} \cdot \left(\frac{2}{\sqrt{2} \cdot 2} - \frac{2}{\sqrt{2}}\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2019325 
(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)))))