?

Average Error: 43.2 → 11.7
Time: 20.1s
Precision: binary64
Cost: 27600

?

\[\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} t_1 := \sqrt{2} \cdot t\\ t_2 := \frac{t_1}{-\sqrt{\frac{x + 1}{-1 + x}} \cdot \left(t \cdot \sqrt{2}\right)}\\ t_3 := \frac{{\ell}^{2}}{x}\\ \mathbf{if}\;t \leq -3.7 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-152}:\\ \;\;\;\;\frac{t_1}{\sqrt{\left({t}^{2} + t_3\right) \cdot 2}}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-272}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+35}:\\ \;\;\;\;\frac{t_1}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \left(x + 1\right)}{-1 + x} + 2 \cdot t_3}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{1 + x}}\\ \end{array} \]
(FPCore (x l t)
 :precision binary64
 (/
  (* (sqrt 2.0) t)
  (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* (sqrt 2.0) t))
        (t_2 (/ t_1 (- (* (sqrt (/ (+ x 1.0) (+ -1.0 x))) (* t (sqrt 2.0))))))
        (t_3 (/ (pow l 2.0) x)))
   (if (<= t -3.7e-19)
     t_2
     (if (<= t -9e-152)
       (/ t_1 (sqrt (* (+ (pow t 2.0) t_3) 2.0)))
       (if (<= t -2.7e-272)
         t_2
         (if (<= t 1.35e+35)
           (/
            t_1
            (sqrt
             (+ (* 2.0 (/ (* (pow t 2.0) (+ x 1.0)) (+ -1.0 x))) (* 2.0 t_3))))
           (sqrt (/ (- x 1.0) (+ 1.0 x)))))))))
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 t_1 = sqrt(2.0) * t;
	double t_2 = t_1 / -(sqrt(((x + 1.0) / (-1.0 + x))) * (t * sqrt(2.0)));
	double t_3 = pow(l, 2.0) / x;
	double tmp;
	if (t <= -3.7e-19) {
		tmp = t_2;
	} else if (t <= -9e-152) {
		tmp = t_1 / sqrt(((pow(t, 2.0) + t_3) * 2.0));
	} else if (t <= -2.7e-272) {
		tmp = t_2;
	} else if (t <= 1.35e+35) {
		tmp = t_1 / sqrt(((2.0 * ((pow(t, 2.0) * (x + 1.0)) / (-1.0 + x))) + (2.0 * t_3)));
	} else {
		tmp = sqrt(((x - 1.0) / (1.0 + x)));
	}
	return tmp;
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = sqrt(2.0d0) * t
    t_2 = t_1 / -(sqrt(((x + 1.0d0) / ((-1.0d0) + x))) * (t * sqrt(2.0d0)))
    t_3 = (l ** 2.0d0) / x
    if (t <= (-3.7d-19)) then
        tmp = t_2
    else if (t <= (-9d-152)) then
        tmp = t_1 / sqrt((((t ** 2.0d0) + t_3) * 2.0d0))
    else if (t <= (-2.7d-272)) then
        tmp = t_2
    else if (t <= 1.35d+35) then
        tmp = t_1 / sqrt(((2.0d0 * (((t ** 2.0d0) * (x + 1.0d0)) / ((-1.0d0) + x))) + (2.0d0 * t_3)))
    else
        tmp = sqrt(((x - 1.0d0) / (1.0d0 + x)))
    end if
    code = tmp
end function
public static double code(double x, double l, double t) {
	return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
public static double code(double x, double l, double t) {
	double t_1 = Math.sqrt(2.0) * t;
	double t_2 = t_1 / -(Math.sqrt(((x + 1.0) / (-1.0 + x))) * (t * Math.sqrt(2.0)));
	double t_3 = Math.pow(l, 2.0) / x;
	double tmp;
	if (t <= -3.7e-19) {
		tmp = t_2;
	} else if (t <= -9e-152) {
		tmp = t_1 / Math.sqrt(((Math.pow(t, 2.0) + t_3) * 2.0));
	} else if (t <= -2.7e-272) {
		tmp = t_2;
	} else if (t <= 1.35e+35) {
		tmp = t_1 / Math.sqrt(((2.0 * ((Math.pow(t, 2.0) * (x + 1.0)) / (-1.0 + x))) + (2.0 * t_3)));
	} else {
		tmp = Math.sqrt(((x - 1.0) / (1.0 + x)));
	}
	return tmp;
}
def code(x, l, t):
	return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
def code(x, l, t):
	t_1 = math.sqrt(2.0) * t
	t_2 = t_1 / -(math.sqrt(((x + 1.0) / (-1.0 + x))) * (t * math.sqrt(2.0)))
	t_3 = math.pow(l, 2.0) / x
	tmp = 0
	if t <= -3.7e-19:
		tmp = t_2
	elif t <= -9e-152:
		tmp = t_1 / math.sqrt(((math.pow(t, 2.0) + t_3) * 2.0))
	elif t <= -2.7e-272:
		tmp = t_2
	elif t <= 1.35e+35:
		tmp = t_1 / math.sqrt(((2.0 * ((math.pow(t, 2.0) * (x + 1.0)) / (-1.0 + x))) + (2.0 * t_3)))
	else:
		tmp = math.sqrt(((x - 1.0) / (1.0 + x)))
	return tmp
function code(x, l, t)
	return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
end
function code(x, l, t)
	t_1 = Float64(sqrt(2.0) * t)
	t_2 = Float64(t_1 / Float64(-Float64(sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x))) * Float64(t * sqrt(2.0)))))
	t_3 = Float64((l ^ 2.0) / x)
	tmp = 0.0
	if (t <= -3.7e-19)
		tmp = t_2;
	elseif (t <= -9e-152)
		tmp = Float64(t_1 / sqrt(Float64(Float64((t ^ 2.0) + t_3) * 2.0)));
	elseif (t <= -2.7e-272)
		tmp = t_2;
	elseif (t <= 1.35e+35)
		tmp = Float64(t_1 / sqrt(Float64(Float64(2.0 * Float64(Float64((t ^ 2.0) * Float64(x + 1.0)) / Float64(-1.0 + x))) + Float64(2.0 * t_3))));
	else
		tmp = sqrt(Float64(Float64(x - 1.0) / Float64(1.0 + x)));
	end
	return tmp
end
function tmp = code(x, l, t)
	tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
end
function tmp_2 = code(x, l, t)
	t_1 = sqrt(2.0) * t;
	t_2 = t_1 / -(sqrt(((x + 1.0) / (-1.0 + x))) * (t * sqrt(2.0)));
	t_3 = (l ^ 2.0) / x;
	tmp = 0.0;
	if (t <= -3.7e-19)
		tmp = t_2;
	elseif (t <= -9e-152)
		tmp = t_1 / sqrt((((t ^ 2.0) + t_3) * 2.0));
	elseif (t <= -2.7e-272)
		tmp = t_2;
	elseif (t <= 1.35e+35)
		tmp = t_1 / sqrt(((2.0 * (((t ^ 2.0) * (x + 1.0)) / (-1.0 + x))) + (2.0 * t_3)));
	else
		tmp = sqrt(((x - 1.0) / (1.0 + x)));
	end
	tmp_2 = tmp;
end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_, l_, t_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / (-N[(N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -3.7e-19], t$95$2, If[LessEqual[t, -9e-152], N[(t$95$1 / N[Sqrt[N[(N[(N[Power[t, 2.0], $MachinePrecision] + t$95$3), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.7e-272], t$95$2, If[LessEqual[t, 1.35e+35], N[(t$95$1 / N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[t, 2.0], $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x - 1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\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}
t_1 := \sqrt{2} \cdot t\\
t_2 := \frac{t_1}{-\sqrt{\frac{x + 1}{-1 + x}} \cdot \left(t \cdot \sqrt{2}\right)}\\
t_3 := \frac{{\ell}^{2}}{x}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{-19}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -9 \cdot 10^{-152}:\\
\;\;\;\;\frac{t_1}{\sqrt{\left({t}^{2} + t_3\right) \cdot 2}}\\

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-272}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+35}:\\
\;\;\;\;\frac{t_1}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \left(x + 1\right)}{-1 + x} + 2 \cdot t_3}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x - 1}{1 + x}}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 4 regimes
  2. if t < -3.70000000000000005e-19 or -9.0000000000000008e-152 < t < -2.69999999999999993e-272

    1. Initial program 45.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 in t around -inf 11.3

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

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

      [Start]11.3

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]11.3

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

      rational_best_oopsla_all_46_json_45_simplify-92 [=>]11.3

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]11.3

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]11.3

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

      rational_best_oopsla_all_46_json_45_simplify-45 [=>]11.3

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]11.3

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

      rational_best_oopsla_all_46_json_45_simplify-74 [<=]11.3

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

    if -3.70000000000000005e-19 < t < -9.0000000000000008e-152

    1. Initial program 31.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 in l around 0 21.3

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

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

      [Start]21.3

      \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \frac{\left(1 + x\right) \cdot {t}^{2}}{x - 1} + \left(\left(\frac{x}{x - 1} + \frac{1}{x - 1}\right) - 1\right) \cdot {\ell}^{2}}} \]

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]21.3

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]21.3

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

      rational_best_oopsla_all_46_json_45_simplify-45 [=>]21.3

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]21.3

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]21.3

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

      rational_best_oopsla_all_46_json_45_simplify-107 [=>]17.9

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

      rational_best_oopsla_all_46_json_45_simplify-45 [=>]17.9

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]17.9

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

      rational_best_oopsla_all_46_json_45_simplify-45 [=>]17.9

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]17.9

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

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \left(x + 1\right)}{-1 + x} + \color{blue}{2 \cdot \frac{{\ell}^{2}}{x}}}} \]
    5. Taylor expanded in x around inf 9.6

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \color{blue}{{t}^{2}} + 2 \cdot \frac{{\ell}^{2}}{x}}} \]
    6. Applied egg-rr9.6

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

    if -2.69999999999999993e-272 < t < 1.35000000000000001e35

    1. Initial program 43.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 in l around 0 38.1

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

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

      [Start]38.1

      \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \frac{\left(1 + x\right) \cdot {t}^{2}}{x - 1} + \left(\left(\frac{x}{x - 1} + \frac{1}{x - 1}\right) - 1\right) \cdot {\ell}^{2}}} \]

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]38.1

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]38.1

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

      rational_best_oopsla_all_46_json_45_simplify-45 [=>]38.1

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]38.1

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]38.1

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

      rational_best_oopsla_all_46_json_45_simplify-107 [=>]29.9

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

      rational_best_oopsla_all_46_json_45_simplify-45 [=>]29.9

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]29.9

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

      rational_best_oopsla_all_46_json_45_simplify-45 [=>]29.9

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]29.9

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

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

    if 1.35000000000000001e35 < t

    1. Initial program 44.8

      \[\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 in l around 0 4.2

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
    3. Taylor expanded in t around 0 4.2

      \[\leadsto \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification11.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{-19}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\sqrt{\frac{x + 1}{-1 + x}} \cdot \left(t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-152}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{\left({t}^{2} + \frac{{\ell}^{2}}{x}\right) \cdot 2}}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-272}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-\sqrt{\frac{x + 1}{-1 + x}} \cdot \left(t \cdot \sqrt{2}\right)}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+35}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \frac{{t}^{2} \cdot \left(x + 1\right)}{-1 + x} + 2 \cdot \frac{{\ell}^{2}}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{1 + x}}\\ \end{array} \]

Alternatives

Alternative 1
Error11.6
Cost26960
\[\begin{array}{l} t_1 := \sqrt{2} \cdot t\\ t_2 := \frac{t_1}{-\sqrt{\frac{x + 1}{-1 + x}} \cdot \left(t \cdot \sqrt{2}\right)}\\ t_3 := \frac{t_1}{\sqrt{\left({t}^{2} + \frac{{\ell}^{2}}{x}\right) \cdot 2}}\\ \mathbf{if}\;t \leq -5.3 \cdot 10^{-20}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-152}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-272}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+35}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{1 + x}}\\ \end{array} \]
Alternative 2
Error15.0
Cost20620
\[\begin{array}{l} t_1 := \sqrt{2} \cdot t\\ t_2 := \frac{t_1}{-\sqrt{\frac{x + 1}{-1 + x}} \cdot \left(t \cdot \sqrt{2}\right)}\\ t_3 := \frac{t_1}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x}}}\\ \mathbf{if}\;t \leq -2.25 \cdot 10^{-77}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-151}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-272}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-215}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{1 + x}}\\ \end{array} \]
Alternative 3
Error15.2
Cost20368
\[\begin{array}{l} t_1 := \sqrt{2} \cdot t\\ t_2 := \frac{t_1}{-t \cdot \sqrt{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)}}\\ t_3 := \frac{t_1}{\sqrt{2 \cdot \frac{{\ell}^{2}}{x}}}\\ \mathbf{if}\;t \leq -1.55 \cdot 10^{-73}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-152}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-272}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 8.3 \cdot 10^{-215}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{1 + x}}\\ \end{array} \]
Alternative 4
Error14.9
Cost14084
\[\begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{-294}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{-t \cdot \sqrt{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{1 + x}}\\ \end{array} \]
Alternative 5
Error15.0
Cost13444
\[\begin{array}{l} t_1 := \sqrt{2} \cdot t\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{-294}:\\ \;\;\;\;\frac{t_1}{-t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{1 + x}}\\ \end{array} \]
Alternative 6
Error34.6
Cost6980
\[\begin{array}{l} \mathbf{if}\;t \leq 4.5 \cdot 10^{-291}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{x - 1}{1 + x}}\\ \end{array} \]
Alternative 7
Error34.8
Cost6852
\[\begin{array}{l} \mathbf{if}\;t \leq 1.6 \cdot 10^{-290}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 8
Error38.8
Cost320
\[1 - \frac{1}{x} \]
Alternative 9
Error39.1
Cost64
\[1 \]

Error

Reproduce?

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