Average Error: 42.1 → 25.4
Time: 1.1m
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 -7.907131457727265 \cdot 10^{-161} \lor \neg \left(t \le 8.585117629949934 \cdot 10^{-125}\right):\\ \;\;\;\;\frac{\left(t \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)\right) \cdot \sqrt[3]{\sqrt{2}}}{\sqrt{\left(\frac{4}{x} + 2\right) \cdot \left(t \cdot t\right) + \frac{\ell}{x} \cdot \left(2 \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\sqrt{\left(2 - \frac{4}{x}\right) \cdot \left(\ell \cdot \left(2 \cdot \ell\right) + \left(\frac{4}{x} + 2\right) \cdot \left(\left(t \cdot x\right) \cdot t\right)\right)}}{\sqrt{\left(2 - \frac{4}{x}\right) \cdot x}}}\\ \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 2 regimes
  2. if t < -7.907131457727265e-161 or 8.585117629949934e-125 < t

    1. Initial program 37.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. Initial simplification37.7

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

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

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

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

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

    if -7.907131457727265e-161 < t < 8.585117629949934e-125

    1. Initial program 58.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. Initial simplification58.7

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

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

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

      \[\leadsto \frac{t \cdot \sqrt{2}}{\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)}}\]
    7. Applied associate-*l*26.7

      \[\leadsto \frac{t \cdot \sqrt{2}}{\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)}}\]
    8. Using strategy rm
    9. Applied flip-+26.7

      \[\leadsto \frac{t \cdot \sqrt{2}}{\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)}}\]
    10. Applied associate-*l/26.7

      \[\leadsto \frac{t \cdot \sqrt{2}}{\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}}}}}\]
    11. Applied associate-*l/26.7

      \[\leadsto \frac{t \cdot \sqrt{2}}{\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}}}}\]
    12. Applied associate-*r/28.7

      \[\leadsto \frac{t \cdot \sqrt{2}}{\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}}}}\]
    13. Applied frac-add29.0

      \[\leadsto \frac{t \cdot \sqrt{2}}{\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)}}}}\]
    14. Applied sqrt-div28.0

      \[\leadsto \frac{t \cdot \sqrt{2}}{\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)}}}}\]
    15. Simplified20.9

      \[\leadsto \frac{t \cdot \sqrt{2}}{\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)}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification25.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -7.907131457727265 \cdot 10^{-161} \lor \neg \left(t \le 8.585117629949934 \cdot 10^{-125}\right):\\ \;\;\;\;\frac{\left(t \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)\right) \cdot \sqrt[3]{\sqrt{2}}}{\sqrt{\left(\frac{4}{x} + 2\right) \cdot \left(t \cdot t\right) + \frac{\ell}{x} \cdot \left(2 \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{\sqrt{\left(2 - \frac{4}{x}\right) \cdot \left(\ell \cdot \left(2 \cdot \ell\right) + \left(\frac{4}{x} + 2\right) \cdot \left(\left(t \cdot x\right) \cdot t\right)\right)}}{\sqrt{\left(2 - \frac{4}{x}\right) \cdot x}}}\\ \end{array}\]

Runtime

Time bar (total: 1.1m)Debug logProfile

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