Average Error: 42.9 → 9.6
Time: 8.7s
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 -1.09935304935821733 \cdot 10^{103}:\\ \;\;\;\;\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 5.38064716988928078 \cdot 10^{-304}:\\ \;\;\;\;\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 7.33576588931120795 \cdot 10^{-290}:\\ \;\;\;\;\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 1.0129885136066577 \cdot 10^{120}:\\ \;\;\;\;\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 -1.09935304935821733 \cdot 10^{103}:\\
\;\;\;\;\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 5.38064716988928078 \cdot 10^{-304}:\\
\;\;\;\;\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 7.33576588931120795 \cdot 10^{-290}:\\
\;\;\;\;\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 1.0129885136066577 \cdot 10^{120}:\\
\;\;\;\;\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 ((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 <= -1.0993530493582173e+103)) {
		VAR = ((sqrt(2.0) * t) / (((2.0 * ((t / (pow(sqrt(2.0), 3.0) * pow(x, 2.0))) - (t / (sqrt(2.0) * pow(x, 2.0))))) - (sqrt(2.0) * t)) - (2.0 * (t / (sqrt(2.0) * x)))));
	} else {
		double VAR_1;
		if ((t <= 5.380647169889281e-304)) {
			VAR_1 = ((sqrt(2.0) * t) / sqrt(((4.0 * (pow(t, 2.0) / x)) + (2.0 * (pow(t, 2.0) + (l * (l / x)))))));
		} else {
			double VAR_2;
			if ((t <= 7.335765889311208e-290)) {
				VAR_2 = ((sqrt(2.0) * t) / (((2.0 * (t / (sqrt(2.0) * x))) + (t * sqrt(2.0))) - (2.0 * (t / (pow(sqrt(2.0), 3.0) * pow(x, 2.0))))));
			} else {
				double VAR_3;
				if ((t <= 1.0129885136066577e+120)) {
					VAR_3 = ((sqrt(2.0) * t) / sqrt(((4.0 * (pow(t, 2.0) / x)) + (2.0 * (pow(t, 2.0) + (l / (x / l)))))));
				} else {
					VAR_3 = ((sqrt(2.0) * t) / (((2.0 * (t / (sqrt(2.0) * x))) + (t * sqrt(2.0))) - (2.0 * (t / (pow(sqrt(2.0), 3.0) * 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 4 regimes
  2. if t < -1.0993530493582173e+103

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

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

      \[\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 -1.0993530493582173e+103 < t < 5.380647169889281e-304

    1. Initial program 38.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 18.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. Simplified18.1

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

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

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

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

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

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

      \[\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 5.380647169889281e-304 < t < 7.335765889311208e-290 or 1.0129885136066577e+120 < t

    1. Initial program 53.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 52.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. Simplified52.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.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}}}}\]

    if 7.335765889311208e-290 < t < 1.0129885136066577e+120

    1. Initial program 36.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 16.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. Simplified16.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 unpow216.3

      \[\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*11.9

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.09935304935821733 \cdot 10^{103}:\\ \;\;\;\;\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 5.38064716988928078 \cdot 10^{-304}:\\ \;\;\;\;\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 7.33576588931120795 \cdot 10^{-290}:\\ \;\;\;\;\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 1.0129885136066577 \cdot 10^{120}:\\ \;\;\;\;\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 2020091 
(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)))))