Average Error: 42.3 → 9.0
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.2723937600129117 \cdot 10^{+124}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(\frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \frac{t}{x} \cdot \frac{\frac{2}{x}}{\sqrt{2}}\right) - t \cdot \left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right)}\\ \mathbf{if}\;t \le 2.639444841744209 \cdot 10^{-258}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{\sqrt{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)}}} \cdot \frac{t}{\sqrt{\sqrt{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)}}}\\ \mathbf{if}\;t \le 1.0741008202836691 \cdot 10^{-159}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \left(\sqrt{2} + \frac{\frac{2}{x}}{\sqrt{2}}\right) + \left(\frac{t + t}{\left(x \cdot x\right) \cdot \sqrt{2}} - \frac{\frac{\frac{t}{x}}{x}}{\sqrt{2}}\right)}\\ \mathbf{if}\;t \le 1.0330302136080365 \cdot 10^{+41}:\\ \;\;\;\;\frac{\sqrt{2}}{\sqrt{\sqrt{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)}}} \cdot \frac{t}{\sqrt{\sqrt{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \left(\sqrt{2} + \frac{\frac{2}{x}}{\sqrt{2}}\right) + \left(\frac{t + t}{\left(x \cdot x\right) \cdot \sqrt{2}} - \frac{\frac{\frac{t}{x}}{x}}{\sqrt{2}}\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.2723937600129117e+124

    1. Initial program 54.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 2.9

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

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

    if -1.2723937600129117e+124 < t < 2.639444841744209e-258 or 1.0741008202836691e-159 < t < 1.0330302136080365e+41

    1. Initial program 34.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 15.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{{\ell}^{2}}{x}\right)}}}\]
    3. Using strategy rm
    4. Applied unpow215.1

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{x}\right)}}\]
    5. Applied associate-/l*10.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \color{blue}{\frac{\ell}{\frac{x}{\ell}}}\right)}}\]
    6. Using strategy rm
    7. Applied add-sqr-sqrt10.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\sqrt{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)} \cdot \sqrt{2 \cdot {t}^{2} + \left(4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \frac{\ell}{\frac{x}{\ell}}\right)}}}}\]
    8. Applied sqrt-prod10.7

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

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

    if 2.639444841744209e-258 < t < 1.0741008202836691e-159 or 1.0330302136080365e+41 < t

    1. Initial program 47.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 9.8

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

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

Runtime

Time bar (total: 2.2m)Debug log

herbie shell --seed '#(2479486159 2123901208 2662424940 349789437 14252662 202027171)' 
(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)))))