Average Error: 43.6 → 10.0
Time: 8.6s
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.70678176523745981 \cdot 10^{109}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 6.4376393902910242 \cdot 10^{-51}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \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) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}\\ \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.70678176523745981 \cdot 10^{109}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}\\

\mathbf{elif}\;t \le 6.4376393902910242 \cdot 10^{-51}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \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) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}\\

\end{array}
double f(double x, double l, double t) {
        double r37547 = 2.0;
        double r37548 = sqrt(r37547);
        double r37549 = t;
        double r37550 = r37548 * r37549;
        double r37551 = x;
        double r37552 = 1.0;
        double r37553 = r37551 + r37552;
        double r37554 = r37551 - r37552;
        double r37555 = r37553 / r37554;
        double r37556 = l;
        double r37557 = r37556 * r37556;
        double r37558 = r37549 * r37549;
        double r37559 = r37547 * r37558;
        double r37560 = r37557 + r37559;
        double r37561 = r37555 * r37560;
        double r37562 = r37561 - r37557;
        double r37563 = sqrt(r37562);
        double r37564 = r37550 / r37563;
        return r37564;
}

double f(double x, double l, double t) {
        double r37565 = t;
        double r37566 = -2.70678176523746e+109;
        bool r37567 = r37565 <= r37566;
        double r37568 = 2.0;
        double r37569 = sqrt(r37568);
        double r37570 = r37569 * r37565;
        double r37571 = 3.0;
        double r37572 = pow(r37569, r37571);
        double r37573 = x;
        double r37574 = 2.0;
        double r37575 = pow(r37573, r37574);
        double r37576 = r37572 * r37575;
        double r37577 = r37565 / r37576;
        double r37578 = r37568 * r37577;
        double r37579 = r37569 * r37573;
        double r37580 = r37565 / r37579;
        double r37581 = r37568 * r37580;
        double r37582 = r37565 * r37569;
        double r37583 = r37581 + r37582;
        double r37584 = r37578 - r37583;
        double r37585 = r37570 / r37584;
        double r37586 = 6.437639390291024e-51;
        bool r37587 = r37565 <= r37586;
        double r37588 = 4.0;
        double r37589 = pow(r37565, r37574);
        double r37590 = r37589 / r37573;
        double r37591 = r37588 * r37590;
        double r37592 = l;
        double r37593 = r37573 / r37592;
        double r37594 = r37592 / r37593;
        double r37595 = r37589 + r37594;
        double r37596 = r37568 * r37595;
        double r37597 = r37591 + r37596;
        double r37598 = sqrt(r37597);
        double r37599 = r37570 / r37598;
        double r37600 = r37583 - r37578;
        double r37601 = r37570 / r37600;
        double r37602 = r37587 ? r37599 : r37601;
        double r37603 = r37567 ? r37585 : r37602;
        return r37603;
}

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 3 regimes
  2. if t < -2.70678176523746e+109

    1. Initial program 52.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 52.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)}}}\]
    3. Simplified52.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{x}\right)}}}\]
    4. Taylor expanded around -inf 2.8

      \[\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} + t \cdot \sqrt{2}\right)}}\]

    if -2.70678176523746e+109 < t < 6.437639390291024e-51

    1. Initial program 42.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 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}^{2} + \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}^{2} + \frac{\color{blue}{\ell \cdot \ell}}{x}\right)}}\]
    6. Applied associate-/l*15.7

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

    if 6.437639390291024e-51 < t

    1. Initial program 39.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 35.2

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{x}\right)}}}\]
    4. Taylor expanded around inf 6.4

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.70678176523745981 \cdot 10^{109}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 6.4376393902910242 \cdot 10^{-51}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \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) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}\\ \end{array}\]

Reproduce

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