Average Error: 43.1 → 9.5
Time: 8.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 -4.412179718524533529377882508464860335725 \cdot 10^{50}:\\ \;\;\;\;\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 1.584616850193217588423596671213427616097 \cdot 10^{123}:\\ \;\;\;\;\frac{\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\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.412179718524533529377882508464860335725 \cdot 10^{50}:\\
\;\;\;\;\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 1.584616850193217588423596671213427616097 \cdot 10^{123}:\\
\;\;\;\;\frac{\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\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 r37164 = 2.0;
        double r37165 = sqrt(r37164);
        double r37166 = t;
        double r37167 = r37165 * r37166;
        double r37168 = x;
        double r37169 = 1.0;
        double r37170 = r37168 + r37169;
        double r37171 = r37168 - r37169;
        double r37172 = r37170 / r37171;
        double r37173 = l;
        double r37174 = r37173 * r37173;
        double r37175 = r37166 * r37166;
        double r37176 = r37164 * r37175;
        double r37177 = r37174 + r37176;
        double r37178 = r37172 * r37177;
        double r37179 = r37178 - r37174;
        double r37180 = sqrt(r37179);
        double r37181 = r37167 / r37180;
        return r37181;
}

double f(double x, double l, double t) {
        double r37182 = t;
        double r37183 = -4.4121797185245335e+50;
        bool r37184 = r37182 <= r37183;
        double r37185 = 2.0;
        double r37186 = sqrt(r37185);
        double r37187 = r37186 * r37182;
        double r37188 = 3.0;
        double r37189 = pow(r37186, r37188);
        double r37190 = x;
        double r37191 = 2.0;
        double r37192 = pow(r37190, r37191);
        double r37193 = r37189 * r37192;
        double r37194 = r37182 / r37193;
        double r37195 = r37186 * r37192;
        double r37196 = r37182 / r37195;
        double r37197 = r37186 * r37190;
        double r37198 = r37182 / r37197;
        double r37199 = r37182 * r37186;
        double r37200 = fma(r37185, r37198, r37199);
        double r37201 = fma(r37185, r37196, r37200);
        double r37202 = -r37201;
        double r37203 = fma(r37185, r37194, r37202);
        double r37204 = r37187 / r37203;
        double r37205 = 1.5846168501932176e+123;
        bool r37206 = r37182 <= r37205;
        double r37207 = sqrt(r37186);
        double r37208 = sqrt(r37207);
        double r37209 = r37207 * r37182;
        double r37210 = r37208 * r37209;
        double r37211 = r37208 * r37210;
        double r37212 = pow(r37182, r37191);
        double r37213 = l;
        double r37214 = r37191 / r37191;
        double r37215 = pow(r37213, r37214);
        double r37216 = r37190 / r37213;
        double r37217 = r37215 / r37216;
        double r37218 = 4.0;
        double r37219 = r37212 / r37190;
        double r37220 = r37218 * r37219;
        double r37221 = fma(r37185, r37217, r37220);
        double r37222 = fma(r37185, r37212, r37221);
        double r37223 = sqrt(r37222);
        double r37224 = r37211 / r37223;
        double r37225 = r37185 * r37198;
        double r37226 = fma(r37182, r37186, r37225);
        double r37227 = r37187 / r37226;
        double r37228 = r37206 ? r37224 : r37227;
        double r37229 = r37184 ? r37204 : r37228;
        return r37229;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -4.4121797185245335e+50

    1. Initial program 44.6

      \[\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 4.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}^{2}} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)\right)}}\]
    3. Simplified4.7

      \[\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 -4.4121797185245335e+50 < t < 1.5846168501932176e+123

    1. Initial program 38.9

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

      \[\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 sqr-pow17.7

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    12. Using strategy rm
    13. Applied add-sqr-sqrt13.7

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

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

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

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

    if 1.5846168501932176e+123 < t

    1. Initial program 54.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 55.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. Simplified55.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)}}}\]
    4. Taylor expanded around inf 2.9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -4.412179718524533529377882508464860335725 \cdot 10^{50}:\\ \;\;\;\;\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 1.584616850193217588423596671213427616097 \cdot 10^{123}:\\ \;\;\;\;\frac{\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{\sqrt{2}}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)\right)}{\sqrt{\mathsf{fma}\left(2, {t}^{2}, \mathsf{fma}\left(2, \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\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 2019344 +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)))))