Average Error: 42.3 → 9.5
Time: 2.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 -1.2713468600972515 \cdot 10^{+111}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(1 - 2\right) \cdot \frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right) \cdot t}\\ \mathbf{if}\;t \le 7.31184934192413 \cdot 10^{-234} \lor \neg \left(t \le 1.4603304138205092 \cdot 10^{-154} \lor \neg \left(t \le 1.73537962790826 \cdot 10^{+86}\right)\right):\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right) + \frac{1}{\frac{\frac{x}{\ell}}{\ell \cdot 2}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right) \cdot t + \frac{t}{\left(x \cdot x\right) \cdot \sqrt{2}} \cdot \left(2 - 1\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 < -1.2713468600972515e+111

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

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

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

    if -1.2713468600972515e+111 < t < 7.31184934192413e-234 or 1.4603304138205092e-154 < t < 1.73537962790826e+86

    1. Initial program 35.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 16.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 simplify11.8

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

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

    if 7.31184934192413e-234 < t < 1.4603304138205092e-154 or 1.73537962790826e+86 < t

    1. Initial program 50.4

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

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

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

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;t \le -1.2713468600972515 \cdot 10^{+111}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(1 - 2\right) \cdot \frac{\frac{t}{\sqrt{2}}}{x \cdot x} - \left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right) \cdot t}\\ \mathbf{if}\;t \le 7.31184934192413 \cdot 10^{-234} \lor \neg \left(t \le 1.4603304138205092 \cdot 10^{-154} \lor \neg \left(t \le 1.73537962790826 \cdot 10^{+86}\right)\right):\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\left(2 + \frac{4}{x}\right) \cdot \left(t \cdot t\right) + \frac{1}{\frac{\frac{x}{\ell}}{\ell \cdot 2}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right) \cdot t + \frac{t}{\left(x \cdot x\right) \cdot \sqrt{2}} \cdot \left(2 - 1\right)}\\ \end{array}}\]

Runtime

Time bar (total: 2.2m)Debug logProfile

herbie shell --seed '#(1072107073 2127697367 3936270018 2300570620 2134894798 4023771849)' 
(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)))))