Average Error: 42.8 → 9.3
Time: 16.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 -5.6277721314429949 \cdot 10^{125}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -9.4314582946777516 \cdot 10^{-250}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -6.3448789190600404 \cdot 10^{-289}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le 3.34251302474556348 \cdot 10^{119}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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)\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 -5.6277721314429949 \cdot 10^{125}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\

\mathbf{elif}\;t \le -9.4314582946777516 \cdot 10^{-250}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\

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

\mathbf{elif}\;t \le 3.34251302474556348 \cdot 10^{119}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}\\

\end{array}
double f(double x, double l, double t) {
        double r36650 = 2.0;
        double r36651 = sqrt(r36650);
        double r36652 = t;
        double r36653 = r36651 * r36652;
        double r36654 = x;
        double r36655 = 1.0;
        double r36656 = r36654 + r36655;
        double r36657 = r36654 - r36655;
        double r36658 = r36656 / r36657;
        double r36659 = l;
        double r36660 = r36659 * r36659;
        double r36661 = r36652 * r36652;
        double r36662 = r36650 * r36661;
        double r36663 = r36660 + r36662;
        double r36664 = r36658 * r36663;
        double r36665 = r36664 - r36660;
        double r36666 = sqrt(r36665);
        double r36667 = r36653 / r36666;
        return r36667;
}

double f(double x, double l, double t) {
        double r36668 = t;
        double r36669 = -5.627772131442995e+125;
        bool r36670 = r36668 <= r36669;
        double r36671 = 2.0;
        double r36672 = sqrt(r36671);
        double r36673 = r36672 * r36668;
        double r36674 = 3.0;
        double r36675 = pow(r36672, r36674);
        double r36676 = x;
        double r36677 = 2.0;
        double r36678 = pow(r36676, r36677);
        double r36679 = r36675 * r36678;
        double r36680 = r36668 / r36679;
        double r36681 = r36672 * r36678;
        double r36682 = r36668 / r36681;
        double r36683 = r36680 - r36682;
        double r36684 = r36671 * r36683;
        double r36685 = r36672 * r36676;
        double r36686 = r36668 / r36685;
        double r36687 = r36668 * r36672;
        double r36688 = fma(r36671, r36686, r36687);
        double r36689 = r36684 - r36688;
        double r36690 = r36673 / r36689;
        double r36691 = -9.431458294677752e-250;
        bool r36692 = r36668 <= r36691;
        double r36693 = sqrt(r36672);
        double r36694 = r36693 * r36668;
        double r36695 = r36693 * r36694;
        double r36696 = r36668 * r36668;
        double r36697 = l;
        double r36698 = fabs(r36697);
        double r36699 = r36698 / r36676;
        double r36700 = r36698 * r36699;
        double r36701 = 4.0;
        double r36702 = pow(r36668, r36677);
        double r36703 = r36702 / r36676;
        double r36704 = r36701 * r36703;
        double r36705 = fma(r36671, r36700, r36704);
        double r36706 = fma(r36671, r36696, r36705);
        double r36707 = sqrt(r36706);
        double r36708 = r36695 / r36707;
        double r36709 = -6.34487891906004e-289;
        bool r36710 = r36668 <= r36709;
        double r36711 = r36680 - r36686;
        double r36712 = r36671 * r36711;
        double r36713 = r36712 - r36687;
        double r36714 = r36673 / r36713;
        double r36715 = 3.3425130247455635e+119;
        bool r36716 = r36668 <= r36715;
        double r36717 = r36673 / r36707;
        double r36718 = fma(r36671, r36682, r36688);
        double r36719 = r36671 * r36680;
        double r36720 = r36718 - r36719;
        double r36721 = r36673 / r36720;
        double r36722 = r36716 ? r36717 : r36721;
        double r36723 = r36710 ? r36714 : r36722;
        double r36724 = r36692 ? r36708 : r36723;
        double r36725 = r36670 ? r36690 : r36724;
        return r36725;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 5 regimes
  2. if t < -5.627772131442995e+125

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

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

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

    if -5.627772131442995e+125 < t < -9.431458294677752e-250

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

      \[\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. Simplified16.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \frac{{\ell}^{2}}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity16.0

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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-frac16.0

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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. Simplified16.0

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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-sqr-sqrt11.3

      \[\leadsto \frac{\sqrt{\color{blue}{\sqrt{2} \cdot \sqrt{2}}} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    12. Applied sqrt-prod11.5

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

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

    if -9.431458294677752e-250 < t < -6.34487891906004e-289

    1. Initial program 63.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 28.6

      \[\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. Simplified28.6

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \frac{{\ell}^{2}}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity28.6

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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-frac28.6

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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. Simplified28.6

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

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

      \[\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)}}\]
    11. Simplified42.7

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

    if -6.34487891906004e-289 < t < 3.3425130247455635e+119

    1. Initial program 37.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 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(2, t \cdot t, \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.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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.3

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

    if 3.3425130247455635e+119 < t

    1. Initial program 54.0

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

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

      \[\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)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}}\]
  3. Recombined 5 regimes into one program.
  4. Final simplification9.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -5.6277721314429949 \cdot 10^{125}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -9.4314582946777516 \cdot 10^{-250}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \left|\ell\right| \cdot \frac{\left|\ell\right|}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\\ \mathbf{elif}\;t \le -6.3448789190600404 \cdot 10^{-289}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - t \cdot \sqrt{2}}\\ \mathbf{elif}\;t \le 3.34251302474556348 \cdot 10^{119}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \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)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}\\ \end{array}\]

Reproduce

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