Average Error: 42.6 → 9.1
Time: 2.7m
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 -3.0455787307621947 \cdot 10^{+145}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_* - \left(\frac{2}{x} + 2\right) \cdot \frac{\frac{t}{x}}{\sqrt{2}}}\\ \mathbf{if}\;t \le 5.5216541725427274 \cdot 10^{-288} \lor \neg \left(t \le 3.2837604703102175 \cdot 10^{-231} \lor \neg \left(t \le 4.088619728431962 \cdot 10^{+114}\right)\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\left(t \cdot 4\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{2}{\sqrt{2}}\right) \cdot \left(\frac{t}{x \cdot 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 < -3.0455787307621947e+145

    1. Initial program 60.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 1.9

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

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

    if -3.0455787307621947e+145 < t < 5.5216541725427274e-288 or 3.2837604703102175e-231 < t < 4.088619728431962e+114

    1. Initial program 33.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 15.8

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

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

    if 5.5216541725427274e-288 < t < 3.2837604703102175e-231 or 4.088619728431962e+114 < t

    1. Initial program 54.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 8.3

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

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

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;t \le -3.0455787307621947 \cdot 10^{+145}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_* - \left(\frac{2}{x} + 2\right) \cdot \frac{\frac{t}{x}}{\sqrt{2}}}\\ \mathbf{if}\;t \le 5.5216541725427274 \cdot 10^{-288} \lor \neg \left(t \le 3.2837604703102175 \cdot 10^{-231} \lor \neg \left(t \le 4.088619728431962 \cdot 10^{+114}\right)\right):\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\left(t \cdot 4\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{2}{\sqrt{2}}\right) \cdot \left(\frac{t}{x \cdot 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: 2.7m)Debug logProfile

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