Average Error: 42.4 → 9.3
Time: 49.4s
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 -1.3861410773366907 \cdot 10^{+109}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(-2\right) \cdot \frac{t}{x \cdot \sqrt{2}} + \sqrt{2} \cdot \left(-t\right)}\\ \mathbf{elif}\;t \le 1.2176509874903433 \cdot 10^{+118}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(t \cdot 4\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{\frac{2}{x}}{\sqrt{2}}\right) \cdot t + \left(\sqrt{2} \cdot t\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.3861410773366907e+109

    1. Initial program 51.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. Initial simplification51.5

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{(\left((2 \cdot \left(t \cdot t\right) + \left(\ell \cdot \ell\right))_*\right) \cdot \left(\frac{1 + x}{x - 1}\right) + \left(-\ell \cdot \ell\right))_*}}\]
    3. Taylor expanded around -inf 2.8

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

    if -1.3861410773366907e+109 < t < 1.2176509874903433e+118

    1. Initial program 36.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. Initial simplification36.4

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{(\left((2 \cdot \left(t \cdot t\right) + \left(\ell \cdot \ell\right))_*\right) \cdot \left(\frac{1 + x}{x - 1}\right) + \left(-\ell \cdot \ell\right))_*}}\]
    3. Taylor expanded around inf 17.7

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{\color{blue}{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{{\ell}^{2}}{x}\right)}}}\]
    4. Simplified13.1

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

    if 1.2176509874903433e+118 < t

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

      \[\leadsto \frac{t \cdot \sqrt{2}}{\sqrt{(\left((2 \cdot \left(t \cdot t\right) + \left(\ell \cdot \ell\right))_*\right) \cdot \left(\frac{1 + x}{x - 1}\right) + \left(-\ell \cdot \ell\right))_*}}\]
    3. Taylor expanded around inf 2.8

      \[\leadsto \frac{t \cdot \sqrt{2}}{\color{blue}{t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}}}\]
    4. Simplified2.8

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.3861410773366907 \cdot 10^{+109}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(-2\right) \cdot \frac{t}{x \cdot \sqrt{2}} + \sqrt{2} \cdot \left(-t\right)}\\ \mathbf{elif}\;t \le 1.2176509874903433 \cdot 10^{+118}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(t \cdot 4\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{\frac{2}{x}}{\sqrt{2}}\right) \cdot t + \left(\sqrt{2} \cdot t\right))_*}\\ \end{array}\]

Runtime

Time bar (total: 49.4s)Debug logProfile

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