Average Error: 42.3 → 9.4
Time: 15.8s
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 -4.09758842636574692 \cdot 10^{140}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le -4.7384326528114072 \cdot 10^{-208}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot t\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -3.3196210034371617 \cdot 10^{-283}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 2.5274016136862038 \cdot 10^{114}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot t\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\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 -4.09758842636574692 \cdot 10^{140}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r28685 = 2.0;
        double r28686 = sqrt(r28685);
        double r28687 = t;
        double r28688 = r28686 * r28687;
        double r28689 = x;
        double r28690 = 1.0;
        double r28691 = r28689 + r28690;
        double r28692 = r28689 - r28690;
        double r28693 = r28691 / r28692;
        double r28694 = l;
        double r28695 = r28694 * r28694;
        double r28696 = r28687 * r28687;
        double r28697 = r28685 * r28696;
        double r28698 = r28695 + r28697;
        double r28699 = r28693 * r28698;
        double r28700 = r28699 - r28695;
        double r28701 = sqrt(r28700);
        double r28702 = r28688 / r28701;
        return r28702;
}

double f(double x, double l, double t) {
        double r28703 = t;
        double r28704 = -4.097588426365747e+140;
        bool r28705 = r28703 <= r28704;
        double r28706 = 2.0;
        double r28707 = sqrt(r28706);
        double r28708 = r28707 * r28703;
        double r28709 = x;
        double r28710 = r28707 * r28709;
        double r28711 = r28703 / r28710;
        double r28712 = r28706 * r28711;
        double r28713 = fma(r28703, r28707, r28712);
        double r28714 = -r28713;
        double r28715 = r28708 / r28714;
        double r28716 = -4.738432652811407e-208;
        bool r28717 = r28703 <= r28716;
        double r28718 = cbrt(r28707);
        double r28719 = r28718 * r28718;
        double r28720 = r28718 * r28703;
        double r28721 = r28719 * r28720;
        double r28722 = 2.0;
        double r28723 = pow(r28703, r28722);
        double r28724 = l;
        double r28725 = r28709 / r28724;
        double r28726 = r28724 / r28725;
        double r28727 = 4.0;
        double r28728 = r28723 / r28709;
        double r28729 = r28727 * r28728;
        double r28730 = fma(r28706, r28726, r28729);
        double r28731 = fma(r28706, r28723, r28730);
        double r28732 = sqrt(r28731);
        double r28733 = r28721 / r28732;
        double r28734 = -3.3196210034371617e-283;
        bool r28735 = r28703 <= r28734;
        double r28736 = 2.527401613686204e+114;
        bool r28737 = r28703 <= r28736;
        double r28738 = r28708 / r28713;
        double r28739 = r28737 ? r28733 : r28738;
        double r28740 = r28735 ? r28715 : r28739;
        double r28741 = r28717 ? r28733 : r28740;
        double r28742 = r28705 ? r28715 : r28741;
        return r28742;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -4.097588426365747e+140 or -4.738432652811407e-208 < t < -3.3196210034371617e-283

    1. Initial program 59.4

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

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

      \[\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)}}}\]
    4. Simplified53.4

      \[\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)}}}\]
    5. Taylor expanded around -inf 10.5

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

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

    if -4.097588426365747e+140 < t < -4.738432652811407e-208 or -3.3196210034371617e-283 < t < 2.527401613686204e+114

    1. Initial program 33.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. Simplified33.5

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

      \[\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)}}}\]
    4. Simplified15.5

      \[\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)}}}\]
    5. Using strategy rm
    6. Applied unpow215.5

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \color{blue}{\frac{\ell}{\frac{x}{\ell}}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    8. Using strategy rm
    9. Applied add-cube-cbrt11.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{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    10. Applied associate-*l*11.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{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]

    if 2.527401613686204e+114 < t

    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. Simplified52.2

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 52.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)}}}\]
    4. Simplified52.2

      \[\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)}}}\]
    5. Taylor expanded around inf 2.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -4.09758842636574692 \cdot 10^{140}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le -4.7384326528114072 \cdot 10^{-208}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot t\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -3.3196210034371617 \cdot 10^{-283}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 2.5274016136862038 \cdot 10^{114}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot t\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\ell}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \end{array}\]

Reproduce

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