Average Error: 43.2 → 10.4
Time: 26.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 -273909972730594400:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -2.747565116731855271136776118256605565511 \cdot 10^{-168}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \left(\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)} \cdot \left(\sqrt{\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}}\right)\right)\right)}}\\ \mathbf{elif}\;t \le 2.483283582103815943388123624315897119879 \cdot 10^{-307}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 4.76146337694126327794527141854404856243 \cdot 10^{-255}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \left(\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)} \cdot \left(\sqrt{\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}}\right)\right)\right)}}\\ \mathbf{elif}\;t \le 2.39382876443450738828335111707118149527 \cdot 10^{-155} \lor \neg \left(t \le 399617857862134784\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2} - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\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 -273909972730594400:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\

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

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

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

\mathbf{elif}\;t \le 2.39382876443450738828335111707118149527 \cdot 10^{-155} \lor \neg \left(t \le 399617857862134784\right):\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2} - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\

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

\end{array}
double f(double x, double l, double t) {
        double r45175 = 2.0;
        double r45176 = sqrt(r45175);
        double r45177 = t;
        double r45178 = r45176 * r45177;
        double r45179 = x;
        double r45180 = 1.0;
        double r45181 = r45179 + r45180;
        double r45182 = r45179 - r45180;
        double r45183 = r45181 / r45182;
        double r45184 = l;
        double r45185 = r45184 * r45184;
        double r45186 = r45177 * r45177;
        double r45187 = r45175 * r45186;
        double r45188 = r45185 + r45187;
        double r45189 = r45183 * r45188;
        double r45190 = r45189 - r45185;
        double r45191 = sqrt(r45190);
        double r45192 = r45178 / r45191;
        return r45192;
}

double f(double x, double l, double t) {
        double r45193 = t;
        double r45194 = -2.739099727305944e+17;
        bool r45195 = r45193 <= r45194;
        double r45196 = 2.0;
        double r45197 = sqrt(r45196);
        double r45198 = r45197 * r45193;
        double r45199 = 3.0;
        double r45200 = pow(r45197, r45199);
        double r45201 = x;
        double r45202 = 2.0;
        double r45203 = pow(r45201, r45202);
        double r45204 = r45200 * r45203;
        double r45205 = r45193 / r45204;
        double r45206 = r45197 * r45203;
        double r45207 = r45193 / r45206;
        double r45208 = r45205 - r45207;
        double r45209 = r45196 * r45208;
        double r45210 = r45197 * r45201;
        double r45211 = r45193 / r45210;
        double r45212 = r45193 * r45197;
        double r45213 = fma(r45196, r45211, r45212);
        double r45214 = r45209 - r45213;
        double r45215 = r45198 / r45214;
        double r45216 = -2.7475651167318553e-168;
        bool r45217 = r45193 <= r45216;
        double r45218 = 4.0;
        double r45219 = pow(r45193, r45202);
        double r45220 = r45219 / r45201;
        double r45221 = l;
        double r45222 = r45201 / r45221;
        double r45223 = r45221 / r45222;
        double r45224 = fma(r45193, r45193, r45223);
        double r45225 = sqrt(r45224);
        double r45226 = sqrt(r45225);
        double r45227 = r45226 * r45226;
        double r45228 = r45225 * r45227;
        double r45229 = r45196 * r45228;
        double r45230 = fma(r45218, r45220, r45229);
        double r45231 = sqrt(r45230);
        double r45232 = r45198 / r45231;
        double r45233 = 2.483283582103816e-307;
        bool r45234 = r45193 <= r45233;
        double r45235 = 4.761463376941263e-255;
        bool r45236 = r45193 <= r45235;
        double r45237 = 2.3938287644345074e-155;
        bool r45238 = r45193 <= r45237;
        double r45239 = 3.996178578621348e+17;
        bool r45240 = r45193 <= r45239;
        double r45241 = !r45240;
        bool r45242 = r45238 || r45241;
        double r45243 = r45207 + r45211;
        double r45244 = r45196 * r45205;
        double r45245 = r45212 - r45244;
        double r45246 = fma(r45196, r45243, r45245);
        double r45247 = r45198 / r45246;
        double r45248 = r45196 * r45224;
        double r45249 = fma(r45218, r45220, r45248);
        double r45250 = sqrt(r45249);
        double r45251 = r45198 / r45250;
        double r45252 = r45242 ? r45247 : r45251;
        double r45253 = r45236 ? r45232 : r45252;
        double r45254 = r45234 ? r45215 : r45253;
        double r45255 = r45217 ? r45232 : r45254;
        double r45256 = r45195 ? r45215 : r45255;
        return r45256;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -2.739099727305944e+17 or -2.7475651167318553e-168 < t < 2.483283582103816e-307

    1. Initial program 48.1

      \[\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 13.3

      \[\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(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)\right)}}\]
    3. Simplified13.3

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

    if -2.739099727305944e+17 < t < -2.7475651167318553e-168 or 2.483283582103816e-307 < t < 4.761463376941263e-255

    1. Initial program 36.1

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

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

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

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

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

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

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

    if 4.761463376941263e-255 < t < 2.3938287644345074e-155 or 3.996178578621348e+17 < t

    1. Initial program 46.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 9.8

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

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

    if 2.3938287644345074e-155 < t < 3.996178578621348e+17

    1. Initial program 30.1

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -273909972730594400:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le -2.747565116731855271136776118256605565511 \cdot 10^{-168}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \left(\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)} \cdot \left(\sqrt{\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}}\right)\right)\right)}}\\ \mathbf{elif}\;t \le 2.483283582103815943388123624315897119879 \cdot 10^{-307}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 4.76146337694126327794527141854404856243 \cdot 10^{-255}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \left(\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)} \cdot \left(\sqrt{\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)}}\right)\right)\right)}}\\ \mathbf{elif}\;t \le 2.39382876443450738828335111707118149527 \cdot 10^{-155} \lor \neg \left(t \le 399617857862134784\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\mathsf{fma}\left(2, \frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}, t \cdot \sqrt{2} - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(4, \frac{{t}^{2}}{x}, 2 \cdot \mathsf{fma}\left(t, t, \frac{\ell}{\frac{x}{\ell}}\right)\right)}}\\ \end{array}\]

Reproduce

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