Average Error: 42.7 → 9.5
Time: 4.5m
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 -7.800835805971171 \cdot 10^{+86}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{\frac{2}{\sqrt{2}}}{x}}{2} - \frac{2}{\sqrt{2}}\right) \cdot \frac{t}{x} - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 2.5496274767255345 \cdot 10^{+36}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right) + \left(\frac{\ell}{x} \cdot \sqrt{2}\right) \cdot \left(\sqrt{2} \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2}{x} + \frac{\frac{2}{x}}{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 3 regimes
  2. if t < -7.800835805971171e+86

    1. Initial program 48.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 48.0

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

      \[\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. Taylor expanded around -inf 3.5

      \[\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} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)}}\]
    5. Simplified3.5

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

    if -7.800835805971171e+86 < t < 2.5496274767255345e+36

    1. Initial program 39.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 18.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. Simplified14.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-sqrt14.4

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

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

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

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

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

    if 2.5496274767255345e+36 < t

    1. Initial program 44.4

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

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

      \[\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 3 regimes into one program.
  4. Final simplification9.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -7.800835805971171 \cdot 10^{+86}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{\frac{2}{\sqrt{2}}}{x}}{2} - \frac{2}{\sqrt{2}}\right) \cdot \frac{t}{x} - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 2.5496274767255345 \cdot 10^{+36}:\\ \;\;\;\;\frac{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(t \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{\left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right) + \left(\frac{\ell}{x} \cdot \sqrt{2}\right) \cdot \left(\sqrt{2} \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{2}{x} + \frac{\frac{2}{x}}{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 2019088 
(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)))))