Average Error: 42.5 → 9.0
Time: 42.6s
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 -1.429472263354247 \cdot 10^{+67}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)}\\ \mathbf{elif}\;t \le -1.8034323523291548 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{elif}\;t \le -3.737726633798208 \cdot 10^{-276}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)}\\ \mathbf{elif}\;t \le 5.047696061686955 \cdot 10^{-240}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{elif}\;t \le 1.351904254863679 \cdot 10^{-161}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x}, \sqrt{2} \cdot t\right) - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.1429092917229189 \cdot 10^{+136}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x}, \sqrt{2} \cdot t\right) - \frac{\frac{t}{\sqrt{2}}}{x \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 -1.429472263354247 \cdot 10^{+67}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)}\\

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

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

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

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

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

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

\end{array}
double f(double x, double l, double t) {
        double r1312222 = 2.0;
        double r1312223 = sqrt(r1312222);
        double r1312224 = t;
        double r1312225 = r1312223 * r1312224;
        double r1312226 = x;
        double r1312227 = 1.0;
        double r1312228 = r1312226 + r1312227;
        double r1312229 = r1312226 - r1312227;
        double r1312230 = r1312228 / r1312229;
        double r1312231 = l;
        double r1312232 = r1312231 * r1312231;
        double r1312233 = r1312224 * r1312224;
        double r1312234 = r1312222 * r1312233;
        double r1312235 = r1312232 + r1312234;
        double r1312236 = r1312230 * r1312235;
        double r1312237 = r1312236 - r1312232;
        double r1312238 = sqrt(r1312237);
        double r1312239 = r1312225 / r1312238;
        return r1312239;
}

double f(double x, double l, double t) {
        double r1312240 = t;
        double r1312241 = -1.429472263354247e+67;
        bool r1312242 = r1312240 <= r1312241;
        double r1312243 = 2.0;
        double r1312244 = sqrt(r1312243);
        double r1312245 = r1312244 * r1312240;
        double r1312246 = r1312240 / r1312244;
        double r1312247 = x;
        double r1312248 = r1312247 * r1312247;
        double r1312249 = r1312246 / r1312248;
        double r1312250 = r1312246 / r1312247;
        double r1312251 = r1312243 / r1312247;
        double r1312252 = r1312251 * r1312250;
        double r1312253 = fma(r1312250, r1312243, r1312252);
        double r1312254 = fma(r1312240, r1312244, r1312253);
        double r1312255 = r1312249 - r1312254;
        double r1312256 = r1312245 / r1312255;
        double r1312257 = -1.8034323523291548e-167;
        bool r1312258 = r1312240 <= r1312257;
        double r1312259 = l;
        double r1312260 = r1312247 / r1312259;
        double r1312261 = r1312259 / r1312260;
        double r1312262 = fma(r1312240, r1312240, r1312261);
        double r1312263 = 4.0;
        double r1312264 = r1312240 * r1312263;
        double r1312265 = r1312240 * r1312264;
        double r1312266 = r1312265 / r1312247;
        double r1312267 = fma(r1312243, r1312262, r1312266);
        double r1312268 = sqrt(r1312267);
        double r1312269 = r1312245 / r1312268;
        double r1312270 = -3.737726633798208e-276;
        bool r1312271 = r1312240 <= r1312270;
        double r1312272 = 5.047696061686955e-240;
        bool r1312273 = r1312240 <= r1312272;
        double r1312274 = 1.351904254863679e-161;
        bool r1312275 = r1312240 <= r1312274;
        double r1312276 = r1312243 / r1312248;
        double r1312277 = fma(r1312243, r1312250, r1312245);
        double r1312278 = r1312277 - r1312249;
        double r1312279 = fma(r1312276, r1312246, r1312278);
        double r1312280 = r1312245 / r1312279;
        double r1312281 = 1.1429092917229189e+136;
        bool r1312282 = r1312240 <= r1312281;
        double r1312283 = r1312282 ? r1312269 : r1312280;
        double r1312284 = r1312275 ? r1312280 : r1312283;
        double r1312285 = r1312273 ? r1312269 : r1312284;
        double r1312286 = r1312271 ? r1312256 : r1312285;
        double r1312287 = r1312258 ? r1312269 : r1312286;
        double r1312288 = r1312242 ? r1312256 : r1312287;
        return r1312288;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -1.429472263354247e+67 or -1.8034323523291548e-167 < t < -3.737726633798208e-276

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

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

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

    if -1.429472263354247e+67 < t < -1.8034323523291548e-167 or -3.737726633798208e-276 < t < 5.047696061686955e-240 or 1.351904254863679e-161 < t < 1.1429092917229189e+136

    1. Initial program 30.6

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

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

    if 5.047696061686955e-240 < t < 1.351904254863679e-161 or 1.1429092917229189e+136 < t

    1. Initial program 58.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 8.8

      \[\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. Simplified8.8

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.429472263354247 \cdot 10^{+67}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)}\\ \mathbf{elif}\;t \le -1.8034323523291548 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{elif}\;t \le -3.737726633798208 \cdot 10^{-276}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \mathsf{fma}\left(t, \sqrt{2}, \mathsf{fma}\left(\frac{\frac{t}{\sqrt{2}}}{x}, 2, \frac{2}{x} \cdot \frac{\frac{t}{\sqrt{2}}}{x}\right)\right)}\\ \mathbf{elif}\;t \le 5.047696061686955 \cdot 10^{-240}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{elif}\;t \le 1.351904254863679 \cdot 10^{-161}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x}, \sqrt{2} \cdot t\right) - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 1.1429092917229189 \cdot 10^{+136}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right), \frac{t \cdot \left(t \cdot 4\right)}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(\frac{2}{x \cdot x}, \frac{t}{\sqrt{2}}, \mathsf{fma}\left(2, \frac{\frac{t}{\sqrt{2}}}{x}, \sqrt{2} \cdot t\right) - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \end{array}\]

Reproduce

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