Average Error: 42.5 → 8.7
Time: 1.9m
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 -9.210271440376194 \cdot 10^{-209}:\\ \;\;\;\;\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 2.1546190767309879 \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.2443316963376102 \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 5.874602440396584 \cdot 10^{+121}:\\ \;\;\;\;\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 -9.210271440376194e-209 < t < -3.4129710227704976e-251

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

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

      \[\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 < -9.210271440376194e-209 or -3.4129710227704976e-251 < t < 2.1546190767309879e-280 or 1.2443316963376102e-182 < t < 5.874602440396584e+121

    1. Initial program 33.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 14.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. Simplified10.1

      \[\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 2.1546190767309879e-280 < t < 1.2443316963376102e-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.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. Simplified32.8

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

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

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

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

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

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

      \[\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 5.874602440396584e+121 < t

    1. Initial program 53.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 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 -9.210271440376194 \cdot 10^{-209}:\\ \;\;\;\;\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 2.1546190767309879 \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.2443316963376102 \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 5.874602440396584 \cdot 10^{+121}:\\ \;\;\;\;\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.9m)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)))))