Average Error: 42.4 → 9.9
Time: 34.0s
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 -1009292108.0244154:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{2 \cdot t}{\left(x \cdot x\right) \cdot \left(2 \cdot \sqrt{2}\right)} - \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x}, 2, \mathsf{fma}\left(t, \sqrt{2}, \frac{\frac{t}{\sqrt{2}}}{x} \cdot 2\right)\right)}\\ \mathbf{elif}\;t \le 1.6599090008768233 \cdot 10^{-198}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\frac{\sqrt[3]{2} \cdot \sqrt[3]{2}}{\frac{\sqrt[3]{x}}{\ell}}}{\frac{\sqrt[3]{x}}{\frac{\sqrt{\sqrt[3]{2}} \cdot \sqrt{\sqrt[3]{2}}}{\frac{\sqrt[3]{x}}{\ell}}}}\right)\right)}}\\ \mathbf{elif}\;t \le 1.8036563536440024 \cdot 10^{-156}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \sqrt{2} \cdot t - \frac{2}{x} \cdot \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x}\right)}\\ \mathbf{elif}\;t \le 4.096733327082621 \cdot 10^{-12}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\frac{\sqrt[3]{2} \cdot \sqrt[3]{2}}{\frac{\sqrt[3]{x}}{\ell}}}{\frac{\sqrt[3]{x}}{\frac{\sqrt{\sqrt[3]{2}} \cdot \sqrt{\sqrt[3]{2}}}{\frac{\sqrt[3]{x}}{\ell}}}}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \sqrt{2} \cdot t - \frac{2}{x} \cdot \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{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 -1009292108.0244154:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{2 \cdot t}{\left(x \cdot x\right) \cdot \left(2 \cdot \sqrt{2}\right)} - \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x}, 2, \mathsf{fma}\left(t, \sqrt{2}, \frac{\frac{t}{\sqrt{2}}}{x} \cdot 2\right)\right)}\\

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r932348 = 2.0;
        double r932349 = sqrt(r932348);
        double r932350 = t;
        double r932351 = r932349 * r932350;
        double r932352 = x;
        double r932353 = 1.0;
        double r932354 = r932352 + r932353;
        double r932355 = r932352 - r932353;
        double r932356 = r932354 / r932355;
        double r932357 = l;
        double r932358 = r932357 * r932357;
        double r932359 = r932350 * r932350;
        double r932360 = r932348 * r932359;
        double r932361 = r932358 + r932360;
        double r932362 = r932356 * r932361;
        double r932363 = r932362 - r932358;
        double r932364 = sqrt(r932363);
        double r932365 = r932351 / r932364;
        return r932365;
}

double f(double x, double l, double t) {
        double r932366 = t;
        double r932367 = -1009292108.0244154;
        bool r932368 = r932366 <= r932367;
        double r932369 = 2.0;
        double r932370 = sqrt(r932369);
        double r932371 = r932370 * r932366;
        double r932372 = r932369 * r932366;
        double r932373 = x;
        double r932374 = r932373 * r932373;
        double r932375 = r932369 * r932370;
        double r932376 = r932374 * r932375;
        double r932377 = r932372 / r932376;
        double r932378 = r932366 / r932370;
        double r932379 = r932378 / r932374;
        double r932380 = r932378 / r932373;
        double r932381 = r932380 * r932369;
        double r932382 = fma(r932366, r932370, r932381);
        double r932383 = fma(r932379, r932369, r932382);
        double r932384 = r932377 - r932383;
        double r932385 = r932371 / r932384;
        double r932386 = 1.6599090008768233e-198;
        bool r932387 = r932366 <= r932386;
        double r932388 = r932366 * r932366;
        double r932389 = r932388 / r932373;
        double r932390 = 4.0;
        double r932391 = cbrt(r932369);
        double r932392 = r932391 * r932391;
        double r932393 = cbrt(r932373);
        double r932394 = l;
        double r932395 = r932393 / r932394;
        double r932396 = r932392 / r932395;
        double r932397 = sqrt(r932391);
        double r932398 = r932397 * r932397;
        double r932399 = r932398 / r932395;
        double r932400 = r932393 / r932399;
        double r932401 = r932396 / r932400;
        double r932402 = fma(r932389, r932390, r932401);
        double r932403 = fma(r932388, r932369, r932402);
        double r932404 = sqrt(r932403);
        double r932405 = r932371 / r932404;
        double r932406 = 1.8036563536440024e-156;
        bool r932407 = r932366 <= r932406;
        double r932408 = r932369 / r932373;
        double r932409 = r932378 / r932369;
        double r932410 = r932409 / r932373;
        double r932411 = r932408 * r932410;
        double r932412 = r932371 - r932411;
        double r932413 = fma(r932408, r932378, r932412);
        double r932414 = r932371 / r932413;
        double r932415 = 4.096733327082621e-12;
        bool r932416 = r932366 <= r932415;
        double r932417 = r932416 ? r932405 : r932414;
        double r932418 = r932407 ? r932414 : r932417;
        double r932419 = r932387 ? r932405 : r932418;
        double r932420 = r932368 ? r932385 : r932419;
        return r932420;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -1009292108.0244154

    1. Initial program 41.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 5.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(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)\right)}}\]
    3. Simplified5.2

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

    if -1009292108.0244154 < t < 1.6599090008768233e-198 or 1.8036563536440024e-156 < t < 4.096733327082621e-12

    1. Initial program 43.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 18.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. Simplified18.6

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\frac{\color{blue}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}}}{\frac{\sqrt[3]{x}}{\ell} \cdot \frac{\sqrt[3]{x}}{\ell}}}{\sqrt[3]{x}}\right)\right)}}\]
    10. Applied times-frac15.9

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

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

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

    if 1.6599090008768233e-198 < t < 1.8036563536440024e-156 or 4.096733327082621e-12 < t

    1. Initial program 41.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 37.1

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\frac{\color{blue}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}}}{\frac{\sqrt[3]{x}}{\ell} \cdot \frac{\sqrt[3]{x}}{\ell}}}{\sqrt[3]{x}}\right)\right)}}\]
    10. Applied times-frac35.5

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1009292108.0244154:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{2 \cdot t}{\left(x \cdot x\right) \cdot \left(2 \cdot \sqrt{2}\right)} - \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x}, 2, \mathsf{fma}\left(t, \sqrt{2}, \frac{\frac{t}{\sqrt{2}}}{x} \cdot 2\right)\right)}\\ \mathbf{elif}\;t \le 1.6599090008768233 \cdot 10^{-198}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\frac{\sqrt[3]{2} \cdot \sqrt[3]{2}}{\frac{\sqrt[3]{x}}{\ell}}}{\frac{\sqrt[3]{x}}{\frac{\sqrt{\sqrt[3]{2}} \cdot \sqrt{\sqrt[3]{2}}}{\frac{\sqrt[3]{x}}{\ell}}}}\right)\right)}}\\ \mathbf{elif}\;t \le 1.8036563536440024 \cdot 10^{-156}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \sqrt{2} \cdot t - \frac{2}{x} \cdot \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x}\right)}\\ \mathbf{elif}\;t \le 4.096733327082621 \cdot 10^{-12}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(t \cdot t, 2, \mathsf{fma}\left(\frac{t \cdot t}{x}, 4, \frac{\frac{\sqrt[3]{2} \cdot \sqrt[3]{2}}{\frac{\sqrt[3]{x}}{\ell}}}{\frac{\sqrt[3]{x}}{\frac{\sqrt{\sqrt[3]{2}} \cdot \sqrt{\sqrt[3]{2}}}{\frac{\sqrt[3]{x}}{\ell}}}}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x}, \frac{t}{\sqrt{2}}, \sqrt{2} \cdot t - \frac{2}{x} \cdot \frac{\frac{\frac{t}{\sqrt{2}}}{2}}{x}\right)}\\ \end{array}\]

Reproduce

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