Average Error: 42.8 → 9.1
Time: 27.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 -6.377624199137871 \cdot 10^{+80}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x \cdot \sqrt{2}} \cdot -2 - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 3.3304656260583313 \cdot 10^{+124}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}, 2, \frac{4}{\frac{x}{t \cdot t}}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \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 -6.377624199137871 \cdot 10^{+80}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x \cdot \sqrt{2}} \cdot -2 - \sqrt{2} \cdot t}\\

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

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

\end{array}
double f(double x, double l, double t) {
        double r647540 = 2.0;
        double r647541 = sqrt(r647540);
        double r647542 = t;
        double r647543 = r647541 * r647542;
        double r647544 = x;
        double r647545 = 1.0;
        double r647546 = r647544 + r647545;
        double r647547 = r647544 - r647545;
        double r647548 = r647546 / r647547;
        double r647549 = l;
        double r647550 = r647549 * r647549;
        double r647551 = r647542 * r647542;
        double r647552 = r647540 * r647551;
        double r647553 = r647550 + r647552;
        double r647554 = r647548 * r647553;
        double r647555 = r647554 - r647550;
        double r647556 = sqrt(r647555);
        double r647557 = r647543 / r647556;
        return r647557;
}

double f(double x, double l, double t) {
        double r647558 = t;
        double r647559 = -6.377624199137871e+80;
        bool r647560 = r647558 <= r647559;
        double r647561 = 2.0;
        double r647562 = sqrt(r647561);
        double r647563 = r647562 * r647558;
        double r647564 = x;
        double r647565 = r647564 * r647562;
        double r647566 = r647558 / r647565;
        double r647567 = -2.0;
        double r647568 = r647566 * r647567;
        double r647569 = r647568 - r647563;
        double r647570 = r647563 / r647569;
        double r647571 = 3.3304656260583313e+124;
        bool r647572 = r647558 <= r647571;
        double r647573 = r647558 * r647558;
        double r647574 = l;
        double r647575 = cbrt(r647564);
        double r647576 = r647575 * r647575;
        double r647577 = r647574 / r647576;
        double r647578 = r647574 / r647575;
        double r647579 = r647577 * r647578;
        double r647580 = 4.0;
        double r647581 = r647564 / r647573;
        double r647582 = r647580 / r647581;
        double r647583 = fma(r647579, r647561, r647582);
        double r647584 = fma(r647573, r647561, r647583);
        double r647585 = sqrt(r647584);
        double r647586 = r647563 / r647585;
        double r647587 = r647558 / r647562;
        double r647588 = r647587 / r647564;
        double r647589 = fma(r647588, r647561, r647563);
        double r647590 = r647563 / r647589;
        double r647591 = r647572 ? r647586 : r647590;
        double r647592 = r647560 ? r647570 : r647591;
        return r647592;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -6.377624199137871e+80

    1. Initial program 48.1

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

      \[\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. Simplified47.9

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\frac{\ell \cdot \ell}{x}, 2, \frac{4}{\frac{x}{t \cdot t}}\right)\right)}}}\]
    4. Taylor expanded around -inf 3.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}}\]
    5. Simplified3.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{-2 \cdot \frac{t}{\sqrt{2} \cdot x} - \sqrt{2} \cdot t}}\]

    if -6.377624199137871e+80 < t < 3.3304656260583313e+124

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

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

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

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

    if 3.3304656260583313e+124 < t

    1. Initial program 54.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 54.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. Simplified54.2

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\color{blue}{\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}}, 2, \frac{4}{\frac{x}{t \cdot t}}\right)\right)}}\]
    7. Taylor expanded around inf 2.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}}}\]
    8. Simplified2.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -6.377624199137871 \cdot 10^{+80}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x \cdot \sqrt{2}} \cdot -2 - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 3.3304656260583313 \cdot 10^{+124}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\frac{\ell}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\ell}{\sqrt[3]{x}}, 2, \frac{4}{\frac{x}{t \cdot t}}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \sqrt{2} \cdot t\right)}\\ \end{array}\]

Reproduce

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