Average Error: 43.4 → 9.2
Time: 9.1s
Precision: binary64
\[\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 -3.0293523645168547 \cdot 10^{106}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{t}{\sqrt{2} \cdot \left(x \cdot x\right)} - \left(t \cdot \sqrt{2} + \sqrt{2} \cdot \frac{t}{x}\right)}\\ \mathbf{elif}\;t \le 9.83848252578004774 \cdot 10^{101}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot \left(\sqrt{t \cdot t + \ell \cdot \frac{\ell}{x}} \cdot \sqrt{t \cdot t + \ell \cdot \frac{\ell}{x}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2} + \left(\sqrt{2} \cdot \frac{t}{x} - \frac{t}{\sqrt{2} \cdot \left(x \cdot x\right)}\right)}\\ \end{array}\]
\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 -3.0293523645168547 \cdot 10^{106}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{t}{\sqrt{2} \cdot \left(x \cdot x\right)} - \left(t \cdot \sqrt{2} + \sqrt{2} \cdot \frac{t}{x}\right)}\\

\mathbf{elif}\;t \le 9.83848252578004774 \cdot 10^{101}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot \left(\sqrt{t \cdot t + \ell \cdot \frac{\ell}{x}} \cdot \sqrt{t \cdot t + \ell \cdot \frac{\ell}{x}}\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2} + \left(\sqrt{2} \cdot \frac{t}{x} - \frac{t}{\sqrt{2} \cdot \left(x \cdot x\right)}\right)}\\

\end{array}
double code(double x, double l, double t) {
	return ((double) (((double) (((double) sqrt(2.0)) * t)) / ((double) sqrt(((double) (((double) (((double) (((double) (x + 1.0)) / ((double) (x - 1.0)))) * ((double) (((double) (l * l)) + ((double) (2.0 * ((double) (t * t)))))))) - ((double) (l * l))))))));
}
double code(double x, double l, double t) {
	double VAR;
	if ((t <= -3.0293523645168547e+106)) {
		VAR = ((double) (((double) (t * ((double) sqrt(2.0)))) / ((double) (((double) (t / ((double) (((double) sqrt(2.0)) * ((double) (x * x)))))) - ((double) (((double) (t * ((double) sqrt(2.0)))) + ((double) (((double) sqrt(2.0)) * ((double) (t / x))))))))));
	} else {
		double VAR_1;
		if ((t <= 9.838482525780048e+101)) {
			VAR_1 = ((double) (((double) (t * ((double) sqrt(2.0)))) / ((double) sqrt(((double) (((double) (4.0 * ((double) (t / ((double) (x / t)))))) + ((double) (2.0 * ((double) (((double) sqrt(((double) (((double) (t * t)) + ((double) (l * ((double) (l / x)))))))) * ((double) sqrt(((double) (((double) (t * t)) + ((double) (l * ((double) (l / x))))))))))))))))));
		} else {
			VAR_1 = ((double) (((double) (t * ((double) sqrt(2.0)))) / ((double) (((double) (t * ((double) sqrt(2.0)))) + ((double) (((double) (((double) sqrt(2.0)) * ((double) (t / x)))) - ((double) (t / ((double) (((double) sqrt(2.0)) * ((double) (x * x))))))))))));
		}
		VAR = VAR_1;
	}
	return VAR;
}

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 3 regimes
  2. if t < -3.0293523645168547e106

    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 51.9

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

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

      \[\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} + t \cdot \sqrt{2}\right)}}\]
    5. Simplified3.3

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

    if -3.0293523645168547e106 < t < 9.83848252578004774e101

    1. Initial program 38.5

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

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

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

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

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

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

    if 9.83848252578004774e101 < t

    1. Initial program 50.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 50.1

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}}\]
    5. Simplified2.6

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.0293523645168547 \cdot 10^{106}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\frac{t}{\sqrt{2} \cdot \left(x \cdot x\right)} - \left(t \cdot \sqrt{2} + \sqrt{2} \cdot \frac{t}{x}\right)}\\ \mathbf{elif}\;t \le 9.83848252578004774 \cdot 10^{101}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{4 \cdot \frac{t}{\frac{x}{t}} + 2 \cdot \left(\sqrt{t \cdot t + \ell \cdot \frac{\ell}{x}} \cdot \sqrt{t \cdot t + \ell \cdot \frac{\ell}{x}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \sqrt{2}}{t \cdot \sqrt{2} + \left(\sqrt{2} \cdot \frac{t}{x} - \frac{t}{\sqrt{2} \cdot \left(x \cdot x\right)}\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2020179 
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  :precision binary64
  (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))