Average Error: 42.3 → 8.9
Time: 1.4m
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 -3.117428368383153 \cdot 10^{+112}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \sqrt{2} \cdot t\right) - \left(\frac{2 \cdot \frac{t}{\sqrt{2}}}{x} + 2 \cdot \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le -6.590828423819892 \cdot 10^{-242}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{\left(2 \cdot \ell\right) \cdot \frac{\ell}{x} + \left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)}}\\ \mathbf{elif}\;t \le -1.5989301694764613 \cdot 10^{-300}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \sqrt{2} \cdot t\right) - \left(\frac{2 \cdot \frac{t}{\sqrt{2}}}{x} + 2 \cdot \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 2.6323615938124934 \cdot 10^{-179}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\frac{\sqrt{\left(2 - \frac{4}{x}\right) \cdot \left(\left(2 \cdot \ell\right) \cdot \ell + \left(\left(\frac{4}{x} + 2\right) \cdot x\right) \cdot \left(t \cdot t\right)\right)}}{\sqrt{x \cdot \left(2 - \frac{4}{x}\right)}}}\\ \mathbf{elif}\;t \le 1.4508073958694626 \cdot 10^{-156}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{t}{x \cdot x} + \frac{t}{x}\right) - \frac{\frac{t}{x \cdot x}}{2}\right) \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 7.641252240928424 \cdot 10^{+125}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{\left(2 \cdot \ell\right) \cdot \frac{\ell}{x} + \left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{t}{x \cdot x} + \frac{t}{x}\right) - \frac{\frac{t}{x \cdot x}}{2}\right) \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t}\\ \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 < -3.117428368383153e+112 or -6.590828423819892e-242 < t < -1.5989301694764613e-300

    1. Initial program 54.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 9.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(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)\right)}}\]
    3. Simplified9.1

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

    if -3.117428368383153e+112 < t < -6.590828423819892e-242 or 1.4508073958694626e-156 < t < 7.641252240928424e+125

    1. Initial program 28.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.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. Simplified7.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 add-sqr-sqrt7.9

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

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

    if -1.5989301694764613e-300 < t < 2.6323615938124934e-179

    1. Initial program 61.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 30.7

      \[\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. Simplified28.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 add-sqr-sqrt28.8

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

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

      \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\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)}}\]
    9. Applied associate-*l/28.8

      \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\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}}}}}\]
    10. Applied associate-*l/30.8

      \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\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}}}}\]
    11. Applied frac-add31.0

      \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\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)}}}}\]
    12. Applied sqrt-div25.6

      \[\leadsto \frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\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)}}}}\]
    13. Simplified25.6

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

    if 2.6323615938124934e-179 < t < 1.4508073958694626e-156 or 7.641252240928424e+125 < t

    1. Initial program 55.0

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.117428368383153 \cdot 10^{+112}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \sqrt{2} \cdot t\right) - \left(\frac{2 \cdot \frac{t}{\sqrt{2}}}{x} + 2 \cdot \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le -6.590828423819892 \cdot 10^{-242}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{\left(2 \cdot \ell\right) \cdot \frac{\ell}{x} + \left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)}}\\ \mathbf{elif}\;t \le -1.5989301694764613 \cdot 10^{-300}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \sqrt{2} \cdot t\right) - \left(\frac{2 \cdot \frac{t}{\sqrt{2}}}{x} + 2 \cdot \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \mathbf{elif}\;t \le 2.6323615938124934 \cdot 10^{-179}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\frac{\sqrt{\left(2 - \frac{4}{x}\right) \cdot \left(\left(2 \cdot \ell\right) \cdot \ell + \left(\left(\frac{4}{x} + 2\right) \cdot x\right) \cdot \left(t \cdot t\right)\right)}}{\sqrt{x \cdot \left(2 - \frac{4}{x}\right)}}}\\ \mathbf{elif}\;t \le 1.4508073958694626 \cdot 10^{-156}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{t}{x \cdot x} + \frac{t}{x}\right) - \frac{\frac{t}{x \cdot x}}{2}\right) \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 7.641252240928424 \cdot 10^{+125}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{\left(2 \cdot \ell\right) \cdot \frac{\ell}{x} + \left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{t}{x \cdot x} + \frac{t}{x}\right) - \frac{\frac{t}{x \cdot x}}{2}\right) \cdot \frac{2}{\sqrt{2}} + \sqrt{2} \cdot t}\\ \end{array}\]

Runtime

Time bar (total: 1.4m)Debug logProfile

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