Average Error: 41.8 → 9.1
Time: 29.1s
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.415525381702613 \cdot 10^{+62}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(\sqrt{2}, t, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\ \mathbf{elif}\;t \le 3.4759257316157413 \cdot 10^{-284}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\ \mathbf{elif}\;t \le 9.831366213789788 \cdot 10^{-187}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x} \cdot -2\right)\right)\right)}\\ \mathbf{elif}\;t \le 1.0888219445242733 \cdot 10^{+135}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x} \cdot -2\right)\right)\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.415525381702613 \cdot 10^{+62}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(\sqrt{2}, t, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r402225 = 2.0;
        double r402226 = sqrt(r402225);
        double r402227 = t;
        double r402228 = r402226 * r402227;
        double r402229 = x;
        double r402230 = 1.0;
        double r402231 = r402229 + r402230;
        double r402232 = r402229 - r402230;
        double r402233 = r402231 / r402232;
        double r402234 = l;
        double r402235 = r402234 * r402234;
        double r402236 = r402227 * r402227;
        double r402237 = r402225 * r402236;
        double r402238 = r402235 + r402237;
        double r402239 = r402233 * r402238;
        double r402240 = r402239 - r402235;
        double r402241 = sqrt(r402240);
        double r402242 = r402228 / r402241;
        return r402242;
}

double f(double x, double l, double t) {
        double r402243 = t;
        double r402244 = -5.415525381702613e+62;
        bool r402245 = r402243 <= r402244;
        double r402246 = 2.0;
        double r402247 = sqrt(r402246);
        double r402248 = r402247 * r402243;
        double r402249 = r402246 * r402247;
        double r402250 = r402246 / r402249;
        double r402251 = x;
        double r402252 = r402251 * r402251;
        double r402253 = r402243 / r402252;
        double r402254 = r402246 / r402247;
        double r402255 = r402243 / r402251;
        double r402256 = r402253 * r402254;
        double r402257 = fma(r402247, r402243, r402256);
        double r402258 = fma(r402254, r402255, r402257);
        double r402259 = -r402258;
        double r402260 = fma(r402250, r402253, r402259);
        double r402261 = r402248 / r402260;
        double r402262 = 3.4759257316157413e-284;
        bool r402263 = r402243 <= r402262;
        double r402264 = cbrt(r402247);
        double r402265 = r402264 * r402243;
        double r402266 = r402264 * r402264;
        double r402267 = r402265 * r402266;
        double r402268 = l;
        double r402269 = r402251 / r402268;
        double r402270 = r402268 / r402269;
        double r402271 = r402243 * r402243;
        double r402272 = r402271 / r402251;
        double r402273 = 4.0;
        double r402274 = r402272 * r402273;
        double r402275 = fma(r402271, r402246, r402274);
        double r402276 = fma(r402270, r402246, r402275);
        double r402277 = sqrt(r402276);
        double r402278 = r402267 / r402277;
        double r402279 = 9.831366213789788e-187;
        bool r402280 = r402243 <= r402279;
        double r402281 = r402246 / r402252;
        double r402282 = r402243 / r402247;
        double r402283 = r402246 / r402251;
        double r402284 = r402282 / r402246;
        double r402285 = r402284 / r402252;
        double r402286 = -2.0;
        double r402287 = r402285 * r402286;
        double r402288 = fma(r402283, r402282, r402287);
        double r402289 = fma(r402243, r402247, r402288);
        double r402290 = fma(r402281, r402282, r402289);
        double r402291 = r402248 / r402290;
        double r402292 = 1.0888219445242733e+135;
        bool r402293 = r402243 <= r402292;
        double r402294 = r402293 ? r402278 : r402291;
        double r402295 = r402280 ? r402291 : r402294;
        double r402296 = r402263 ? r402278 : r402295;
        double r402297 = r402245 ? r402261 : r402296;
        return r402297;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -5.415525381702613e+62

    1. Initial program 45.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 3.6

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

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

    if -5.415525381702613e+62 < t < 3.4759257316157413e-284 or 9.831366213789788e-187 < t < 1.0888219445242733e+135

    1. Initial program 33.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 14.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. Simplified14.9

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{{\ell}^{2}}{x}\right)}}}\]
    5. Simplified10.9

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

      \[\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(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, 4 \cdot \frac{t \cdot t}{x}\right)\right)}}\]
    8. Applied associate-*l*10.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(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, 4 \cdot \frac{t \cdot t}{x}\right)\right)}}\]

    if 3.4759257316157413e-284 < t < 9.831366213789788e-187 or 1.0888219445242733e+135 < t

    1. Initial program 57.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 10.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -5.415525381702613 \cdot 10^{+62}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{2 \cdot \sqrt{2}}, \frac{t}{x \cdot x}, -\mathsf{fma}\left(\frac{2}{\sqrt{2}}, \frac{t}{x}, \mathsf{fma}\left(\sqrt{2}, t, \frac{t}{x \cdot x} \cdot \frac{2}{\sqrt{2}}\right)\right)\right)}\\ \mathbf{elif}\;t \le 3.4759257316157413 \cdot 10^{-284}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\ \mathbf{elif}\;t \le 9.831366213789788 \cdot 10^{-187}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x} \cdot -2\right)\right)\right)}\\ \mathbf{elif}\;t \le 1.0888219445242733 \cdot 10^{+135}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot t\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\mathsf{fma}\left(\frac{\ell}{\frac{x}{\ell}}, 2, \mathsf{fma}\left(t \cdot t, 2, \frac{t \cdot t}{x} \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x \cdot x} \cdot -2\right)\right)\right)}\\ \end{array}\]

Reproduce

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