Average Error: 42.5 → 9.9
Time: 2.4m
Precision: 64
Internal Precision: 1408
\[\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 -6.447314359762627 \cdot 10^{+120}:\\ \;\;\;\;\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)}\\ \mathbf{if}\;t \le 2.2327750609834536 \cdot 10^{-213}:\\ \;\;\;\;\frac{\left(t \cdot \sqrt{\sqrt{2}}\right) \cdot \sqrt{\sqrt{2}}}{\sqrt{\left(\frac{4}{x} + 2\right) \cdot \left(t \cdot t\right) + \frac{2 \cdot \ell}{\frac{x}{\ell}}}}\\ \mathbf{if}\;t \le 1.7113149206191654 \cdot 10^{-132}:\\ \;\;\;\;\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)}\\ \mathbf{if}\;t \le 4.776380960244624 \cdot 10^{+22}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{\sqrt{\left(\frac{4}{x} + 2\right) \cdot \left(t \cdot t\right) + \frac{2 \cdot \ell}{\frac{x}{\ell}}}} \cdot \sqrt{\sqrt{\left(\frac{4}{x} + 2\right) \cdot \left(t \cdot t\right) + \frac{2 \cdot \ell}{\frac{x}{\ell}}}}}\\ \mathbf{else}:\\ \;\;\;\;\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)}\\ \end{array}\]

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 4 regimes
  2. if t < -6.447314359762627e+120

    1. Initial program 54.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 2.2

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

      \[\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 -6.447314359762627e+120 < t < 2.2327750609834536e-213

    1. Initial program 40.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 19.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 simplify15.6

      \[\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 add-sqr-sqrt15.8

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

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

    if 2.2327750609834536e-213 < t < 1.7113149206191654e-132 or 4.776380960244624e+22 < t

    1. Initial program 44.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 9.0

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

      \[\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)}}\]

    if 1.7113149206191654e-132 < t < 4.776380960244624e+22

    1. Initial program 29.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 10.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. Applied simplify5.1

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

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

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

Runtime

Time bar (total: 2.4m)Debug logProfile

herbie shell --seed '#(1070960995 739739648 2531964651 3069671617 351857262 3877178482)' 
(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)))))