?

Average Error: 43.2 → 12.4
Time: 29.1s
Precision: binary64
Cost: 47316

?

\[\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 := 2 \cdot {t}^{2}\\ t_2 := -\sqrt{\frac{1 - x}{-1 - x}}\\ t_3 := {\ell}^{2} + t_1\\ \mathbf{if}\;t \leq -9 \cdot 10^{-63}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-186}:\\ \;\;\;\;\frac{t}{\frac{\sqrt{t_1 + \left(-\frac{\left(-t_3\right) - t_3}{x}\right)}}{\sqrt{2}}}\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-261}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-303}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-19}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{{\ell}^{2}}{x} + \left(2 \cdot \left(\frac{{t}^{2}}{x} + {t}^{2}\right) - \left(-\frac{t_3}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{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 (* 2.0 (pow t 2.0)))
        (t_2 (- (sqrt (/ (- 1.0 x) (- -1.0 x)))))
        (t_3 (+ (pow l 2.0) t_1)))
   (if (<= t -9e-63)
     t_2
     (if (<= t -8e-186)
       (/ t (/ (sqrt (+ t_1 (- (/ (- (- t_3) t_3) x)))) (sqrt 2.0)))
       (if (<= t -2.1e-261)
         t_2
         (if (<= t -5.6e-303)
           (* (/ t l) (sqrt x))
           (if (<= t 3.3e-19)
             (*
              t
              (/
               (sqrt 2.0)
               (sqrt
                (+
                 (/ (pow l 2.0) x)
                 (-
                  (* 2.0 (+ (/ (pow t 2.0) x) (pow t 2.0)))
                  (- (/ t_3 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 = 2.0 * pow(t, 2.0);
	double t_2 = -sqrt(((1.0 - x) / (-1.0 - x)));
	double t_3 = pow(l, 2.0) + t_1;
	double tmp;
	if (t <= -9e-63) {
		tmp = t_2;
	} else if (t <= -8e-186) {
		tmp = t / (sqrt((t_1 + -((-t_3 - t_3) / x))) / sqrt(2.0));
	} else if (t <= -2.1e-261) {
		tmp = t_2;
	} else if (t <= -5.6e-303) {
		tmp = (t / l) * sqrt(x);
	} else if (t <= 3.3e-19) {
		tmp = t * (sqrt(2.0) / sqrt(((pow(l, 2.0) / x) + ((2.0 * ((pow(t, 2.0) / x) + pow(t, 2.0))) - -(t_3 / x)))));
	} else {
		tmp = 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 = 2.0d0 * (t ** 2.0d0)
    t_2 = -sqrt(((1.0d0 - x) / ((-1.0d0) - x)))
    t_3 = (l ** 2.0d0) + t_1
    if (t <= (-9d-63)) then
        tmp = t_2
    else if (t <= (-8d-186)) then
        tmp = t / (sqrt((t_1 + -((-t_3 - t_3) / x))) / sqrt(2.0d0))
    else if (t <= (-2.1d-261)) then
        tmp = t_2
    else if (t <= (-5.6d-303)) then
        tmp = (t / l) * sqrt(x)
    else if (t <= 3.3d-19) then
        tmp = t * (sqrt(2.0d0) / sqrt((((l ** 2.0d0) / x) + ((2.0d0 * (((t ** 2.0d0) / x) + (t ** 2.0d0))) - -(t_3 / x)))))
    else
        tmp = 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 = 2.0 * Math.pow(t, 2.0);
	double t_2 = -Math.sqrt(((1.0 - x) / (-1.0 - x)));
	double t_3 = Math.pow(l, 2.0) + t_1;
	double tmp;
	if (t <= -9e-63) {
		tmp = t_2;
	} else if (t <= -8e-186) {
		tmp = t / (Math.sqrt((t_1 + -((-t_3 - t_3) / x))) / Math.sqrt(2.0));
	} else if (t <= -2.1e-261) {
		tmp = t_2;
	} else if (t <= -5.6e-303) {
		tmp = (t / l) * Math.sqrt(x);
	} else if (t <= 3.3e-19) {
		tmp = t * (Math.sqrt(2.0) / Math.sqrt(((Math.pow(l, 2.0) / x) + ((2.0 * ((Math.pow(t, 2.0) / x) + Math.pow(t, 2.0))) - -(t_3 / x)))));
	} else {
		tmp = 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 = 2.0 * math.pow(t, 2.0)
	t_2 = -math.sqrt(((1.0 - x) / (-1.0 - x)))
	t_3 = math.pow(l, 2.0) + t_1
	tmp = 0
	if t <= -9e-63:
		tmp = t_2
	elif t <= -8e-186:
		tmp = t / (math.sqrt((t_1 + -((-t_3 - t_3) / x))) / math.sqrt(2.0))
	elif t <= -2.1e-261:
		tmp = t_2
	elif t <= -5.6e-303:
		tmp = (t / l) * math.sqrt(x)
	elif t <= 3.3e-19:
		tmp = t * (math.sqrt(2.0) / math.sqrt(((math.pow(l, 2.0) / x) + ((2.0 * ((math.pow(t, 2.0) / x) + math.pow(t, 2.0))) - -(t_3 / x)))))
	else:
		tmp = 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(2.0 * (t ^ 2.0))
	t_2 = Float64(-sqrt(Float64(Float64(1.0 - x) / Float64(-1.0 - x))))
	t_3 = Float64((l ^ 2.0) + t_1)
	tmp = 0.0
	if (t <= -9e-63)
		tmp = t_2;
	elseif (t <= -8e-186)
		tmp = Float64(t / Float64(sqrt(Float64(t_1 + Float64(-Float64(Float64(Float64(-t_3) - t_3) / x)))) / sqrt(2.0)));
	elseif (t <= -2.1e-261)
		tmp = t_2;
	elseif (t <= -5.6e-303)
		tmp = Float64(Float64(t / l) * sqrt(x));
	elseif (t <= 3.3e-19)
		tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64((l ^ 2.0) / x) + Float64(Float64(2.0 * Float64(Float64((t ^ 2.0) / x) + (t ^ 2.0))) - Float64(-Float64(t_3 / x)))))));
	else
		tmp = Float64(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 = 2.0 * (t ^ 2.0);
	t_2 = -sqrt(((1.0 - x) / (-1.0 - x)));
	t_3 = (l ^ 2.0) + t_1;
	tmp = 0.0;
	if (t <= -9e-63)
		tmp = t_2;
	elseif (t <= -8e-186)
		tmp = t / (sqrt((t_1 + -((-t_3 - t_3) / x))) / sqrt(2.0));
	elseif (t <= -2.1e-261)
		tmp = t_2;
	elseif (t <= -5.6e-303)
		tmp = (t / l) * sqrt(x);
	elseif (t <= 3.3e-19)
		tmp = t * (sqrt(2.0) / sqrt((((l ^ 2.0) / x) + ((2.0 * (((t ^ 2.0) / x) + (t ^ 2.0))) - -(t_3 / x)))));
	else
		tmp = 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[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = (-N[Sqrt[N[(N[(1.0 - x), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])}, Block[{t$95$3 = N[(N[Power[l, 2.0], $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -9e-63], t$95$2, If[LessEqual[t, -8e-186], N[(t / N[(N[Sqrt[N[(t$95$1 + (-N[(N[((-t$95$3) - t$95$3), $MachinePrecision] / x), $MachinePrecision])), $MachinePrecision]], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e-261], t$95$2, If[LessEqual[t, -5.6e-303], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-19], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision] + N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - (-N[(t$95$3 / x), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(1.0 / x), $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 := 2 \cdot {t}^{2}\\
t_2 := -\sqrt{\frac{1 - x}{-1 - x}}\\
t_3 := {\ell}^{2} + t_1\\
\mathbf{if}\;t \leq -9 \cdot 10^{-63}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq -2.1 \cdot 10^{-261}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -5.6 \cdot 10^{-303}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-19}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{{\ell}^{2}}{x} + \left(2 \cdot \left(\frac{{t}^{2}}{x} + {t}^{2}\right) - \left(-\frac{t_3}{x}\right)\right)}}\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 5 regimes
  2. if t < -8.9999999999999999e-63 or -7.9999999999999993e-186 < t < -2.09999999999999996e-261

    1. Initial program 42.4

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

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

      [Start]42.4

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

      rational.json-simplify-49 [=>]42.3

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

      rational.json-simplify-16 [=>]42.3

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

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

      \[\leadsto \color{blue}{-\sqrt{\frac{1 - x}{-1 - x}}} \]
      Proof

      [Start]11.2

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

      rational.json-simplify-2 [=>]11.2

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

      rational.json-simplify-9 [=>]11.2

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

      exponential.json-simplify-20 [=>]10.3

      \[ -\color{blue}{\sqrt{0.5 \cdot 2}} \cdot \sqrt{\frac{x - 1}{1 + x}} \]

      metadata-eval [=>]10.3

      \[ -\sqrt{\color{blue}{1}} \cdot \sqrt{\frac{x - 1}{1 + x}} \]

      metadata-eval [=>]10.3

      \[ -\color{blue}{1} \cdot \sqrt{\frac{x - 1}{1 + x}} \]

      rational.json-simplify-6 [=>]10.3

      \[ -\color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]

      rational.json-simplify-17 [=>]10.3

      \[ -\sqrt{\frac{x - 1}{\color{blue}{x - -1}}} \]

      rational.json-simplify-50 [=>]10.3

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

      rational.json-simplify-12 [=>]10.3

      \[ -\sqrt{\frac{\color{blue}{0 - \left(x - 1\right)}}{-1 - x}} \]

      rational.json-simplify-45 [=>]10.3

      \[ -\sqrt{\frac{\color{blue}{1 - \left(x - 0\right)}}{-1 - x}} \]

      rational.json-simplify-5 [=>]10.3

      \[ -\sqrt{\frac{1 - \color{blue}{x}}{-1 - x}} \]

    if -8.9999999999999999e-63 < t < -7.9999999999999993e-186

    1. Initial program 40.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. Simplified40.9

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

      [Start]40.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}} \]

      rational.json-simplify-49 [=>]40.9

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

      rational.json-simplify-16 [=>]40.9

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

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

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

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

      [Start]15.2

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

      rational.json-simplify-1 [=>]15.2

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

      rational.json-simplify-2 [=>]15.2

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

      rational.json-simplify-9 [=>]15.2

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

      rational.json-simplify-2 [=>]15.2

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

      rational.json-simplify-9 [=>]15.2

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

    if -2.09999999999999996e-261 < t < -5.6e-303

    1. Initial program 62.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. Simplified62.3

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

      [Start]62.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}} \]

      rational.json-simplify-49 [=>]62.3

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

      rational.json-simplify-16 [=>]62.3

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

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

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

      [Start]29.5

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

      rational.json-simplify-1 [=>]29.5

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

      rational.json-simplify-48 [=>]29.5

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

      rational.json-simplify-1 [=>]29.5

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

      rational.json-simplify-2 [=>]29.5

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

      rational.json-simplify-51 [=>]29.5

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

      rational.json-simplify-2 [=>]29.5

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

      rational.json-simplify-9 [=>]29.5

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

      \[\leadsto t \cdot \frac{\sqrt{2}}{\color{blue}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}}} \]
    6. Simplified34.3

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

      [Start]34.3

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

      rational.json-simplify-2 [=>]34.3

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

      rational.json-simplify-2 [=>]34.3

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

      rational.json-simplify-43 [=>]34.3

      \[ t \cdot \frac{\sqrt{2}}{\color{blue}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}} \]
    7. Taylor expanded in t around 0 36.2

      \[\leadsto \color{blue}{\frac{t}{\ell} \cdot \sqrt{x}} \]

    if -5.6e-303 < t < 3.2999999999999998e-19

    1. Initial program 47.4

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

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

      [Start]47.4

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

      rational.json-simplify-49 [=>]47.4

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

      rational.json-simplify-16 [=>]47.4

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

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

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

      [Start]21.3

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

      rational.json-simplify-1 [=>]21.3

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

      rational.json-simplify-48 [=>]21.3

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

      rational.json-simplify-1 [=>]21.3

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

      rational.json-simplify-2 [=>]21.3

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

      rational.json-simplify-51 [=>]21.3

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

      rational.json-simplify-2 [=>]21.3

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

      rational.json-simplify-9 [=>]21.3

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

    if 3.2999999999999998e-19 < t

    1. Initial program 40.2

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

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

      [Start]40.2

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

      rational.json-simplify-49 [=>]40.1

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

      rational.json-simplify-16 [=>]40.1

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

      \[\leadsto \color{blue}{\left(\sqrt{2} \cdot \sqrt{0.5}\right) \cdot \sqrt{\frac{x - 1}{1 + x}}} \]
    4. Simplified5.4

      \[\leadsto \color{blue}{\sqrt{\frac{1 - x}{-1 - x}}} \]
      Proof

      [Start]6.3

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

      exponential.json-simplify-20 [=>]5.4

      \[ \color{blue}{\sqrt{0.5 \cdot 2}} \cdot \sqrt{\frac{x - 1}{1 + x}} \]

      metadata-eval [=>]5.4

      \[ \sqrt{\color{blue}{1}} \cdot \sqrt{\frac{x - 1}{1 + x}} \]

      metadata-eval [=>]5.4

      \[ \color{blue}{1} \cdot \sqrt{\frac{x - 1}{1 + x}} \]

      rational.json-simplify-6 [=>]5.4

      \[ \color{blue}{\sqrt{\frac{x - 1}{1 + x}}} \]

      rational.json-simplify-17 [=>]5.4

      \[ \sqrt{\frac{x - 1}{\color{blue}{x - -1}}} \]

      rational.json-simplify-50 [=>]5.4

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

      rational.json-simplify-12 [=>]5.4

      \[ \sqrt{\frac{\color{blue}{0 - \left(x - 1\right)}}{-1 - x}} \]

      rational.json-simplify-45 [=>]5.4

      \[ \sqrt{\frac{\color{blue}{1 - \left(x - 0\right)}}{-1 - x}} \]

      rational.json-simplify-5 [=>]5.4

      \[ \sqrt{\frac{1 - \color{blue}{x}}{-1 - x}} \]
    5. Taylor expanded in x around -inf 5.9

      \[\leadsto \color{blue}{1 - \frac{1}{x}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification12.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-63}:\\ \;\;\;\;-\sqrt{\frac{1 - x}{-1 - x}}\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-186}:\\ \;\;\;\;\frac{t}{\frac{\sqrt{2 \cdot {t}^{2} + \left(-\frac{\left(-\left({\ell}^{2} + 2 \cdot {t}^{2}\right)\right) - \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{x}\right)}}{\sqrt{2}}}\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-261}:\\ \;\;\;\;-\sqrt{\frac{1 - x}{-1 - x}}\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-303}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-19}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{{\ell}^{2}}{x} + \left(2 \cdot \left(\frac{{t}^{2}}{x} + {t}^{2}\right) - \left(-\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]

Alternatives

Alternative 1
Error12.4
Cost47252
\[\begin{array}{l} t_1 := 2 \cdot {t}^{2}\\ t_2 := -\sqrt{\frac{1 - x}{-1 - x}}\\ t_3 := {\ell}^{2} + t_1\\ t_4 := \frac{t}{\frac{\sqrt{t_1 + \left(-\frac{\left(-t_3\right) - t_3}{x}\right)}}{\sqrt{2}}}\\ \mathbf{if}\;t \leq -1.12 \cdot 10^{-62}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{-186}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-259}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-304}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-18}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 2
Error15.5
Cost20816
\[\begin{array}{l} t_1 := -\sqrt{\frac{1 - x}{-1 - x}}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-86}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{1}{x}}} \cdot \frac{1}{\ell}\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-224}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-158}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{1}{{x}^{2}} + \frac{1}{x}\right)} \cdot \left(-\ell\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 3
Error15.7
Cost20496
\[\begin{array}{l} t_1 := \sqrt{\frac{1}{x}}\\ t_2 := -\sqrt{\frac{1 - x}{-1 - x}}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{-68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-86}:\\ \;\;\;\;\frac{t}{t_1} \cdot \frac{1}{\ell}\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{-263}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-157}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\left(\ell \cdot \sqrt{2}\right) \cdot \left(-t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 4
Error15.7
Cost20496
\[\begin{array}{l} t_1 := \sqrt{\frac{1}{x}}\\ t_2 := -\sqrt{\frac{1 - x}{-1 - x}}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{-68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-86}:\\ \;\;\;\;\frac{t}{t_1} \cdot \frac{1}{\ell}\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-265}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-156}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\ell \cdot \sqrt{2}\right) \cdot \left(-t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 5
Error15.7
Cost14096
\[\begin{array}{l} t_1 := -\sqrt{\frac{1 - x}{-1 - x}}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-86}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{1}{x}}} \cdot \frac{1}{\ell}\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-262}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-158}:\\ \;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(-\sqrt{2 \cdot \frac{1}{x}}\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 6
Error15.5
Cost7376
\[\begin{array}{l} t_1 := -\sqrt{\frac{1 - x}{-1 - x}}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-86}:\\ \;\;\;\;\frac{\frac{t}{\sqrt{\frac{1}{x}}}}{\ell}\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-261}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-158}:\\ \;\;\;\;t \cdot \left(\frac{1}{\ell} \cdot \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 7
Error15.4
Cost7376
\[\begin{array}{l} t_1 := -\sqrt{\frac{1 - x}{-1 - x}}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-86}:\\ \;\;\;\;\frac{t}{\sqrt{\frac{1}{x}}} \cdot \frac{1}{\ell}\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-258}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-158}:\\ \;\;\;\;t \cdot \left(\frac{1}{\ell} \cdot \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 8
Error34.3
Cost6980
\[\begin{array}{l} \mathbf{if}\;t \leq 2.6 \cdot 10^{-158}:\\ \;\;\;\;t \cdot \left(\frac{1}{\ell} \cdot \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 9
Error34.2
Cost6980
\[\begin{array}{l} \mathbf{if}\;t \leq 4 \cdot 10^{-158}:\\ \;\;\;\;\frac{t}{\ell \cdot \sqrt{\frac{1}{x}}}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 10
Error34.9
Cost6852
\[\begin{array}{l} \mathbf{if}\;t \leq 2.75 \cdot 10^{-158}:\\ \;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{1}{x}\\ \end{array} \]
Alternative 11
Error38.3
Cost320
\[1 - \frac{1}{x} \]
Alternative 12
Error38.6
Cost64
\[1 \]

Error

Reproduce?

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