Average Error: 42.5 → 8.7
Time: 1.1m
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 -2.2101802612850843 \cdot 10^{+48}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(1 - 2\right) \cdot \frac{t}{\left(x \cdot x\right) \cdot \sqrt{2}} - \left(\sqrt{2} + \frac{\frac{2}{x}}{\sqrt{2}}\right) \cdot t}\\ \mathbf{elif}\;t \le -7.784042218872189 \cdot 10^{-205}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right) + \left(\ell \cdot 2\right) \cdot \frac{\ell}{x}}}\\ \mathbf{elif}\;t \le -3.4129710227704976 \cdot 10^{-251}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(1 - 2\right) \cdot \frac{t}{\left(x \cdot x\right) \cdot \sqrt{2}} - \left(\sqrt{2} + \frac{\frac{2}{x}}{\sqrt{2}}\right) \cdot t}\\ \mathbf{elif}\;t \le 9.210517229252637 \cdot 10^{-280}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right) + \left(\ell \cdot 2\right) \cdot \frac{\ell}{x}}}\\ \mathbf{elif}\;t \le 1.1694712269704098 \cdot 10^{-182}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\sqrt{\left(2 - \frac{4}{x}\right) \cdot \left(\left(\ell \cdot 2\right) \cdot \ell + \left(t \cdot \left(t \cdot x\right)\right) \cdot \left(2 + \frac{4}{x}\right)\right)}}{\sqrt{\left(2 - \frac{4}{x}\right) \cdot x}}}\\ \mathbf{elif}\;t \le 1.2398920953191647 \cdot 10^{+123}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right) + \left(\ell \cdot 2\right) \cdot \frac{\ell}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\sqrt{2} + \frac{\frac{2}{x}}{\sqrt{2}}\right) \cdot t + \frac{\frac{t}{\sqrt{2}}}{x \cdot x} \cdot \left(2 - 1\right)}\\ \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 4 regimes
  2. if t < -2.2101802612850843e+48 or -7.784042218872189e-205 < t < -3.4129710227704976e-251

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

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

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

    if -2.2101802612850843e+48 < t < -7.784042218872189e-205 or -3.4129710227704976e-251 < t < 9.210517229252637e-280 or 1.1694712269704098e-182 < t < 1.2398920953191647e+123

    1. Initial program 33.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 14.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)}}}\]
    3. Simplified10.0

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

    if 9.210517229252637e-280 < t < 1.1694712269704098e-182

    1. Initial program 62.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 34.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)}}}\]
    3. Simplified32.7

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

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

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

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

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

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

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

    if 1.2398920953191647e+123 < t

    1. Initial program 54.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 2.5

      \[\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. Simplified2.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.2101802612850843 \cdot 10^{+48}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(1 - 2\right) \cdot \frac{t}{\left(x \cdot x\right) \cdot \sqrt{2}} - \left(\sqrt{2} + \frac{\frac{2}{x}}{\sqrt{2}}\right) \cdot t}\\ \mathbf{elif}\;t \le -7.784042218872189 \cdot 10^{-205}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right) + \left(\ell \cdot 2\right) \cdot \frac{\ell}{x}}}\\ \mathbf{elif}\;t \le -3.4129710227704976 \cdot 10^{-251}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(1 - 2\right) \cdot \frac{t}{\left(x \cdot x\right) \cdot \sqrt{2}} - \left(\sqrt{2} + \frac{\frac{2}{x}}{\sqrt{2}}\right) \cdot t}\\ \mathbf{elif}\;t \le 9.210517229252637 \cdot 10^{-280}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right) + \left(\ell \cdot 2\right) \cdot \frac{\ell}{x}}}\\ \mathbf{elif}\;t \le 1.1694712269704098 \cdot 10^{-182}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\sqrt{\left(2 - \frac{4}{x}\right) \cdot \left(\left(\ell \cdot 2\right) \cdot \ell + \left(t \cdot \left(t \cdot x\right)\right) \cdot \left(2 + \frac{4}{x}\right)\right)}}{\sqrt{\left(2 - \frac{4}{x}\right) \cdot x}}}\\ \mathbf{elif}\;t \le 1.2398920953191647 \cdot 10^{+123}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right) + \left(\ell \cdot 2\right) \cdot \frac{\ell}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\sqrt{2} + \frac{\frac{2}{x}}{\sqrt{2}}\right) \cdot t + \frac{\frac{t}{\sqrt{2}}}{x \cdot x} \cdot \left(2 - 1\right)}\\ \end{array}\]

Runtime

Time bar (total: 1.1m)Debug logProfile

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