| Alternative 1 | |
|---|---|
| Error | 11.6 |
| Cost | 80264 |
(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 (/ (pow l 2.0) x))
(t_3 (+ (pow l 2.0) (* 2.0 (pow t 2.0))))
(t_4 (+ 1.0 (/ 1.0 x)))
(t_5 (* 2.0 (+ t_4 (/ 1.0 x)))))
(if (<= t -2.9e-40)
(- (/ 1.0 x) 1.0)
(if (<= t -6e-207)
(/
t_1
(sqrt
(+
(+
t_2
(+
(/ (pow l 2.0) (pow x 3.0))
(+
(* 2.0 (+ (pow t 2.0) (/ (pow t 2.0) x)))
(- (/ (- (- t_3) t_3) (pow x 2.0))))))
(-
(* 2.0 (/ (pow t 2.0) (pow x 3.0)))
(* -1.0 (+ (/ t_3 x) (/ t_3 (pow x 3.0))))))))
(if (<= t -3.4e-221)
-1.0
(if (<= t 3.6e-249)
(/ t_1 (sqrt (* (pow l 2.0) (+ (/ 1.0 (+ -1.0 x)) (/ 1.0 x)))))
(if (<= t 4e-165)
(/
t_1
(+
(* t (sqrt t_5))
(* (sqrt (/ 1.0 t_5)) (/ (pow l 2.0) (* x t)))))
(if (<= t 3.4e-17)
(/ t_1 (sqrt (* 2.0 (+ t_2 (* (pow t 2.0) t_4)))))
(/ t_1 (* t_1 (sqrt (/ (+ 1.0 x) (- x 1.0)))))))))))))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 = pow(l, 2.0) / x;
double t_3 = pow(l, 2.0) + (2.0 * pow(t, 2.0));
double t_4 = 1.0 + (1.0 / x);
double t_5 = 2.0 * (t_4 + (1.0 / x));
double tmp;
if (t <= -2.9e-40) {
tmp = (1.0 / x) - 1.0;
} else if (t <= -6e-207) {
tmp = t_1 / sqrt(((t_2 + ((pow(l, 2.0) / pow(x, 3.0)) + ((2.0 * (pow(t, 2.0) + (pow(t, 2.0) / x))) + -((-t_3 - t_3) / pow(x, 2.0))))) + ((2.0 * (pow(t, 2.0) / pow(x, 3.0))) - (-1.0 * ((t_3 / x) + (t_3 / pow(x, 3.0)))))));
} else if (t <= -3.4e-221) {
tmp = -1.0;
} else if (t <= 3.6e-249) {
tmp = t_1 / sqrt((pow(l, 2.0) * ((1.0 / (-1.0 + x)) + (1.0 / x))));
} else if (t <= 4e-165) {
tmp = t_1 / ((t * sqrt(t_5)) + (sqrt((1.0 / t_5)) * (pow(l, 2.0) / (x * t))));
} else if (t <= 3.4e-17) {
tmp = t_1 / sqrt((2.0 * (t_2 + (pow(t, 2.0) * t_4))));
} else {
tmp = t_1 / (t_1 * sqrt(((1.0 + x) / (x - 1.0))));
}
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) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = sqrt(2.0d0) * t
t_2 = (l ** 2.0d0) / x
t_3 = (l ** 2.0d0) + (2.0d0 * (t ** 2.0d0))
t_4 = 1.0d0 + (1.0d0 / x)
t_5 = 2.0d0 * (t_4 + (1.0d0 / x))
if (t <= (-2.9d-40)) then
tmp = (1.0d0 / x) - 1.0d0
else if (t <= (-6d-207)) then
tmp = t_1 / sqrt(((t_2 + (((l ** 2.0d0) / (x ** 3.0d0)) + ((2.0d0 * ((t ** 2.0d0) + ((t ** 2.0d0) / x))) + -((-t_3 - t_3) / (x ** 2.0d0))))) + ((2.0d0 * ((t ** 2.0d0) / (x ** 3.0d0))) - ((-1.0d0) * ((t_3 / x) + (t_3 / (x ** 3.0d0)))))))
else if (t <= (-3.4d-221)) then
tmp = -1.0d0
else if (t <= 3.6d-249) then
tmp = t_1 / sqrt(((l ** 2.0d0) * ((1.0d0 / ((-1.0d0) + x)) + (1.0d0 / x))))
else if (t <= 4d-165) then
tmp = t_1 / ((t * sqrt(t_5)) + (sqrt((1.0d0 / t_5)) * ((l ** 2.0d0) / (x * t))))
else if (t <= 3.4d-17) then
tmp = t_1 / sqrt((2.0d0 * (t_2 + ((t ** 2.0d0) * t_4))))
else
tmp = t_1 / (t_1 * sqrt(((1.0d0 + x) / (x - 1.0d0))))
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 = Math.pow(l, 2.0) / x;
double t_3 = Math.pow(l, 2.0) + (2.0 * Math.pow(t, 2.0));
double t_4 = 1.0 + (1.0 / x);
double t_5 = 2.0 * (t_4 + (1.0 / x));
double tmp;
if (t <= -2.9e-40) {
tmp = (1.0 / x) - 1.0;
} else if (t <= -6e-207) {
tmp = t_1 / Math.sqrt(((t_2 + ((Math.pow(l, 2.0) / Math.pow(x, 3.0)) + ((2.0 * (Math.pow(t, 2.0) + (Math.pow(t, 2.0) / x))) + -((-t_3 - t_3) / Math.pow(x, 2.0))))) + ((2.0 * (Math.pow(t, 2.0) / Math.pow(x, 3.0))) - (-1.0 * ((t_3 / x) + (t_3 / Math.pow(x, 3.0)))))));
} else if (t <= -3.4e-221) {
tmp = -1.0;
} else if (t <= 3.6e-249) {
tmp = t_1 / Math.sqrt((Math.pow(l, 2.0) * ((1.0 / (-1.0 + x)) + (1.0 / x))));
} else if (t <= 4e-165) {
tmp = t_1 / ((t * Math.sqrt(t_5)) + (Math.sqrt((1.0 / t_5)) * (Math.pow(l, 2.0) / (x * t))));
} else if (t <= 3.4e-17) {
tmp = t_1 / Math.sqrt((2.0 * (t_2 + (Math.pow(t, 2.0) * t_4))));
} else {
tmp = t_1 / (t_1 * Math.sqrt(((1.0 + x) / (x - 1.0))));
}
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 = math.pow(l, 2.0) / x t_3 = math.pow(l, 2.0) + (2.0 * math.pow(t, 2.0)) t_4 = 1.0 + (1.0 / x) t_5 = 2.0 * (t_4 + (1.0 / x)) tmp = 0 if t <= -2.9e-40: tmp = (1.0 / x) - 1.0 elif t <= -6e-207: tmp = t_1 / math.sqrt(((t_2 + ((math.pow(l, 2.0) / math.pow(x, 3.0)) + ((2.0 * (math.pow(t, 2.0) + (math.pow(t, 2.0) / x))) + -((-t_3 - t_3) / math.pow(x, 2.0))))) + ((2.0 * (math.pow(t, 2.0) / math.pow(x, 3.0))) - (-1.0 * ((t_3 / x) + (t_3 / math.pow(x, 3.0))))))) elif t <= -3.4e-221: tmp = -1.0 elif t <= 3.6e-249: tmp = t_1 / math.sqrt((math.pow(l, 2.0) * ((1.0 / (-1.0 + x)) + (1.0 / x)))) elif t <= 4e-165: tmp = t_1 / ((t * math.sqrt(t_5)) + (math.sqrt((1.0 / t_5)) * (math.pow(l, 2.0) / (x * t)))) elif t <= 3.4e-17: tmp = t_1 / math.sqrt((2.0 * (t_2 + (math.pow(t, 2.0) * t_4)))) else: tmp = t_1 / (t_1 * math.sqrt(((1.0 + x) / (x - 1.0)))) 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((l ^ 2.0) / x) t_3 = Float64((l ^ 2.0) + Float64(2.0 * (t ^ 2.0))) t_4 = Float64(1.0 + Float64(1.0 / x)) t_5 = Float64(2.0 * Float64(t_4 + Float64(1.0 / x))) tmp = 0.0 if (t <= -2.9e-40) tmp = Float64(Float64(1.0 / x) - 1.0); elseif (t <= -6e-207) tmp = Float64(t_1 / sqrt(Float64(Float64(t_2 + Float64(Float64((l ^ 2.0) / (x ^ 3.0)) + Float64(Float64(2.0 * Float64((t ^ 2.0) + Float64((t ^ 2.0) / x))) + Float64(-Float64(Float64(Float64(-t_3) - t_3) / (x ^ 2.0)))))) + Float64(Float64(2.0 * Float64((t ^ 2.0) / (x ^ 3.0))) - Float64(-1.0 * Float64(Float64(t_3 / x) + Float64(t_3 / (x ^ 3.0)))))))); elseif (t <= -3.4e-221) tmp = -1.0; elseif (t <= 3.6e-249) tmp = Float64(t_1 / sqrt(Float64((l ^ 2.0) * Float64(Float64(1.0 / Float64(-1.0 + x)) + Float64(1.0 / x))))); elseif (t <= 4e-165) tmp = Float64(t_1 / Float64(Float64(t * sqrt(t_5)) + Float64(sqrt(Float64(1.0 / t_5)) * Float64((l ^ 2.0) / Float64(x * t))))); elseif (t <= 3.4e-17) tmp = Float64(t_1 / sqrt(Float64(2.0 * Float64(t_2 + Float64((t ^ 2.0) * t_4))))); else tmp = Float64(t_1 / Float64(t_1 * sqrt(Float64(Float64(1.0 + x) / Float64(x - 1.0))))); 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 = (l ^ 2.0) / x; t_3 = (l ^ 2.0) + (2.0 * (t ^ 2.0)); t_4 = 1.0 + (1.0 / x); t_5 = 2.0 * (t_4 + (1.0 / x)); tmp = 0.0; if (t <= -2.9e-40) tmp = (1.0 / x) - 1.0; elseif (t <= -6e-207) tmp = t_1 / sqrt(((t_2 + (((l ^ 2.0) / (x ^ 3.0)) + ((2.0 * ((t ^ 2.0) + ((t ^ 2.0) / x))) + -((-t_3 - t_3) / (x ^ 2.0))))) + ((2.0 * ((t ^ 2.0) / (x ^ 3.0))) - (-1.0 * ((t_3 / x) + (t_3 / (x ^ 3.0))))))); elseif (t <= -3.4e-221) tmp = -1.0; elseif (t <= 3.6e-249) tmp = t_1 / sqrt(((l ^ 2.0) * ((1.0 / (-1.0 + x)) + (1.0 / x)))); elseif (t <= 4e-165) tmp = t_1 / ((t * sqrt(t_5)) + (sqrt((1.0 / t_5)) * ((l ^ 2.0) / (x * t)))); elseif (t <= 3.4e-17) tmp = t_1 / sqrt((2.0 * (t_2 + ((t ^ 2.0) * t_4)))); else tmp = t_1 / (t_1 * sqrt(((1.0 + x) / (x - 1.0)))); 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[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[l, 2.0], $MachinePrecision] + N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(2.0 * N[(t$95$4 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e-40], N[(N[(1.0 / x), $MachinePrecision] - 1.0), $MachinePrecision], If[LessEqual[t, -6e-207], N[(t$95$1 / N[Sqrt[N[(N[(t$95$2 + N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] + N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + (-N[(N[((-t$95$3) - t$95$3), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(N[(t$95$3 / x), $MachinePrecision] + N[(t$95$3 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.4e-221], -1.0, If[LessEqual[t, 3.6e-249], N[(t$95$1 / N[Sqrt[N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(1.0 / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-165], N[(t$95$1 / N[(N[(t * N[Sqrt[t$95$5], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / t$95$5), $MachinePrecision]], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-17], N[(t$95$1 / N[Sqrt[N[(2.0 * N[(t$95$2 + N[(N[Power[t, 2.0], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(t$95$1 * N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision]], $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{{\ell}^{2}}{x}\\
t_3 := {\ell}^{2} + 2 \cdot {t}^{2}\\
t_4 := 1 + \frac{1}{x}\\
t_5 := 2 \cdot \left(t_4 + \frac{1}{x}\right)\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{-40}:\\
\;\;\;\;\frac{1}{x} - 1\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-207}:\\
\;\;\;\;\frac{t_1}{\sqrt{\left(t_2 + \left(\frac{{\ell}^{2}}{{x}^{3}} + \left(2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right) + \left(-\frac{\left(-t_3\right) - t_3}{{x}^{2}}\right)\right)\right)\right) + \left(2 \cdot \frac{{t}^{2}}{{x}^{3}} - -1 \cdot \left(\frac{t_3}{x} + \frac{t_3}{{x}^{3}}\right)\right)}}\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-221}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-249}:\\
\;\;\;\;\frac{t_1}{\sqrt{{\ell}^{2} \cdot \left(\frac{1}{-1 + x} + \frac{1}{x}\right)}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-165}:\\
\;\;\;\;\frac{t_1}{t \cdot \sqrt{t_5} + \sqrt{\frac{1}{t_5}} \cdot \frac{{\ell}^{2}}{x \cdot t}}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-17}:\\
\;\;\;\;\frac{t_1}{\sqrt{2 \cdot \left(t_2 + {t}^{2} \cdot t_4\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t_1 \cdot \sqrt{\frac{1 + x}{x - 1}}}\\
\end{array}
Results
if t < -2.8999999999999999e-40Initial program 39.6
Taylor expanded in x around inf 35.6
Simplified35.6
[Start]35.6 | \[ \frac{\sqrt{2} \cdot t}{\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_best_45_simplify-109 [=>]35.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right) + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}}
\] |
rational_best_45_simplify-73 [=>]35.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot {t}^{2} + 2 \cdot \frac{{t}^{2}}{x}\right)} + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-91 [=>]35.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(\color{blue}{{t}^{2} \cdot 2} + 2 \cdot \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-71 [=>]35.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right)} + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-91 [=>]35.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - \color{blue}{\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} \cdot -1}\right)}}
\] |
rational_best_45_simplify-16 [=>]35.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - \color{blue}{\left(-\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}\right)}}
\] |
Taylor expanded in t around -inf 6.7
Simplified6.7
[Start]6.7 | \[ \frac{\sqrt{2} \cdot t}{-1 \cdot \left(t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}
\] |
|---|---|
rational_best_45_simplify-25 [=>]6.7 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \left(-1 \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}}
\] |
rational_best_45_simplify-91 [=>]6.7 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \color{blue}{\left(\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot -1\right)}}
\] |
rational_best_45_simplify-16 [=>]6.7 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \color{blue}{\left(-\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}}
\] |
rational_best_45_simplify-91 [=>]6.7 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \left(-\sqrt{\color{blue}{\left(1 + \frac{1}{x}\right) \cdot 2} + 2 \cdot \frac{1}{x}}\right)}
\] |
rational_best_45_simplify-71 [=>]6.7 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \left(-\sqrt{\color{blue}{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)}}\right)}
\] |
Taylor expanded in x around inf 6.6
if -2.8999999999999999e-40 < t < -5.9999999999999999e-207Initial program 42.0
Taylor expanded in x around -inf 17.9
Simplified17.9
[Start]17.9 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(\frac{{\ell}^{2}}{x} + \left(2 \cdot \frac{{t}^{2}}{{x}^{3}} + \left(-1 \cdot \frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right) - \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{{x}^{2}} + \left(\frac{{\ell}^{2}}{{x}^{3}} + \left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)\right)\right)\right)\right) - \left(-1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{{x}^{3}} + -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
|---|---|
rational_best_45_simplify-80 [=>]17.9 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{{x}^{3}} + \left(\frac{{\ell}^{2}}{x} + \left(-1 \cdot \frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right) - \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{{x}^{2}} + \left(\frac{{\ell}^{2}}{{x}^{3}} + \left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)\right)\right)\right)\right)} - \left(-1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{{x}^{3}} + -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-109 [=>]17.9 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(\frac{{\ell}^{2}}{x} + \left(-1 \cdot \frac{-1 \cdot \left({\ell}^{2} + 2 \cdot {t}^{2}\right) - \left({\ell}^{2} + 2 \cdot {t}^{2}\right)}{{x}^{2}} + \left(\frac{{\ell}^{2}}{{x}^{3}} + \left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right)\right)\right)\right) + \left(2 \cdot \frac{{t}^{2}}{{x}^{3}} - \left(-1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{{x}^{3}} + -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)\right)}}}
\] |
if -5.9999999999999999e-207 < t < -3.4000000000000001e-221Initial program 64.0
Taylor expanded in x around inf 30.7
Simplified30.7
[Start]30.7 | \[ \frac{\sqrt{2} \cdot t}{\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_best_45_simplify-109 [=>]30.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right) + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}}
\] |
rational_best_45_simplify-73 [=>]30.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot {t}^{2} + 2 \cdot \frac{{t}^{2}}{x}\right)} + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-91 [=>]30.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(\color{blue}{{t}^{2} \cdot 2} + 2 \cdot \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-71 [=>]30.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right)} + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-91 [=>]30.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - \color{blue}{\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} \cdot -1}\right)}}
\] |
rational_best_45_simplify-16 [=>]30.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - \color{blue}{\left(-\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}\right)}}
\] |
Taylor expanded in t around -inf 40.0
Simplified40.0
[Start]40.0 | \[ \frac{\sqrt{2} \cdot t}{-1 \cdot \left(t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}
\] |
|---|---|
rational_best_45_simplify-25 [=>]40.0 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \left(-1 \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}}
\] |
rational_best_45_simplify-91 [=>]40.0 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \color{blue}{\left(\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot -1\right)}}
\] |
rational_best_45_simplify-16 [=>]40.0 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \color{blue}{\left(-\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}\right)}}
\] |
rational_best_45_simplify-91 [=>]40.0 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \left(-\sqrt{\color{blue}{\left(1 + \frac{1}{x}\right) \cdot 2} + 2 \cdot \frac{1}{x}}\right)}
\] |
rational_best_45_simplify-71 [=>]40.0 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \left(-\sqrt{\color{blue}{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)}}\right)}
\] |
Taylor expanded in x around inf 40.0
if -3.4000000000000001e-221 < t < 3.59999999999999995e-249Initial program 63.2
Taylor expanded in l around inf 62.6
Simplified45.1
[Start]62.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(\left(\frac{x}{x - 1} + \frac{1}{x - 1}\right) - 1\right) \cdot {\ell}^{2}}}
\] |
|---|---|
rational_best_45_simplify-91 [=>]62.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{{\ell}^{2} \cdot \left(\left(\frac{x}{x - 1} + \frac{1}{x - 1}\right) - 1\right)}}}
\] |
rational_best_45_simplify-109 [=>]45.1 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{{\ell}^{2} \cdot \color{blue}{\left(\frac{1}{x - 1} + \left(\frac{x}{x - 1} - 1\right)\right)}}}
\] |
rational_best_45_simplify-55 [<=]45.1 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{{\ell}^{2} \cdot \left(\frac{1}{\color{blue}{x + -1}} + \left(\frac{x}{x - 1} - 1\right)\right)}}
\] |
rational_best_45_simplify-73 [=>]45.1 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{{\ell}^{2} \cdot \left(\frac{1}{\color{blue}{-1 + x}} + \left(\frac{x}{x - 1} - 1\right)\right)}}
\] |
rational_best_45_simplify-55 [<=]45.1 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{{\ell}^{2} \cdot \left(\frac{1}{-1 + x} + \left(\frac{x}{\color{blue}{x + -1}} - 1\right)\right)}}
\] |
rational_best_45_simplify-73 [=>]45.1 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{{\ell}^{2} \cdot \left(\frac{1}{-1 + x} + \left(\frac{x}{\color{blue}{-1 + x}} - 1\right)\right)}}
\] |
Taylor expanded in x around inf 32.6
if 3.59999999999999995e-249 < t < 4e-165Initial program 63.3
Taylor expanded in x around inf 36.3
Simplified36.3
[Start]36.3 | \[ \frac{\sqrt{2} \cdot t}{\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_best_45_simplify-109 [=>]36.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right) + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}}
\] |
rational_best_45_simplify-73 [=>]36.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot {t}^{2} + 2 \cdot \frac{{t}^{2}}{x}\right)} + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-91 [=>]36.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(\color{blue}{{t}^{2} \cdot 2} + 2 \cdot \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-71 [=>]36.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right)} + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-91 [=>]36.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - \color{blue}{\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} \cdot -1}\right)}}
\] |
rational_best_45_simplify-16 [=>]36.3 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - \color{blue}{\left(-\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}\right)}}
\] |
Taylor expanded in t around inf 22.6
Simplified22.6
[Start]22.6 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}} \cdot t + \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}}
\] |
|---|---|
rational_best_45_simplify-91 [=>]22.6 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{t \cdot \sqrt{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} + \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}}
\] |
rational_best_45_simplify-91 [=>]22.6 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\color{blue}{\left(1 + \frac{1}{x}\right) \cdot 2} + 2 \cdot \frac{1}{x}} + \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}}
\] |
rational_best_45_simplify-71 [=>]22.6 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{\color{blue}{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)}} + \sqrt{\frac{1}{2 \cdot \left(1 + \frac{1}{x}\right) + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}}
\] |
rational_best_45_simplify-91 [=>]22.6 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)} + \sqrt{\frac{1}{\color{blue}{\left(1 + \frac{1}{x}\right) \cdot 2} + 2 \cdot \frac{1}{x}}} \cdot \frac{{\ell}^{2}}{t \cdot x}}
\] |
rational_best_45_simplify-71 [=>]22.6 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)} + \sqrt{\frac{1}{\color{blue}{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)}}} \cdot \frac{{\ell}^{2}}{t \cdot x}}
\] |
rational_best_45_simplify-91 [=>]22.6 | \[ \frac{\sqrt{2} \cdot t}{t \cdot \sqrt{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)} + \sqrt{\frac{1}{2 \cdot \left(\left(1 + \frac{1}{x}\right) + \frac{1}{x}\right)}} \cdot \frac{{\ell}^{2}}{\color{blue}{x \cdot t}}}
\] |
if 4e-165 < t < 3.3999999999999998e-17Initial program 33.4
Taylor expanded in x around inf 10.7
Simplified10.7
[Start]10.7 | \[ \frac{\sqrt{2} \cdot t}{\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_best_45_simplify-109 [=>]10.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot \frac{{t}^{2}}{x} + 2 \cdot {t}^{2}\right) + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}}
\] |
rational_best_45_simplify-73 [=>]10.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{\left(2 \cdot {t}^{2} + 2 \cdot \frac{{t}^{2}}{x}\right)} + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-91 [=>]10.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\left(\color{blue}{{t}^{2} \cdot 2} + 2 \cdot \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-71 [=>]10.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right)} + \left(\frac{{\ell}^{2}}{x} - -1 \cdot \frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}}
\] |
rational_best_45_simplify-91 [=>]10.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - \color{blue}{\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x} \cdot -1}\right)}}
\] |
rational_best_45_simplify-16 [=>]10.7 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left({t}^{2} + \frac{{t}^{2}}{x}\right) + \left(\frac{{\ell}^{2}}{x} - \color{blue}{\left(-\frac{{\ell}^{2} + 2 \cdot {t}^{2}}{x}\right)}\right)}}
\] |
Taylor expanded in l around inf 10.9
Applied egg-rr10.9
Simplified10.9
[Start]10.9 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \left(\frac{{\ell}^{2}}{x} + \left({t}^{2} + \frac{{t}^{2}}{x}\right)\right)} + 0}
\] |
|---|---|
rational_best_45_simplify-3 [=>]10.9 | \[ \frac{\sqrt{2} \cdot t}{\color{blue}{\sqrt{2 \cdot \left(\frac{{\ell}^{2}}{x} + \left({t}^{2} + \frac{{t}^{2}}{x}\right)\right)}}}
\] |
rational_best_45_simplify-80 [=>]10.9 | \[ \frac{\sqrt{2} \cdot t}{\sqrt{2 \cdot \color{blue}{\left({t}^{2} + \left(\frac{{\ell}^{2}}{x} + \frac{{t}^{2}}{x}\right)\right)}}}
\] |
Taylor expanded in t around 0 10.9
if 3.3999999999999998e-17 < t Initial program 40.4
Taylor expanded in l around 0 5.5
Final simplification11.7
| Alternative 1 | |
|---|---|
| Error | 11.6 |
| Cost | 80264 |
| Alternative 2 | |
|---|---|
| Error | 11.5 |
| Cost | 28692 |
| Alternative 3 | |
|---|---|
| Error | 11.9 |
| Cost | 27608 |
| Alternative 4 | |
|---|---|
| Error | 14.3 |
| Cost | 20488 |
| Alternative 5 | |
|---|---|
| Error | 14.3 |
| Cost | 20424 |
| Alternative 6 | |
|---|---|
| Error | 14.7 |
| Cost | 20168 |
| Alternative 7 | |
|---|---|
| Error | 14.5 |
| Cost | 20104 |
| Alternative 8 | |
|---|---|
| Error | 15.2 |
| Cost | 14152 |
| Alternative 9 | |
|---|---|
| Error | 15.5 |
| Cost | 13640 |
| Alternative 10 | |
|---|---|
| Error | 15.4 |
| Cost | 13512 |
| Alternative 11 | |
|---|---|
| Error | 15.7 |
| Cost | 13256 |
| Alternative 12 | |
|---|---|
| Error | 36.1 |
| Cost | 6984 |
| Alternative 13 | |
|---|---|
| Error | 35.7 |
| Cost | 6852 |
| Alternative 14 | |
|---|---|
| Error | 39.4 |
| Cost | 320 |
| Alternative 15 | |
|---|---|
| Error | 39.6 |
| Cost | 64 |
herbie shell --seed 2023098
(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)))))