Average Error: 43.2 → 9.6
Time: 11.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 -5.0191951041229934 \cdot 10^{143}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\ \mathbf{elif}\;t \le 5.7232019252513384 \cdot 10^{81}:\\ \;\;\;\;\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, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{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 -5.0191951041229934 \cdot 10^{143}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\

\mathbf{elif}\;t \le 5.7232019252513384 \cdot 10^{81}:\\
\;\;\;\;\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, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r35489 = 2.0;
        double r35490 = sqrt(r35489);
        double r35491 = t;
        double r35492 = r35490 * r35491;
        double r35493 = x;
        double r35494 = 1.0;
        double r35495 = r35493 + r35494;
        double r35496 = r35493 - r35494;
        double r35497 = r35495 / r35496;
        double r35498 = l;
        double r35499 = r35498 * r35498;
        double r35500 = r35491 * r35491;
        double r35501 = r35489 * r35500;
        double r35502 = r35499 + r35501;
        double r35503 = r35497 * r35502;
        double r35504 = r35503 - r35499;
        double r35505 = sqrt(r35504);
        double r35506 = r35492 / r35505;
        return r35506;
}

double f(double x, double l, double t) {
        double r35507 = t;
        double r35508 = -5.019195104122993e+143;
        bool r35509 = r35507 <= r35508;
        double r35510 = 2.0;
        double r35511 = sqrt(r35510);
        double r35512 = r35511 * r35507;
        double r35513 = 3.0;
        double r35514 = pow(r35511, r35513);
        double r35515 = x;
        double r35516 = 2.0;
        double r35517 = pow(r35515, r35516);
        double r35518 = r35514 * r35517;
        double r35519 = r35507 / r35518;
        double r35520 = r35511 * r35517;
        double r35521 = r35507 / r35520;
        double r35522 = r35511 * r35515;
        double r35523 = r35507 / r35522;
        double r35524 = r35507 * r35511;
        double r35525 = fma(r35510, r35523, r35524);
        double r35526 = fma(r35510, r35521, r35525);
        double r35527 = -r35526;
        double r35528 = fma(r35510, r35519, r35527);
        double r35529 = r35512 / r35528;
        double r35530 = 5.7232019252513384e+81;
        bool r35531 = r35507 <= r35530;
        double r35532 = cbrt(r35511);
        double r35533 = r35532 * r35532;
        double r35534 = r35532 * r35507;
        double r35535 = r35533 * r35534;
        double r35536 = pow(r35507, r35516);
        double r35537 = l;
        double r35538 = fabs(r35537);
        double r35539 = r35538 / r35515;
        double r35540 = r35538 * r35539;
        double r35541 = 4.0;
        double r35542 = r35536 / r35515;
        double r35543 = r35541 * r35542;
        double r35544 = fma(r35510, r35540, r35543);
        double r35545 = fma(r35510, r35536, r35544);
        double r35546 = sqrt(r35545);
        double r35547 = r35535 / r35546;
        double r35548 = r35510 * r35519;
        double r35549 = r35525 - r35548;
        double r35550 = fma(r35510, r35521, r35549);
        double r35551 = r35512 / r35550;
        double r35552 = r35531 ? r35547 : r35551;
        double r35553 = r35509 ? r35529 : r35552;
        return r35553;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -5.019195104122993e+143

    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. Taylor expanded around -inf 2.2

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

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

    if -5.019195104122993e+143 < t < 5.7232019252513384e+81

    1. Initial program 36.8

      \[\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.8

      \[\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.8

      \[\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)}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity17.8

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{2}}{\color{blue}{1 \cdot x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    6. Applied add-sqr-sqrt17.8

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{\color{blue}{\sqrt{{\ell}^{2}} \cdot \sqrt{{\ell}^{2}}}}{1 \cdot x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    7. Applied times-frac17.8

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \color{blue}{\frac{\sqrt{{\ell}^{2}}}{1} \cdot \frac{\sqrt{{\ell}^{2}}}{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    8. Simplified17.8

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \color{blue}{\left|\ell\right|} \cdot \frac{\sqrt{{\ell}^{2}}}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    9. Simplified13.8

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \left|\ell\right| \cdot \color{blue}{\frac{\left|\ell\right|}{x}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    10. Using strategy rm
    11. Applied add-cube-cbrt13.8

      \[\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, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    12. Applied associate-*l*13.8

      \[\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, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]

    if 5.7232019252513384e+81 < t

    1. Initial program 48.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 3.5

      \[\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.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -5.0191951041229934 \cdot 10^{143}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}, -\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)\right)\right)}\\ \mathbf{elif}\;t \le 5.7232019252513384 \cdot 10^{81}:\\ \;\;\;\;\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, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}}, \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \end{array}\]

Reproduce

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