Average Error: 42.5 → 9.4
Time: 58.0s
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 -2.2101802612850843 \cdot 10^{+48}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}} - \frac{2}{\sqrt{2}}\right) + \left((\left(\frac{2}{x}\right) \cdot \left(\frac{-t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_*\right))_*}\\ \mathbf{elif}\;t \le -7.784042218872189 \cdot 10^{-205}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(4 \cdot t\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{elif}\;t \le -3.4129710227704976 \cdot 10^{-251}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}} - \frac{2}{\sqrt{2}}\right) + \left((\left(\frac{2}{x}\right) \cdot \left(\frac{-t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_*\right))_*}\\ \mathbf{elif}\;t \le 1.5782693359173615 \cdot 10^{+123}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(4 \cdot t\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{2}{\sqrt{2}}\right) \cdot \left(\frac{\frac{t}{x}}{x} + \frac{t}{x}\right) + \left((\left(\frac{1}{\sqrt{2}}\right) \cdot \left(\frac{-t}{x \cdot x}\right) + \left(\sqrt{2} \cdot t\right))_*\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 < -2.2101802612850843e+48 or -7.784042218872189e-205 < t < -3.4129710227704976e-251

    1. Initial program 46.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 7.4

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

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

    if -2.2101802612850843e+48 < t < -7.784042218872189e-205 or -3.4129710227704976e-251 < t < 1.5782693359173615e+123

    1. Initial program 36.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 16.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. Simplified12.5

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

    if 1.5782693359173615e+123 < t

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.2101802612850843 \cdot 10^{+48}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}} - \frac{2}{\sqrt{2}}\right) + \left((\left(\frac{2}{x}\right) \cdot \left(\frac{-t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_*\right))_*}\\ \mathbf{elif}\;t \le -7.784042218872189 \cdot 10^{-205}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(4 \cdot t\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{elif}\;t \le -3.4129710227704976 \cdot 10^{-251}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}} - \frac{2}{\sqrt{2}}\right) + \left((\left(\frac{2}{x}\right) \cdot \left(\frac{-t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_*\right))_*}\\ \mathbf{elif}\;t \le 1.5782693359173615 \cdot 10^{+123}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(4 \cdot t\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{2}{\sqrt{2}}\right) \cdot \left(\frac{\frac{t}{x}}{x} + \frac{t}{x}\right) + \left((\left(\frac{1}{\sqrt{2}}\right) \cdot \left(\frac{-t}{x \cdot x}\right) + \left(\sqrt{2} \cdot t\right))_*\right))_*}\\ \end{array}\]

Runtime

Time bar (total: 58.0s)Debug logProfile

herbie shell --seed 2018216 +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)))))