Average Error: 42.6 → 9.2
Time: 2.2m
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 -5.759173539703661 \cdot 10^{+112}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{(\left(\frac{1}{x \cdot x}\right) \cdot \left(\frac{t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_* - \frac{\frac{2}{x}}{\sqrt{2}} \cdot \left(\frac{t}{x} + t\right)}\\ \mathbf{if}\;t \le 1.438502252335871 \cdot 10^{+150}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\frac{4}{x} \cdot \left(t \cdot t\right)\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{(\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{\frac{t}{x}}{x}\right) + \left(t \cdot \sqrt{2}\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 < -5.759173539703661e+112

    1. Initial program 53.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 3.1

      \[\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} + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + 2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}}\right)\right)}}\]
    3. Applied simplify3.1

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

    if -5.759173539703661e+112 < t < 1.438502252335871e+150

    1. Initial program 35.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 17.4

      \[\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 simplify12.8

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

    if 1.438502252335871e+150 < t

    1. Initial program 60.8

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \sqrt{2}}{(\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{\frac{t}{x}}{x}\right) + \left(t \cdot \sqrt{2}\right))_*\right))_*}}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 2.2m)Debug logProfile

herbie shell --seed '#(1072330854 3074818769 591214268 3603999196 3863745332 3332387116)' +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)))))