Average Error: 42.7 → 8.9
Time: 2.2m
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 -1.294830867066344 \cdot 10^{+126}:\\ \;\;\;\;\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.716194029775394 \cdot 10^{-272}:\\ \;\;\;\;\frac{\left(t \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)\right) \cdot \sqrt[3]{\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{if}\;t \le 5.835333836177337 \cdot 10^{-171}:\\ \;\;\;\;\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))_*}\\ \mathbf{if}\;t \le 6.073782753833532 \cdot 10^{+111}:\\ \;\;\;\;\frac{\left(t \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)\right) \cdot \sqrt[3]{\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 < -1.294830867066344e+126

    1. Initial program 55.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 2.7

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

      \[\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 -1.294830867066344e+126 < t < 4.716194029775394e-272 or 5.835333836177337e-171 < t < 6.073782753833532e+111

    1. Initial program 33.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 15.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. Applied simplify10.4

      \[\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))_*}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt10.4

      \[\leadsto \frac{t \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}\right)}}{\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))_*}}\]
    6. Applied associate-*r*10.4

      \[\leadsto \frac{\color{blue}{\left(t \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)\right) \cdot \sqrt[3]{\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.716194029775394e-272 < t < 5.835333836177337e-171 or 6.073782753833532e+111 < t

    1. Initial program 54.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 10.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 simplify10.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 '#(1070386091 2509006183 1430610344 1025408621 36622005 1425925650)' +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)))))