Average Error: 42.3 → 9.7
Time: 40.0s
Precision: 64
Internal Precision: 128
\[\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.490610966375798 \cdot 10^{+69}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{\frac{t}{\sqrt{2}}}{2} - \frac{t}{\sqrt{2}}\right) \cdot \frac{\frac{2}{x}}{x} - \sqrt{2} \cdot t\right) + \frac{\frac{t}{\sqrt{2}}}{x} \cdot -2}\\ \mathbf{elif}\;t \le -2.91378921224821 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{t \cdot \left(\left(2 + \frac{4}{x}\right) \cdot t\right) + \frac{2}{\frac{x}{\ell}} \cdot \ell}}\\ \mathbf{elif}\;t \le -4.108246093542033 \cdot 10^{-307}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{\frac{t}{\sqrt{2}}}{2} - \frac{t}{\sqrt{2}}\right) \cdot \frac{\frac{2}{x}}{x} - \sqrt{2} \cdot t\right) + \frac{\frac{t}{\sqrt{2}}}{x} \cdot -2}\\ \mathbf{elif}\;t \le 1.4807650036813056 \cdot 10^{+79}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{t \cdot \left(\left(2 + \frac{4}{x}\right) \cdot t\right) + \frac{2}{\frac{x}{\ell}} \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\sqrt{2} \cdot t + \frac{2 \cdot \frac{t}{\sqrt{2}}}{x}\right) + \left(\frac{2 \cdot \frac{t}{\sqrt{2}}}{x \cdot x} - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\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.490610966375798e+69 or -2.91378921224821e-160 < t < -4.108246093542033e-307

    1. Initial program 50.7

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

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

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

    if -1.490610966375798e+69 < t < -2.91378921224821e-160 or -4.108246093542033e-307 < t < 1.4807650036813056e+79

    1. Initial program 33.7

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\ell \cdot 2}{\frac{x}{\ell}} + t \cdot \left(t \cdot \left(2 + \frac{4}{x}\right)\right)}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity10.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\frac{\ell \cdot 2}{\color{blue}{1 \cdot \frac{x}{\ell}}} + t \cdot \left(t \cdot \left(2 + \frac{4}{x}\right)\right)}}\]
    6. Applied times-frac10.3

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

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

    if 1.4807650036813056e+79 < t

    1. Initial program 48.7

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.490610966375798 \cdot 10^{+69}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{\frac{t}{\sqrt{2}}}{2} - \frac{t}{\sqrt{2}}\right) \cdot \frac{\frac{2}{x}}{x} - \sqrt{2} \cdot t\right) + \frac{\frac{t}{\sqrt{2}}}{x} \cdot -2}\\ \mathbf{elif}\;t \le -2.91378921224821 \cdot 10^{-160}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{t \cdot \left(\left(2 + \frac{4}{x}\right) \cdot t\right) + \frac{2}{\frac{x}{\ell}} \cdot \ell}}\\ \mathbf{elif}\;t \le -4.108246093542033 \cdot 10^{-307}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\left(\frac{\frac{t}{\sqrt{2}}}{2} - \frac{t}{\sqrt{2}}\right) \cdot \frac{\frac{2}{x}}{x} - \sqrt{2} \cdot t\right) + \frac{\frac{t}{\sqrt{2}}}{x} \cdot -2}\\ \mathbf{elif}\;t \le 1.4807650036813056 \cdot 10^{+79}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{t \cdot \left(\left(2 + \frac{4}{x}\right) \cdot t\right) + \frac{2}{\frac{x}{\ell}} \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\sqrt{2} \cdot t + \frac{2 \cdot \frac{t}{\sqrt{2}}}{x}\right) + \left(\frac{2 \cdot \frac{t}{\sqrt{2}}}{x \cdot x} - \frac{\frac{t}{\sqrt{2}}}{x \cdot x}\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2019093 
(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)))))