Average Error: 43.7 → 9.1
Time: 12.4s
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.35507267308896655 \cdot 10^{98}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le -1.99825318706895391 \cdot 10^{-175}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \le -1.2689972051154065 \cdot 10^{-237}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 1.13394788847947996 \cdot 10^{-268}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \le 1.1616535065145012 \cdot 10^{-223}:\\ \;\;\;\;\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}}}\\ \mathbf{elif}\;t \le 4.5609212906017924 \cdot 10^{145}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\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.35507267308896655 \cdot 10^{98}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\

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

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

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

\mathbf{elif}\;t \le 1.1616535065145012 \cdot 10^{-223}:\\
\;\;\;\;\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}}}\\

\mathbf{elif}\;t \le 4.5609212906017924 \cdot 10^{145}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\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.3550726730889666e+98)) {
		VAR = ((double) (((double) (((double) sqrt(2.0)) * t)) / ((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)) * x)))))))) - ((double) (((double) sqrt(2.0)) * t))))));
	} else {
		double VAR_1;
		if ((t <= -1.998253187068954e-175)) {
			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) (l / x))))))))))))));
		} else {
			double VAR_2;
			if ((t <= -1.2689972051154065e-237)) {
				VAR_2 = ((double) (((double) (((double) sqrt(2.0)) * t)) / ((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)) * x)))))))) - ((double) (((double) sqrt(2.0)) * t))))));
			} else {
				double VAR_3;
				if ((t <= 1.13394788847948e-268)) {
					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) (l / x))))))))))))));
				} else {
					double VAR_4;
					if ((t <= 1.1616535065145012e-223)) {
						VAR_4 = ((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))))))))))));
					} else {
						double VAR_5;
						if ((t <= 4.5609212906017924e+145)) {
							VAR_5 = ((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) (l / x))))))))))))));
						} else {
							VAR_5 = ((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_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 3 regimes
  2. if t < -3.35507267308896655e98 or -1.99825318706895391e-175 < t < -1.2689972051154065e-237

    1. Initial program 53.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 49.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. Simplified49.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. Using strategy rm
    5. Applied *-un-lft-identity49.3

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{\color{blue}{1 \cdot x}}\right)}}\]
    6. Applied add-sqr-sqrt56.8

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)}}^{2}}{1 \cdot x}\right)}}\]
    7. Applied unpow-prod-down56.8

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\color{blue}{{\left(\sqrt{\ell}\right)}^{2} \cdot {\left(\sqrt{\ell}\right)}^{2}}}{1 \cdot x}\right)}}\]
    8. Applied times-frac55.8

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

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

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

      \[\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)}}\]
    12. Simplified7.6

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

    if -3.35507267308896655e98 < t < -1.99825318706895391e-175 or -1.2689972051154065e-237 < t < 1.13394788847947996e-268 or 1.1616535065145012e-223 < t < 4.5609212906017924e145

    1. Initial program 33.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 14.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. Simplified14.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 *-un-lft-identity14.6

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\ell}^{2}}{\color{blue}{1 \cdot x}}\right)}}\]
    6. Applied add-sqr-sqrt39.4

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{{\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)}}^{2}}{1 \cdot x}\right)}}\]
    7. Applied unpow-prod-down39.4

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \frac{\color{blue}{{\left(\sqrt{\ell}\right)}^{2} \cdot {\left(\sqrt{\ell}\right)}^{2}}}{1 \cdot x}\right)}}\]
    8. Applied times-frac37.1

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

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

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

    if 1.13394788847947996e-268 < t < 1.1616535065145012e-223 or 4.5609212906017924e145 < t

    1. Initial program 60.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 56.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. Simplified56.9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -3.35507267308896655 \cdot 10^{98}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le -1.99825318706895391 \cdot 10^{-175}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \le -1.2689972051154065 \cdot 10^{-237}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{2 \cdot \left(\frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \frac{t}{\sqrt{2} \cdot x}\right) - \sqrt{2} \cdot t}\\ \mathbf{elif}\;t \le 1.13394788847947996 \cdot 10^{-268}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\right)}}\\ \mathbf{elif}\;t \le 1.1616535065145012 \cdot 10^{-223}:\\ \;\;\;\;\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}}}\\ \mathbf{elif}\;t \le 4.5609212906017924 \cdot 10^{145}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{4 \cdot \frac{{t}^{2}}{x} + 2 \cdot \left({t}^{2} + \ell \cdot \frac{\ell}{x}\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 2020171 
(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)))))