Average Error: 43.0 → 9.0
Time: 28.2s
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 -6.758930516841978210246323496861710927032 \cdot 10^{97}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}}}{-\mathsf{fma}\left(\frac{\sqrt{\frac{\frac{1}{2}}{\sqrt{2}}}}{x}, 2, \sqrt{\sqrt{2}}\right)}\\ \mathbf{elif}\;t \le 4.225315466536892026145009010018028395833 \cdot 10^{92}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{4 \cdot \left(t \cdot t\right)}{x} + \mathsf{fma}\left(\frac{\ell}{x}, \ell, t \cdot t\right) \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \sqrt{2} \cdot t\right)\right) - \frac{\frac{2 \cdot t}{2 \cdot \sqrt{2}}}{x \cdot x}}\\ \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 -6.758930516841978210246323496861710927032 \cdot 10^{97}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}}}{-\mathsf{fma}\left(\frac{\sqrt{\frac{\frac{1}{2}}{\sqrt{2}}}}{x}, 2, \sqrt{\sqrt{2}}\right)}\\

\mathbf{elif}\;t \le 4.225315466536892026145009010018028395833 \cdot 10^{92}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{4 \cdot \left(t \cdot t\right)}{x} + \mathsf{fma}\left(\frac{\ell}{x}, \ell, t \cdot t\right) \cdot 2}}\\

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

\end{array}
double f(double x, double l, double t) {
        double r1324444 = 2.0;
        double r1324445 = sqrt(r1324444);
        double r1324446 = t;
        double r1324447 = r1324445 * r1324446;
        double r1324448 = x;
        double r1324449 = 1.0;
        double r1324450 = r1324448 + r1324449;
        double r1324451 = r1324448 - r1324449;
        double r1324452 = r1324450 / r1324451;
        double r1324453 = l;
        double r1324454 = r1324453 * r1324453;
        double r1324455 = r1324446 * r1324446;
        double r1324456 = r1324444 * r1324455;
        double r1324457 = r1324454 + r1324456;
        double r1324458 = r1324452 * r1324457;
        double r1324459 = r1324458 - r1324454;
        double r1324460 = sqrt(r1324459);
        double r1324461 = r1324447 / r1324460;
        return r1324461;
}

double f(double x, double l, double t) {
        double r1324462 = t;
        double r1324463 = -6.758930516841978e+97;
        bool r1324464 = r1324462 <= r1324463;
        double r1324465 = 2.0;
        double r1324466 = sqrt(r1324465);
        double r1324467 = sqrt(r1324466);
        double r1324468 = 1.0;
        double r1324469 = r1324468 / r1324465;
        double r1324470 = r1324469 / r1324466;
        double r1324471 = sqrt(r1324470);
        double r1324472 = x;
        double r1324473 = r1324471 / r1324472;
        double r1324474 = fma(r1324473, r1324465, r1324467);
        double r1324475 = -r1324474;
        double r1324476 = r1324467 / r1324475;
        double r1324477 = 4.225315466536892e+92;
        bool r1324478 = r1324462 <= r1324477;
        double r1324479 = r1324466 * r1324462;
        double r1324480 = 4.0;
        double r1324481 = r1324462 * r1324462;
        double r1324482 = r1324480 * r1324481;
        double r1324483 = r1324482 / r1324472;
        double r1324484 = l;
        double r1324485 = r1324484 / r1324472;
        double r1324486 = fma(r1324485, r1324484, r1324481);
        double r1324487 = r1324486 * r1324465;
        double r1324488 = r1324483 + r1324487;
        double r1324489 = sqrt(r1324488);
        double r1324490 = r1324479 / r1324489;
        double r1324491 = r1324472 * r1324472;
        double r1324492 = r1324465 / r1324491;
        double r1324493 = r1324462 / r1324466;
        double r1324494 = r1324493 / r1324472;
        double r1324495 = fma(r1324494, r1324465, r1324479);
        double r1324496 = fma(r1324492, r1324493, r1324495);
        double r1324497 = r1324465 * r1324462;
        double r1324498 = r1324465 * r1324466;
        double r1324499 = r1324497 / r1324498;
        double r1324500 = r1324499 / r1324491;
        double r1324501 = r1324496 - r1324500;
        double r1324502 = r1324479 / r1324501;
        double r1324503 = r1324478 ? r1324490 : r1324502;
        double r1324504 = r1324464 ? r1324476 : r1324503;
        return r1324504;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -6.758930516841978e+97

    1. Initial program 49.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 49.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. Simplified47.5

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

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

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

      \[\leadsto \frac{\color{blue}{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}}{\sqrt{\mathsf{fma}\left(\frac{t}{\frac{x}{t}}, 4, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)\right)}}\]
    8. Using strategy rm
    9. Applied associate-/l*47.5

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

      \[\leadsto \frac{\sqrt{\sqrt{2}}}{\color{blue}{-\left(2 \cdot \left(\sqrt{\frac{1}{{\left(\sqrt{2}\right)}^{3}}} \cdot \frac{1}{x}\right) + \sqrt{\sqrt{2}}\right)}}\]
    11. Simplified3.1

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

    if -6.758930516841978e+97 < t < 4.225315466536892e+92

    1. Initial program 38.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 17.8

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

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

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

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

    if 4.225315466536892e+92 < t

    1. Initial program 49.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 2.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -6.758930516841978210246323496861710927032 \cdot 10^{97}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}}}{-\mathsf{fma}\left(\frac{\sqrt{\frac{\frac{1}{2}}{\sqrt{2}}}}{x}, 2, \sqrt{\sqrt{2}}\right)}\\ \mathbf{elif}\;t \le 4.225315466536892026145009010018028395833 \cdot 10^{92}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\frac{4 \cdot \left(t \cdot t\right)}{x} + \mathsf{fma}\left(\frac{\ell}{x}, \ell, t \cdot t\right) \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \sqrt{2} \cdot t\right)\right) - \frac{\frac{2 \cdot t}{2 \cdot \sqrt{2}}}{x \cdot x}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019171 +o rules:numerics
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))