Average Error: 42.2 → 9.1
Time: 55.0s
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.04804877865123 \cdot 10^{+57}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{\frac{2}{\sqrt{2}}}{x}}{2} - \frac{2}{\sqrt{2}}\right) \cdot \frac{t}{x} - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 1.1295388211435537 \cdot 10^{+54}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right) + \left(2 \cdot \ell\right) \cdot \frac{\ell}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\sqrt{2} \cdot t - \frac{t}{x \cdot x} \cdot \frac{1}{\sqrt{2}}\right) + \frac{t}{\sqrt{2}} \cdot \left(\frac{\frac{2}{x}}{x} + \frac{2}{x}\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 < -7.04804877865123e+57

    1. Initial program 45.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 44.6

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

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

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

    if -7.04804877865123e+57 < t < 1.1295388211435537e+54

    1. Initial program 39.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 17.7

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(t \cdot t\right) \cdot \left(\frac{4}{x} + 2\right) + \left(\ell \cdot 2\right) \cdot \frac{\ell}{x}}}}\]
    4. Taylor expanded around inf 13.7

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

    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{t}{\sqrt{2}} \cdot \left(\frac{2}{x} + \frac{\frac{2}{x}}{x}\right) + \left(\sqrt{2} \cdot t - \frac{1}{\sqrt{2}} \cdot \frac{t}{x \cdot x}\right)}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification9.1

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

Reproduce

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