Average Error: 43.8 → 9.6
Time: 8.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.26175644433788 \cdot 10^{83}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -4.7076951892789197 \cdot 10^{-185}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}}}\\ \mathbf{elif}\;t \le -6.2172427758645158 \cdot 10^{-226}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 6.2673277517179956 \cdot 10^{139}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\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.26175644433788 \cdot 10^{83}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\

\mathbf{elif}\;t \le -4.7076951892789197 \cdot 10^{-185}:\\
\;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}}}\\

\mathbf{elif}\;t \le -6.2172427758645158 \cdot 10^{-226}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\

\mathbf{elif}\;t \le 6.2673277517179956 \cdot 10^{139}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\

\end{array}
double f(double x, double l, double t) {
        double r36193 = 2.0;
        double r36194 = sqrt(r36193);
        double r36195 = t;
        double r36196 = r36194 * r36195;
        double r36197 = x;
        double r36198 = 1.0;
        double r36199 = r36197 + r36198;
        double r36200 = r36197 - r36198;
        double r36201 = r36199 / r36200;
        double r36202 = l;
        double r36203 = r36202 * r36202;
        double r36204 = r36195 * r36195;
        double r36205 = r36193 * r36204;
        double r36206 = r36203 + r36205;
        double r36207 = r36201 * r36206;
        double r36208 = r36207 - r36203;
        double r36209 = sqrt(r36208);
        double r36210 = r36196 / r36209;
        return r36210;
}

double f(double x, double l, double t) {
        double r36211 = t;
        double r36212 = -2.2617564443378798e+83;
        bool r36213 = r36211 <= r36212;
        double r36214 = 2.0;
        double r36215 = sqrt(r36214);
        double r36216 = r36215 * r36211;
        double r36217 = 3.0;
        double r36218 = pow(r36215, r36217);
        double r36219 = x;
        double r36220 = 2.0;
        double r36221 = pow(r36219, r36220);
        double r36222 = r36218 * r36221;
        double r36223 = r36211 / r36222;
        double r36224 = r36215 * r36221;
        double r36225 = r36211 / r36224;
        double r36226 = r36223 - r36225;
        double r36227 = r36214 * r36226;
        double r36228 = r36227 - r36216;
        double r36229 = r36215 * r36219;
        double r36230 = r36211 / r36229;
        double r36231 = r36214 * r36230;
        double r36232 = r36228 - r36231;
        double r36233 = r36216 / r36232;
        double r36234 = -4.70769518927892e-185;
        bool r36235 = r36211 <= r36234;
        double r36236 = sqrt(r36215);
        double r36237 = r36236 * r36211;
        double r36238 = r36236 * r36237;
        double r36239 = 4.0;
        double r36240 = pow(r36211, r36220);
        double r36241 = r36240 / r36219;
        double r36242 = r36239 * r36241;
        double r36243 = l;
        double r36244 = 1.0;
        double r36245 = pow(r36243, r36244);
        double r36246 = r36219 / r36243;
        double r36247 = r36245 / r36246;
        double r36248 = r36240 + r36247;
        double r36249 = r36214 * r36248;
        double r36250 = r36242 + r36249;
        double r36251 = sqrt(r36250);
        double r36252 = sqrt(r36251);
        double r36253 = r36252 * r36252;
        double r36254 = r36238 / r36253;
        double r36255 = -6.217242775864516e-226;
        bool r36256 = r36211 <= r36255;
        double r36257 = 6.267327751717996e+139;
        bool r36258 = r36211 <= r36257;
        double r36259 = r36216 / r36253;
        double r36260 = r36225 + r36230;
        double r36261 = r36214 * r36260;
        double r36262 = r36214 * r36223;
        double r36263 = r36216 - r36262;
        double r36264 = r36261 + r36263;
        double r36265 = r36216 / r36264;
        double r36266 = r36258 ? r36259 : r36265;
        double r36267 = r36256 ? r36233 : r36266;
        double r36268 = r36235 ? r36254 : r36267;
        double r36269 = r36213 ? r36233 : r36268;
        return r36269;
}

Error

Bits error versus x

Bits error versus l

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if t < -2.2617564443378798e+83 or -4.70769518927892e-185 < t < -6.217242775864516e-226

    1. Initial program 50.9

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

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

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

    if -2.2617564443378798e+83 < t < -4.70769518927892e-185

    1. Initial program 30.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 12.3

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{x}\right)}}}\]
    4. Using strategy rm
    5. Applied sqr-pow12.3

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \color{blue}{\frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{{\ell}^{\left(\frac{2}{2}\right)}}}}\right)}}\]
    7. Simplified7.2

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\color{blue}{\frac{x}{\ell}}}\right)}}\]
    8. Using strategy rm
    9. Applied add-sqr-sqrt7.2

      \[\leadsto \frac{\sqrt{\color{blue}{\sqrt{2} \cdot \sqrt{2}}} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)}}\]
    10. Applied sqrt-prod7.4

      \[\leadsto \frac{\color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)}}\]
    11. Applied associate-*l*7.3

      \[\leadsto \frac{\color{blue}{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)}}\]
    12. Using strategy rm
    13. Applied add-sqr-sqrt7.3

      \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\color{blue}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)} \cdot \sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)}}}}\]
    14. Applied sqrt-prod7.5

      \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\color{blue}{\sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)}}}}\]
    15. Simplified7.5

      \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\color{blue}{\sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}}} \cdot \sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)}}}\]
    16. Simplified7.5

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

    if -6.217242775864516e-226 < t < 6.267327751717996e+139

    1. Initial program 40.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 19.4

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{x}\right)}}}\]
    4. Using strategy rm
    5. Applied sqr-pow19.4

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \color{blue}{\frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{{\ell}^{\left(\frac{2}{2}\right)}}}}\right)}}\]
    7. Simplified15.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\color{blue}{\frac{x}{\ell}}}\right)}}\]
    8. Using strategy rm
    9. Applied add-sqr-sqrt15.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)} \cdot \sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}}\right)}}}}\]
    10. Applied sqrt-prod15.4

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

    if 6.267327751717996e+139 < t

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.26175644433788 \cdot 10^{83}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -4.7076951892789197 \cdot 10^{-185}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}}}\\ \mathbf{elif}\;t \le -6.2172427758645158 \cdot 10^{-226}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 6.2673277517179956 \cdot 10^{139}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}} \cdot \sqrt{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{1}}{\frac{x}{\ell}}\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{\sqrt{2} \cdot {x}^{2}} + \frac{t}{\sqrt{2} \cdot x}\right) + \left(\sqrt{2} \cdot t - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2020039 
(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)))))