Average Error: 42.9 → 12.3
Time: 15.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.9713348016436594 \cdot 10^{-265}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.7717133594264462 \cdot 10^{69}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \frac{{\left(\sqrt[3]{\ell}\right)}^{4}}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\left|\sqrt[3]{\ell}\right|}} \cdot \frac{\sqrt{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{x}}, 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 -6.9713348016436594 \cdot 10^{-265}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\

\mathbf{elif}\;t \le 1.7717133594264462 \cdot 10^{69}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \frac{{\left(\sqrt[3]{\ell}\right)}^{4}}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\left|\sqrt[3]{\ell}\right|}} \cdot \frac{\sqrt{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{x}}, 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 r33215 = 2.0;
        double r33216 = sqrt(r33215);
        double r33217 = t;
        double r33218 = r33216 * r33217;
        double r33219 = x;
        double r33220 = 1.0;
        double r33221 = r33219 + r33220;
        double r33222 = r33219 - r33220;
        double r33223 = r33221 / r33222;
        double r33224 = l;
        double r33225 = r33224 * r33224;
        double r33226 = r33217 * r33217;
        double r33227 = r33215 * r33226;
        double r33228 = r33225 + r33227;
        double r33229 = r33223 * r33228;
        double r33230 = r33229 - r33225;
        double r33231 = sqrt(r33230);
        double r33232 = r33218 / r33231;
        return r33232;
}

double f(double x, double l, double t) {
        double r33233 = t;
        double r33234 = -6.971334801643659e-265;
        bool r33235 = r33233 <= r33234;
        double r33236 = 2.0;
        double r33237 = sqrt(r33236);
        double r33238 = r33237 * r33233;
        double r33239 = x;
        double r33240 = r33237 * r33239;
        double r33241 = r33233 / r33240;
        double r33242 = r33236 * r33241;
        double r33243 = fma(r33233, r33237, r33242);
        double r33244 = -r33243;
        double r33245 = r33238 / r33244;
        double r33246 = 1.771713359426446e+69;
        bool r33247 = r33233 <= r33246;
        double r33248 = r33233 * r33233;
        double r33249 = l;
        double r33250 = cbrt(r33249);
        double r33251 = 4.0;
        double r33252 = pow(r33250, r33251);
        double r33253 = cbrt(r33239);
        double r33254 = r33253 * r33253;
        double r33255 = fabs(r33250);
        double r33256 = r33254 / r33255;
        double r33257 = r33252 / r33256;
        double r33258 = 2.0;
        double r33259 = pow(r33250, r33258);
        double r33260 = sqrt(r33259);
        double r33261 = r33260 / r33253;
        double r33262 = r33257 * r33261;
        double r33263 = 4.0;
        double r33264 = pow(r33233, r33258);
        double r33265 = r33264 / r33239;
        double r33266 = r33263 * r33265;
        double r33267 = fma(r33236, r33262, r33266);
        double r33268 = fma(r33236, r33248, r33267);
        double r33269 = sqrt(r33268);
        double r33270 = r33238 / r33269;
        double r33271 = r33238 / r33243;
        double r33272 = r33247 ? r33270 : r33271;
        double r33273 = r33235 ? r33245 : r33272;
        return r33273;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -6.971334801643659e-265

    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. Simplified41.5

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 30.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)}}}\]
    4. Simplified30.8

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{-\left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}}\]
    6. Simplified14.1

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

    if -6.971334801643659e-265 < t < 1.771713359426446e+69

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

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x - 1} - \ell \cdot \ell}}}\]
    3. 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)}}}\]
    4. Simplified18.6

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \frac{{\ell}^{2}}{x}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity18.6

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, {\left(\sqrt[3]{\ell}\right)}^{4} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}, 4 \cdot \frac{{t}^{2}}{x}\right)\right)}}\]
    13. Applied add-sqr-sqrt16.1

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

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

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

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

    if 1.771713359426446e+69 < t

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

      \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right) \cdot \frac{x + 1}{x - 1} - \ell \cdot \ell}}}\]
    3. Taylor expanded around inf 46.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)}}}\]
    4. Simplified46.5

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

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

      \[\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 simplification12.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -6.9713348016436594 \cdot 10^{-265}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\mathsf{fma}\left(t, \sqrt{2}, 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.7717133594264462 \cdot 10^{69}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(2, \frac{{\left(\sqrt[3]{\ell}\right)}^{4}}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\left|\sqrt[3]{\ell}\right|}} \cdot \frac{\sqrt{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{x}}, 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 2020046 +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)))))