Average Error: 42.4 → 9.7
Time: 3.6m
Precision: 64
Internal Precision: 1344
\[\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.7710362359613171 \cdot 10^{+78}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{2 \cdot \frac{t}{{x}^{2} \cdot {\left(\sqrt{2}\right)}^{3}} - \left(\left(\frac{t}{x \cdot \sqrt{2}} \cdot 2 + 2 \cdot \frac{t}{{x}^{2} \cdot \sqrt{2}}\right) + t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 1.2921528621201326 \cdot 10^{-276} \lor \neg \left(t \le 1.0963571751894683 \cdot 10^{-162} \lor \neg \left(t \le 5.35556584533854 \cdot 10^{+37}\right)\right):\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\left(\sqrt{\frac{\ell}{\frac{x}{\ell}} + t \cdot t} \cdot \sqrt{\frac{\ell}{\frac{x}{\ell}} + t \cdot t}\right) \cdot 2 + 4 \cdot \frac{t}{\frac{x}{t}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(\left(\frac{t}{x \cdot \sqrt{2}} \cdot 2 + 2 \cdot \frac{t}{{x}^{2} \cdot \sqrt{2}}\right) + t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{x}^{2} \cdot {\left(\sqrt{2}\right)}^{3}}}\\ \end{array}\]

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 3 regimes
  2. if t < -1.7710362359613171e+78

    1. Initial program 46.8

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

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

    if -1.7710362359613171e+78 < t < 1.2921528621201326e-276 or 1.0963571751894683e-162 < t < 5.35556584533854e+37

    1. Initial program 36.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 15.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. Simplified11.4

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

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

    if 1.2921528621201326e-276 < t < 1.0963571751894683e-162 or 5.35556584533854e+37 < t

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.7710362359613171 \cdot 10^{+78}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{2 \cdot \frac{t}{{x}^{2} \cdot {\left(\sqrt{2}\right)}^{3}} - \left(\left(\frac{t}{x \cdot \sqrt{2}} \cdot 2 + 2 \cdot \frac{t}{{x}^{2} \cdot \sqrt{2}}\right) + t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \le 1.2921528621201326 \cdot 10^{-276} \lor \neg \left(t \le 1.0963571751894683 \cdot 10^{-162} \lor \neg \left(t \le 5.35556584533854 \cdot 10^{+37}\right)\right):\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\left(\sqrt{\frac{\ell}{\frac{x}{\ell}} + t \cdot t} \cdot \sqrt{\frac{\ell}{\frac{x}{\ell}} + t \cdot t}\right) \cdot 2 + 4 \cdot \frac{t}{\frac{x}{t}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(\left(\frac{t}{x \cdot \sqrt{2}} \cdot 2 + 2 \cdot \frac{t}{{x}^{2} \cdot \sqrt{2}}\right) + t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{x}^{2} \cdot {\left(\sqrt{2}\right)}^{3}}}\\ \end{array}\]

Runtime

Time bar (total: 3.6m)Debug logProfile

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