Average Error: 42.6 → 9.4
Time: 23.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 -2.723485209640235 \cdot 10^{+72}:\\ \;\;\;\;\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 -5.64615525414727 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \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)}}\\ \mathbf{elif}\;t \le -5.330429831411802 \cdot 10^{-184}:\\ \;\;\;\;\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 9.234874397993673 \cdot 10^{+103}:\\ \;\;\;\;\frac{\sqrt{2} \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)}}\\ \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 -2.723485209640235 \cdot 10^{+72}:\\
\;\;\;\;\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 -5.64615525414727 \cdot 10^{-160}:\\
\;\;\;\;\frac{\sqrt{2} \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)}}\\

\mathbf{elif}\;t \le -5.330429831411802 \cdot 10^{-184}:\\
\;\;\;\;\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 9.234874397993673 \cdot 10^{+103}:\\
\;\;\;\;\frac{\sqrt{2} \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)}}\\

\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 r396347 = 2.0;
        double r396348 = sqrt(r396347);
        double r396349 = t;
        double r396350 = r396348 * r396349;
        double r396351 = x;
        double r396352 = 1.0;
        double r396353 = r396351 + r396352;
        double r396354 = r396351 - r396352;
        double r396355 = r396353 / r396354;
        double r396356 = l;
        double r396357 = r396356 * r396356;
        double r396358 = r396349 * r396349;
        double r396359 = r396347 * r396358;
        double r396360 = r396357 + r396359;
        double r396361 = r396355 * r396360;
        double r396362 = r396361 - r396357;
        double r396363 = sqrt(r396362);
        double r396364 = r396350 / r396363;
        return r396364;
}

double f(double x, double l, double t) {
        double r396365 = t;
        double r396366 = -2.723485209640235e+72;
        bool r396367 = r396365 <= r396366;
        double r396368 = 2.0;
        double r396369 = sqrt(r396368);
        double r396370 = r396369 * r396365;
        double r396371 = r396368 * r396369;
        double r396372 = r396368 / r396371;
        double r396373 = x;
        double r396374 = r396373 * r396373;
        double r396375 = r396365 / r396374;
        double r396376 = r396368 / r396369;
        double r396377 = r396365 / r396373;
        double r396378 = r396375 * r396376;
        double r396379 = fma(r396369, r396365, r396378);
        double r396380 = fma(r396376, r396377, r396379);
        double r396381 = -r396380;
        double r396382 = fma(r396372, r396375, r396381);
        double r396383 = r396370 / r396382;
        double r396384 = -5.64615525414727e-160;
        bool r396385 = r396365 <= r396384;
        double r396386 = l;
        double r396387 = r396373 / r396386;
        double r396388 = r396386 / r396387;
        double r396389 = r396365 * r396365;
        double r396390 = 4.0;
        double r396391 = r396389 / r396373;
        double r396392 = r396390 * r396391;
        double r396393 = fma(r396389, r396368, r396392);
        double r396394 = fma(r396388, r396368, r396393);
        double r396395 = sqrt(r396394);
        double r396396 = r396370 / r396395;
        double r396397 = -5.330429831411802e-184;
        bool r396398 = r396365 <= r396397;
        double r396399 = 9.234874397993673e+103;
        bool r396400 = r396365 <= r396399;
        double r396401 = r396368 / r396374;
        double r396402 = r396365 / r396369;
        double r396403 = r396368 / r396373;
        double r396404 = r396402 / r396368;
        double r396405 = r396404 / r396374;
        double r396406 = -2.0;
        double r396407 = r396405 * r396406;
        double r396408 = fma(r396403, r396402, r396407);
        double r396409 = fma(r396365, r396369, r396408);
        double r396410 = fma(r396401, r396402, r396409);
        double r396411 = r396370 / r396410;
        double r396412 = r396400 ? r396396 : r396411;
        double r396413 = r396398 ? r396383 : r396412;
        double r396414 = r396385 ? r396396 : r396413;
        double r396415 = r396367 ? r396383 : r396414;
        return r396415;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -2.723485209640235e+72 or -5.64615525414727e-160 < t < -5.330429831411802e-184

    1. Initial program 48.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 5.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(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}{\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 -2.723485209640235e+72 < t < -5.64615525414727e-160 or -5.330429831411802e-184 < t < 9.234874397993673e+103

    1. Initial program 37.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 17.5

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

      \[\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 0 17.5

      \[\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. Simplified13.4

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

    if 9.234874397993673e+103 < t

    1. Initial program 50.2

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.723485209640235 \cdot 10^{+72}:\\ \;\;\;\;\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 -5.64615525414727 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \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)}}\\ \mathbf{elif}\;t \le -5.330429831411802 \cdot 10^{-184}:\\ \;\;\;\;\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 9.234874397993673 \cdot 10^{+103}:\\ \;\;\;\;\frac{\sqrt{2} \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)}}\\ \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 2019156 +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)))))