Average Error: 42.3 → 9.2
Time: 2.7m
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 -129247.07234099421:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{2}{\sqrt{2}} \cdot \left(\frac{\frac{t}{x}}{x + x} - \frac{t}{x}\right) - \left(\frac{2}{\sqrt{2}} \cdot \frac{\frac{t}{x}}{x} + t \cdot \sqrt{2}\right)}\\ \mathbf{if}\;t \le -3.405576351488696 \cdot 10^{-209}:\\ \;\;\;\;\frac{\left(t \cdot \sqrt{\sqrt{2}}\right) \cdot \sqrt{\sqrt{2}}}{\sqrt{\frac{\ell}{x} \cdot \left(\ell + \ell\right) + \left(\frac{4}{x} + 2\right) \cdot \left(t \cdot t\right)}}\\ \mathbf{if}\;t \le 2.9382478114485943 \cdot 10^{-208}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{\sqrt{\left(\ell \cdot \left(\ell + \ell\right)\right) \cdot \left(\frac{4}{x} \cdot \frac{4}{x} + \left(2 \cdot 2 - \frac{4}{x} \cdot 2\right)\right) + x \cdot \left(\left({\left(\frac{4}{x}\right)}^{3} + {2}^{3}\right) \cdot \left(t \cdot t\right)\right)}}{\sqrt{x \cdot \left(\frac{4}{x} \cdot \frac{4}{x} + \left(2 \cdot 2 - \frac{4}{x} \cdot 2\right)\right)}}}\\ \mathbf{if}\;t \le 2.2122325362749126 \cdot 10^{-144}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{\frac{\frac{2}{x}}{\sqrt{2}}}{x} \cdot \left(t - \frac{t}{2}\right) + t \cdot \left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right)}\\ \mathbf{if}\;t \le 1.1804515088217623 \cdot 10^{+142}:\\ \;\;\;\;\frac{\left(t \cdot \sqrt{\sqrt{2}}\right) \cdot \sqrt{\sqrt{2}}}{\sqrt{\frac{\ell}{x} \cdot \left(\ell + \ell\right) + \left(\frac{4}{x} + 2\right) \cdot \left(t \cdot t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{\frac{\frac{2}{x}}{\sqrt{2}}}{x} \cdot \left(t - \frac{t}{2}\right) + t \cdot \left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right)}\\ \end{array}\]

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -129247.07234099421

    1. Initial program 40.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 5.9

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

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

    if -129247.07234099421 < t < -3.405576351488696e-209 or 2.2122325362749126e-144 < t < 1.1804515088217623e+142

    1. Initial program 29.3

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

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

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

      \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)}}{\sqrt{\frac{\ell}{x} \cdot \left(\ell + \ell\right) + \left(\frac{4}{x} + 2\right) \cdot \left(t \cdot t\right)}}\]
    6. Applied associate-*r*7.2

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

    if -3.405576351488696e-209 < t < 2.9382478114485943e-208

    1. Initial program 61.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 31.4

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

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

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

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

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

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

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

    if 2.9382478114485943e-208 < t < 2.2122325362749126e-144 or 1.1804515088217623e+142 < t

    1. Initial program 57.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 7.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 simplify7.8

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

Runtime

Time bar (total: 2.7m)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' 
(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)))))