Average Error: 42.0 → 9.0
Time: 50.9s
Precision: 64
Internal Precision: 128
\[\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 -8.835068938380414 \cdot 10^{+149}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x \cdot x} \cdot \frac{1}{\sqrt{2}} - \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right) + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le -7.684766596471823 \cdot 10^{-158}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 \cdot \ell\right) \cdot \frac{\ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\ \mathbf{elif}\;t \le 6.485189659246009 \cdot 10^{-247}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\frac{\sqrt{2 \cdot \left(\left(4 - \left(2 - \frac{4}{x}\right) \cdot \frac{4}{x}\right) \cdot \left(\ell \cdot \ell\right)\right) + \left(\frac{\frac{64}{x \cdot x}}{x} + 8\right) \cdot \left(x \cdot \left(t \cdot t\right)\right)}}{\sqrt{x \cdot \left(\frac{4}{x} \cdot \frac{4}{x} + \left(4 - 2 \cdot \frac{4}{x}\right)\right)}}}\\ \mathbf{elif}\;t \le 303734995.39287955:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 \cdot \ell\right) \cdot \frac{\ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{2}{x}}{x} + \frac{2}{x}\right) \cdot \frac{t}{\sqrt{2}} + \left(\sqrt{2} \cdot t - \frac{t}{x \cdot x} \cdot \frac{1}{\sqrt{2}}\right)}\\ \end{array}\]

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -8.835068938380414e+149

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

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

    if -8.835068938380414e+149 < t < -7.684766596471823e-158 or 6.485189659246009e-247 < t < 303734995.39287955

    1. Initial program 29.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 12.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. Simplified8.1

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

    if -7.684766596471823e-158 < t < 6.485189659246009e-247

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}}{\sqrt{\left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right) + \left(\ell \cdot 2\right) \cdot \frac{\ell}{x}}}\]
    8. Using strategy rm
    9. Applied associate-*r/31.2

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

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

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

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

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

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

    if 303734995.39287955 < t

    1. Initial program 41.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 5.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -8.835068938380414 \cdot 10^{+149}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{t}{x \cdot x} \cdot \frac{1}{\sqrt{2}} - \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right) + \sqrt{2} \cdot t\right)}\\ \mathbf{elif}\;t \le -7.684766596471823 \cdot 10^{-158}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 \cdot \ell\right) \cdot \frac{\ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\ \mathbf{elif}\;t \le 6.485189659246009 \cdot 10^{-247}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}{\frac{\sqrt{2 \cdot \left(\left(4 - \left(2 - \frac{4}{x}\right) \cdot \frac{4}{x}\right) \cdot \left(\ell \cdot \ell\right)\right) + \left(\frac{\frac{64}{x \cdot x}}{x} + 8\right) \cdot \left(x \cdot \left(t \cdot t\right)\right)}}{\sqrt{x \cdot \left(\frac{4}{x} \cdot \frac{4}{x} + \left(4 - 2 \cdot \frac{4}{x}\right)\right)}}}\\ \mathbf{elif}\;t \le 303734995.39287955:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(2 \cdot \ell\right) \cdot \frac{\ell}{x} + \left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{2}{x}}{x} + \frac{2}{x}\right) \cdot \frac{t}{\sqrt{2}} + \left(\sqrt{2} \cdot t - \frac{t}{x \cdot x} \cdot \frac{1}{\sqrt{2}}\right)}\\ \end{array}\]

Reproduce

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