Average Error: 42.3 → 9.2
Time: 44.8s
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 -4.34365152350037 \cdot 10^{+49}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le -6.165739708625712 \cdot 10^{-209}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right))_*}}\\ \mathbf{elif}\;t \le -1.0115536373703033 \cdot 10^{-249}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le 1.8486538786678008 \cdot 10^{-196}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right))_*}}\\ \mathbf{elif}\;t \le 1.5573473699437125 \cdot 10^{-166}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{\sqrt{2} \cdot x}\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}}\\ \mathbf{elif}\;t \le 1.4089337893440048 \cdot 10^{+125}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{\sqrt{2} \cdot x}\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 < -4.34365152350037e+49 or -6.165739708625712e-209 < t < -1.0115536373703033e-249

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

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

    if -4.34365152350037e+49 < t < -6.165739708625712e-209 or -1.0115536373703033e-249 < t < 1.8486538786678008e-196 or 1.5573473699437125e-166 < t < 1.4089337893440048e+125

    1. Initial program 35.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 16.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. Simplified12.0

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

    if 1.8486538786678008e-196 < t < 1.5573473699437125e-166 or 1.4089337893440048e+125 < t

    1. Initial program 56.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 5.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -4.34365152350037 \cdot 10^{+49}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le -6.165739708625712 \cdot 10^{-209}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right))_*}}\\ \mathbf{elif}\;t \le -1.0115536373703033 \cdot 10^{-249}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le 1.8486538786678008 \cdot 10^{-196}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right))_*}}\\ \mathbf{elif}\;t \le 1.5573473699437125 \cdot 10^{-166}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{\sqrt{2} \cdot x}\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}}\\ \mathbf{elif}\;t \le 1.4089337893440048 \cdot 10^{+125}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{4 \cdot \left(t \cdot t\right)}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{\sqrt{2} \cdot x}\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 2019090 +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)))))