Average Error: 43.6 → 9.8
Time: 7.9s
Precision: 64
\[\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 -31115301794.1085167:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \sqrt{2} \cdot t\right) - \frac{2}{\sqrt{2}} \cdot \left(\frac{t}{{x}^{2}} + \frac{t}{x}\right)}\\ \mathbf{elif}\;t \le -9.3590528423421053 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\frac{\ell \cdot 2}{\frac{x}{\ell}} + 4 \cdot \frac{{t}^{2}}{x}\right) + {t}^{2} \cdot 2}}\\ \mathbf{elif}\;t \le -6.76922891139122843 \cdot 10^{-265}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \sqrt{2} \cdot t\right) - \frac{2}{\sqrt{2}} \cdot \left(\frac{t}{{x}^{2}} + \frac{t}{x}\right)}\\ \mathbf{elif}\;t \le 6.311404485509687 \cdot 10^{-213}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{x}\right)}}\\ \mathbf{elif}\;t \le 4.8997616055238147 \cdot 10^{-171}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{2}{{x}^{2}} \cdot \left(\frac{t}{\sqrt{2}} - \frac{t}{{\left(\sqrt{2}\right)}^{3}}\right)\right)}\\ \mathbf{elif}\;t \le 4.48833203439214359 \cdot 10^{90}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\frac{\ell \cdot 2}{\frac{x}{\ell}} + 4 \cdot \frac{{t}^{2}}{x}\right) + {t}^{2} \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{2}{{x}^{2}} \cdot \left(\frac{t}{\sqrt{2}} - \frac{t}{{\left(\sqrt{2}\right)}^{3}}\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 -31115301794.1085167:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \sqrt{2} \cdot t\right) - \frac{2}{\sqrt{2}} \cdot \left(\frac{t}{{x}^{2}} + \frac{t}{x}\right)}\\

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

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

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

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

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

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

\end{array}
double code(double x, double l, double t) {
	return ((sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))));
}
double code(double x, double l, double t) {
	double VAR;
	if ((t <= -31115301794.108517)) {
		VAR = ((sqrt(2.0) * t) / (((2.0 * (t / (pow(sqrt(2.0), 3.0) * pow(x, 2.0)))) - (sqrt(2.0) * t)) - ((2.0 / sqrt(2.0)) * ((t / pow(x, 2.0)) + (t / x)))));
	} else {
		double VAR_1;
		if ((t <= -9.359052842342105e-167)) {
			VAR_1 = ((sqrt(2.0) * t) / sqrt(((((l * 2.0) / (x / l)) + (4.0 * (pow(t, 2.0) / x))) + (pow(t, 2.0) * 2.0))));
		} else {
			double VAR_2;
			if ((t <= -6.769228911391228e-265)) {
				VAR_2 = ((sqrt(2.0) * t) / (((2.0 * (t / (pow(sqrt(2.0), 3.0) * pow(x, 2.0)))) - (sqrt(2.0) * t)) - ((2.0 / sqrt(2.0)) * ((t / pow(x, 2.0)) + (t / x)))));
			} else {
				double VAR_3;
				if ((t <= 6.311404485509687e-213)) {
					VAR_3 = ((sqrt(2.0) * t) / sqrt(((4.0 * (pow(t, 2.0) / x)) + (2.0 * (pow(t, 2.0) + (pow(l, 2.0) / x))))));
				} else {
					double VAR_4;
					if ((t <= 4.899761605523815e-171)) {
						VAR_4 = ((sqrt(2.0) * t) / ((sqrt(2.0) * t) + ((2.0 * (t / (sqrt(2.0) * x))) + ((2.0 / pow(x, 2.0)) * ((t / sqrt(2.0)) - (t / pow(sqrt(2.0), 3.0)))))));
					} else {
						double VAR_5;
						if ((t <= 4.488332034392144e+90)) {
							VAR_5 = ((sqrt(2.0) * t) / sqrt(((((l * 2.0) / (x / l)) + (4.0 * (pow(t, 2.0) / x))) + (pow(t, 2.0) * 2.0))));
						} else {
							VAR_5 = ((sqrt(2.0) * t) / ((sqrt(2.0) * t) + ((2.0 * (t / (sqrt(2.0) * x))) + ((2.0 / pow(x, 2.0)) * ((t / sqrt(2.0)) - (t / pow(sqrt(2.0), 3.0)))))));
						}
						VAR_4 = VAR_5;
					}
					VAR_3 = VAR_4;
				}
				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 4 regimes
  2. if t < -31115301794.108517 or -9.359052842342105e-167 < t < -6.769228911391228e-265

    1. Initial program 46.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 10.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. Simplified10.2

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

    if -31115301794.108517 < t < -9.359052842342105e-167 or 4.899761605523815e-171 < t < 4.488332034392144e+90

    1. Initial program 30.6

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \color{blue}{\left(\frac{{\ell}^{\left(\frac{2}{2}\right)}}{\frac{x}{\ell}} + {t}^{2}\right)}}}\]
    10. Applied distribute-rgt-in6.3

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

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

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

    if -6.769228911391228e-265 < t < 6.311404485509687e-213

    1. Initial program 62.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 30.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. Simplified30.7

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

    if 6.311404485509687e-213 < t < 4.899761605523815e-171 or 4.488332034392144e+90 < t

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\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) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}}\]
    3. Simplified6.7

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -31115301794.1085167:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \sqrt{2} \cdot t\right) - \frac{2}{\sqrt{2}} \cdot \left(\frac{t}{{x}^{2}} + \frac{t}{x}\right)}\\ \mathbf{elif}\;t \le -9.3590528423421053 \cdot 10^{-167}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\frac{\ell \cdot 2}{\frac{x}{\ell}} + 4 \cdot \frac{{t}^{2}}{x}\right) + {t}^{2} \cdot 2}}\\ \mathbf{elif}\;t \le -6.76922891139122843 \cdot 10^{-265}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \sqrt{2} \cdot t\right) - \frac{2}{\sqrt{2}} \cdot \left(\frac{t}{{x}^{2}} + \frac{t}{x}\right)}\\ \mathbf{elif}\;t \le 6.311404485509687 \cdot 10^{-213}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{x}\right)}}\\ \mathbf{elif}\;t \le 4.8997616055238147 \cdot 10^{-171}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{2}{{x}^{2}} \cdot \left(\frac{t}{\sqrt{2}} - \frac{t}{{\left(\sqrt{2}\right)}^{3}}\right)\right)}\\ \mathbf{elif}\;t \le 4.48833203439214359 \cdot 10^{90}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left(\frac{\ell \cdot 2}{\frac{x}{\ell}} + 4 \cdot \frac{{t}^{2}}{x}\right) + {t}^{2} \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2} \cdot t + \left(2 \cdot \frac{t}{\sqrt{2} \cdot x} + \frac{2}{{x}^{2}} \cdot \left(\frac{t}{\sqrt{2}} - \frac{t}{{\left(\sqrt{2}\right)}^{3}}\right)\right)}\\ \end{array}\]

Reproduce

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