Average Error: 42.2 → 8.9
Time: 40.5s
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 -4.210471159488564 \cdot 10^{+101}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le 1.1295388211435537 \cdot 10^{+54}:\\ \;\;\;\;\frac{\left(\left(\sqrt{\sqrt{2}} \cdot t\right) \cdot \sqrt{\sqrt{\sqrt{2}}}\right) \cdot \sqrt{\sqrt{\sqrt{2}}}}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{\sqrt{2} \cdot x}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_* + \left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x}}\\ \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 < -4.210471159488564e+101

    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.6

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

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

    if -4.210471159488564e+101 < t < 1.1295388211435537e+54

    1. Initial program 38.1

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}}\]
    4. Taylor expanded around inf 17.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)}}}\]
    5. Simplified13.2

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

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

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

      \[\leadsto \frac{\color{blue}{\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot t\right)}}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\]
    10. Using strategy rm
    11. Applied add-sqr-sqrt13.2

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

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

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

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

    if 1.1295388211435537e+54 < t

    1. Initial program 43.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 3.9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -4.210471159488564 \cdot 10^{+101}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x} - (t \cdot \left(\sqrt{2}\right) + \left(\frac{2}{\sqrt{2}} \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right)\right))_*}\\ \mathbf{elif}\;t \le 1.1295388211435537 \cdot 10^{+54}:\\ \;\;\;\;\frac{\left(\left(\sqrt{\sqrt{2}} \cdot t\right) \cdot \sqrt{\sqrt{\sqrt{2}}}\right) \cdot \sqrt{\sqrt{\sqrt{2}}}}{\sqrt{(\left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) \cdot 2 + \left(\frac{\left(t \cdot t\right) \cdot 4}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{\sqrt{2} \cdot x}\right) \cdot 2 + \left(\sqrt{2} \cdot t\right))_* + \left(\frac{t}{\sqrt{2}} - \frac{\frac{t}{\sqrt{2}}}{2}\right) \cdot \frac{\frac{2}{x}}{x}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019089 +o rules:numerics
(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)))))