Average Error: 42.5 → 9.2
Time: 1.8m
Precision: 64
Internal Precision: 1408
\[\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.7222463231464446 \cdot 10^{+119}:\\ \;\;\;\;\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 4.776380960244624 \cdot 10^{+22}:\\ \;\;\;\;\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.7222463231464446e+119

    1. Initial program 54.1

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

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

      \[\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.7222463231464446e+119 < t < 4.776380960244624e+22

    1. Initial program 38.9

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

      \[\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 4.776380960244624e+22 < t

    1. Initial program 42.4

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

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

      \[\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: 1.8m)Debug logProfile

herbie shell --seed '#(1070960995 739739648 2531964651 3069671617 351857262 3877178482)' +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)))))