Average Error: 43.2 → 9.4
Time: 10.6s
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.9137323456954534 \cdot 10^{75}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -9.11571921048513748 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{elif}\;t \le -1.06057385388579207 \cdot 10^{-226}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 31249790725.708351:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\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}}}\\ \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.9137323456954534 \cdot 10^{75}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\

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

\mathbf{elif}\;t \le -1.06057385388579207 \cdot 10^{-226}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\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}}}\\

\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.9137323456954534e+75)) {
		VAR = ((double) (((double) (((double) sqrt(2.0)) * t)) / ((double) (((double) (((double) (2.0 * ((double) (((double) (t / ((double) (((double) pow(((double) sqrt(2.0)), 3.0)) * ((double) pow(x, 2.0)))))) - ((double) (t / ((double) (((double) sqrt(2.0)) * ((double) pow(x, 2.0)))))))))) - ((double) (((double) sqrt(2.0)) * t)))) - ((double) (2.0 * ((double) (t / ((double) (((double) sqrt(2.0)) * x))))))))));
	} else {
		double VAR_1;
		if ((t <= -9.115719210485137e-167)) {
			VAR_1 = ((double) (((double) (((double) sqrt(2.0)) * t)) / ((double) sqrt(((double) (((double) (4.0 * ((double) (((double) pow(t, 2.0)) / x)))) + ((double) (2.0 * ((double) (((double) pow(t, 2.0)) + ((double) (l / ((double) (x / l))))))))))))));
		} else {
			double VAR_2;
			if ((t <= -1.060573853885792e-226)) {
				VAR_2 = ((double) (((double) (((double) sqrt(2.0)) * t)) / ((double) (((double) (((double) (2.0 * ((double) (((double) (t / ((double) (((double) pow(((double) sqrt(2.0)), 3.0)) * ((double) pow(x, 2.0)))))) - ((double) (t / ((double) (((double) sqrt(2.0)) * ((double) pow(x, 2.0)))))))))) - ((double) (((double) sqrt(2.0)) * t)))) - ((double) (2.0 * ((double) (t / ((double) (((double) sqrt(2.0)) * x))))))))));
			} else {
				double VAR_3;
				if ((t <= 31249790725.70835)) {
					VAR_3 = ((double) (((double) (((double) sqrt(2.0)) * t)) / ((double) sqrt(((double) (((double) (4.0 * ((double) (((double) pow(t, 2.0)) / x)))) + ((double) (2.0 * ((double) (((double) pow(t, 2.0)) + ((double) (l / ((double) (x / l))))))))))))));
				} else {
					VAR_3 = ((double) (((double) (((double) sqrt(2.0)) * t)) / ((double) (((double) (((double) (2.0 * ((double) (t / ((double) (((double) sqrt(2.0)) * x)))))) + ((double) (t * ((double) sqrt(2.0)))))) - ((double) (2.0 * ((double) (t / ((double) (((double) pow(((double) sqrt(2.0)), 3.0)) * ((double) pow(x, 2.0))))))))))));
				}
				VAR_2 = VAR_3;
			}
			VAR_1 = VAR_2;
		}
		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.9137323456954534e75 or -9.11571921048513748e-167 < t < -1.06057385388579207e-226

    1. Initial program 49.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 7.2

      \[\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(2 \cdot \frac{t}{\sqrt{2} \cdot x} + t \cdot \sqrt{2}\right)\right)}}\]
    3. Simplified7.2

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

    if -3.9137323456954534e75 < t < -9.11571921048513748e-167 or -1.06057385388579207e-226 < t < 31249790725.708351

    1. Initial program 40.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 17.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. Simplified17.6

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{x}\right)}}}\]
    4. Using strategy rm
    5. Applied unpow217.6

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

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

    if 31249790725.708351 < t

    1. Initial program 42.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 39.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. Simplified39.3

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

      \[\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}}}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification9.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.9137323456954534 \cdot 10^{75}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le -9.11571921048513748 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{elif}\;t \le -1.06057385388579207 \cdot 10^{-226}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot {x}^{2}}\right) - \sqrt{2} \cdot t\right) - 2 \cdot \frac{t}{\sqrt{2} \cdot x}}\\ \mathbf{elif}\;t \le 31249790725.708351:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\ell}{\frac{x}{\ell}}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\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}}}\\ \end{array}\]

Reproduce

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