Average Error: 42.5 → 9.9
Time: 36.7s
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 -116185823.38286732:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{\frac{2}{x}}{x}\right) \cdot \left(\frac{t}{2 \cdot \sqrt{2}}\right) + \left(-(t \cdot \left(\sqrt{2}\right) + \left(\frac{t}{\sqrt{2}} \cdot \left(\frac{2}{x} + \frac{\frac{2}{x}}{x}\right)\right))_*\right))_*}\\ \mathbf{elif}\;t \le -4.699564094972082 \cdot 10^{-157}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{(\left(\frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \left(\left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)\right))_*}}\\ \mathbf{elif}\;t \le -5.874223708412311 \cdot 10^{-281}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{\frac{2}{x}}{x}\right) \cdot \left(\frac{t}{2 \cdot \sqrt{2}}\right) + \left(-(t \cdot \left(\sqrt{2}\right) + \left(\frac{t}{\sqrt{2}} \cdot \left(\frac{2}{x} + \frac{\frac{2}{x}}{x}\right)\right))_*\right))_*}\\ \mathbf{elif}\;t \le 22733256174400524.0:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{(\left(\frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \left(\left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot \sqrt{2}}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_* + \left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x}}\\ \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 < -116185823.38286732 or -4.699564094972082e-157 < t < -5.874223708412311e-281

    1. Initial program 45.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 11.7

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

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

    if -116185823.38286732 < t < -4.699564094972082e-157 or -5.874223708412311e-281 < t < 22733256174400524.0

    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 16.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. Simplified16.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{(\left(\frac{\ell \cdot \ell}{x}\right) \cdot 2 + \left(\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right)\right))_*}}}\]
    4. Using strategy rm
    5. Applied associate-/l*12.2

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{(\color{blue}{\left(\frac{\ell}{\frac{x}{\ell}}\right)} \cdot 2 + \left(\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right)\right))_*}}\]
    6. Using strategy rm
    7. Applied add-sqr-sqrt12.3

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

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

    if 22733256174400524.0 < t

    1. Initial program 42.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 4.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. Simplified4.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -116185823.38286732:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{\frac{2}{x}}{x}\right) \cdot \left(\frac{t}{2 \cdot \sqrt{2}}\right) + \left(-(t \cdot \left(\sqrt{2}\right) + \left(\frac{t}{\sqrt{2}} \cdot \left(\frac{2}{x} + \frac{\frac{2}{x}}{x}\right)\right))_*\right))_*}\\ \mathbf{elif}\;t \le -4.699564094972082 \cdot 10^{-157}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{(\left(\frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \left(\left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)\right))_*}}\\ \mathbf{elif}\;t \le -5.874223708412311 \cdot 10^{-281}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{\frac{2}{x}}{x}\right) \cdot \left(\frac{t}{2 \cdot \sqrt{2}}\right) + \left(-(t \cdot \left(\sqrt{2}\right) + \left(\frac{t}{\sqrt{2}} \cdot \left(\frac{2}{x} + \frac{\frac{2}{x}}{x}\right)\right))_*\right))_*}\\ \mathbf{elif}\;t \le 22733256174400524.0:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{(\left(\frac{\ell}{\frac{x}{\ell}}\right) \cdot 2 + \left(\left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot \sqrt{2}}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_* + \left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019068 +o rules:numerics
(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)))))