Average Error: 43.0 → 7.6
Time: 1.2m
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 -3.4832562786287344 \cdot 10^{+87}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{x}}{2 \cdot x} - \frac{t}{x}\right) \cdot \frac{2}{\sqrt{2}} - \left(\sqrt{2} \cdot t + \frac{\frac{t}{x}}{x} \cdot \frac{2}{\sqrt{2}}\right)}\\ \mathbf{elif}\;t \le -8.787981858707229 \cdot 10^{-157}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\left(\ell \cdot 2\right) \cdot \frac{1}{x}\right) \cdot \ell + \left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)}}\\ \mathbf{elif}\;t \le 3.7404028799839 \cdot 10^{-162}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\sqrt{\left(\left(\ell \cdot 2\right) \cdot \ell + \left(\left(x \cdot t\right) \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)\right) \cdot \left(2 - \frac{4}{x}\right)}}{\sqrt{\left(2 - \frac{4}{x}\right) \cdot x}}}\\ \mathbf{elif}\;t \le 1.7379016265185613 \cdot 10^{+100}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\left(\ell \cdot 2\right) \cdot \frac{1}{x}\right) \cdot \ell + \left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{t \cdot \left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right) + \left(t - \frac{t}{2}\right) \cdot \frac{\frac{\frac{2}{x}}{x}}{\sqrt{2}}}\\ \end{array}\]

Error

Bits error versus x

Bits error versus l

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if t < -3.4832562786287344e+87

    1. Initial program 50.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 3.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(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)\right)}}\]
    3. Simplified3.9

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

    if -3.4832562786287344e+87 < t < -8.787981858707229e-157 or 3.7404028799839e-162 < t < 1.7379016265185613e+100

    1. Initial program 26.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 10.2

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

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

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

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

    if -8.787981858707229e-157 < t < 3.7404028799839e-162

    1. Initial program 61.2

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\ell \cdot \left(\frac{1}{x} \cdot \left(\ell \cdot 2\right)\right)} + \left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right)}}\]
    7. Using strategy rm
    8. Applied flip-+30.8

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\frac{\left(\ell \cdot \left(1 \cdot \left(\ell \cdot 2\right)\right)\right) \cdot \left(2 - \frac{4}{x}\right) + x \cdot \left(\left(2 \cdot 2 - \frac{4}{x} \cdot \frac{4}{x}\right) \cdot \left(t \cdot t\right)\right)}{x \cdot \left(2 - \frac{4}{x}\right)}}}}\]
    13. Applied sqrt-div29.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\frac{\sqrt{\left(\ell \cdot \left(1 \cdot \left(\ell \cdot 2\right)\right)\right) \cdot \left(2 - \frac{4}{x}\right) + x \cdot \left(\left(2 \cdot 2 - \frac{4}{x} \cdot \frac{4}{x}\right) \cdot \left(t \cdot t\right)\right)}}{\sqrt{x \cdot \left(2 - \frac{4}{x}\right)}}}}\]
    14. Simplified22.0

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

    if 1.7379016265185613e+100 < t

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.4832562786287344 \cdot 10^{+87}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{x}}{2 \cdot x} - \frac{t}{x}\right) \cdot \frac{2}{\sqrt{2}} - \left(\sqrt{2} \cdot t + \frac{\frac{t}{x}}{x} \cdot \frac{2}{\sqrt{2}}\right)}\\ \mathbf{elif}\;t \le -8.787981858707229 \cdot 10^{-157}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\left(\ell \cdot 2\right) \cdot \frac{1}{x}\right) \cdot \ell + \left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)}}\\ \mathbf{elif}\;t \le 3.7404028799839 \cdot 10^{-162}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\sqrt{\left(\left(\ell \cdot 2\right) \cdot \ell + \left(\left(x \cdot t\right) \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)\right) \cdot \left(2 - \frac{4}{x}\right)}}{\sqrt{\left(2 - \frac{4}{x}\right) \cdot x}}}\\ \mathbf{elif}\;t \le 1.7379016265185613 \cdot 10^{+100}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\left(\ell \cdot 2\right) \cdot \frac{1}{x}\right) \cdot \ell + \left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{t \cdot \left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right) + \left(t - \frac{t}{2}\right) \cdot \frac{\frac{\frac{2}{x}}{x}}{\sqrt{2}}}\\ \end{array}\]

Runtime

Time bar (total: 1.2m)Debug logProfile

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