| Alternative 1 | |
|---|---|
| Error | 31.7 |
| Cost | 14728 |
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* l (/ l Om))))
(t_2
(sqrt
(*
(* n (* U (+ (* (- U U*) (/ n (pow Om 2.0))) (* 2.0 (/ 1.0 Om)))))
-2.0)))
(t_3 (pow (/ l Om) 2.0)))
(if (<= l -4.1e+171)
(* l (- t_2))
(if (<= l 2.1e-83)
(sqrt (* (* 2.0 (* n U)) (- (- t t_1) (* t_3 (* n (- U U*))))))
(if (<= l 7.6e+80)
(sqrt
(+ (* n (* 2.0 (* U t))) (* (* U (pow l 2.0)) (* (/ n Om) -4.0))))
(if (<= l 2.3e+247)
(* l t_2)
(if (<= l 7.2e+263)
(sqrt (* (* U (- (- t (* (- U U*) (* n t_3))) t_1)) (+ n n)))
(* l (sqrt (* (/ (* n U) Om) -4.0))))))))))double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (l * (l / Om));
double t_2 = sqrt(((n * (U * (((U - U_42_) * (n / pow(Om, 2.0))) + (2.0 * (1.0 / Om))))) * -2.0));
double t_3 = pow((l / Om), 2.0);
double tmp;
if (l <= -4.1e+171) {
tmp = l * -t_2;
} else if (l <= 2.1e-83) {
tmp = sqrt(((2.0 * (n * U)) * ((t - t_1) - (t_3 * (n * (U - U_42_))))));
} else if (l <= 7.6e+80) {
tmp = sqrt(((n * (2.0 * (U * t))) + ((U * pow(l, 2.0)) * ((n / Om) * -4.0))));
} else if (l <= 2.3e+247) {
tmp = l * t_2;
} else if (l <= 7.2e+263) {
tmp = sqrt(((U * ((t - ((U - U_42_) * (n * t_3))) - t_1)) * (n + n)));
} else {
tmp = l * sqrt((((n * U) / Om) * -4.0));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * (l * (l / om))
t_2 = sqrt(((n * (u * (((u - u_42) * (n / (om ** 2.0d0))) + (2.0d0 * (1.0d0 / om))))) * (-2.0d0)))
t_3 = (l / om) ** 2.0d0
if (l <= (-4.1d+171)) then
tmp = l * -t_2
else if (l <= 2.1d-83) then
tmp = sqrt(((2.0d0 * (n * u)) * ((t - t_1) - (t_3 * (n * (u - u_42))))))
else if (l <= 7.6d+80) then
tmp = sqrt(((n * (2.0d0 * (u * t))) + ((u * (l ** 2.0d0)) * ((n / om) * (-4.0d0)))))
else if (l <= 2.3d+247) then
tmp = l * t_2
else if (l <= 7.2d+263) then
tmp = sqrt(((u * ((t - ((u - u_42) * (n * t_3))) - t_1)) * (n + n)))
else
tmp = l * sqrt((((n * u) / om) * (-4.0d0)))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (l * (l / Om));
double t_2 = Math.sqrt(((n * (U * (((U - U_42_) * (n / Math.pow(Om, 2.0))) + (2.0 * (1.0 / Om))))) * -2.0));
double t_3 = Math.pow((l / Om), 2.0);
double tmp;
if (l <= -4.1e+171) {
tmp = l * -t_2;
} else if (l <= 2.1e-83) {
tmp = Math.sqrt(((2.0 * (n * U)) * ((t - t_1) - (t_3 * (n * (U - U_42_))))));
} else if (l <= 7.6e+80) {
tmp = Math.sqrt(((n * (2.0 * (U * t))) + ((U * Math.pow(l, 2.0)) * ((n / Om) * -4.0))));
} else if (l <= 2.3e+247) {
tmp = l * t_2;
} else if (l <= 7.2e+263) {
tmp = Math.sqrt(((U * ((t - ((U - U_42_) * (n * t_3))) - t_1)) * (n + n)));
} else {
tmp = l * Math.sqrt((((n * U) / Om) * -4.0));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (l * (l / Om)) t_2 = math.sqrt(((n * (U * (((U - U_42_) * (n / math.pow(Om, 2.0))) + (2.0 * (1.0 / Om))))) * -2.0)) t_3 = math.pow((l / Om), 2.0) tmp = 0 if l <= -4.1e+171: tmp = l * -t_2 elif l <= 2.1e-83: tmp = math.sqrt(((2.0 * (n * U)) * ((t - t_1) - (t_3 * (n * (U - U_42_)))))) elif l <= 7.6e+80: tmp = math.sqrt(((n * (2.0 * (U * t))) + ((U * math.pow(l, 2.0)) * ((n / Om) * -4.0)))) elif l <= 2.3e+247: tmp = l * t_2 elif l <= 7.2e+263: tmp = math.sqrt(((U * ((t - ((U - U_42_) * (n * t_3))) - t_1)) * (n + n))) else: tmp = l * math.sqrt((((n * U) / Om) * -4.0)) return tmp
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(l * Float64(l / Om))) t_2 = sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(U - U_42_) * Float64(n / (Om ^ 2.0))) + Float64(2.0 * Float64(1.0 / Om))))) * -2.0)) t_3 = Float64(l / Om) ^ 2.0 tmp = 0.0 if (l <= -4.1e+171) tmp = Float64(l * Float64(-t_2)); elseif (l <= 2.1e-83) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t - t_1) - Float64(t_3 * Float64(n * Float64(U - U_42_)))))); elseif (l <= 7.6e+80) tmp = sqrt(Float64(Float64(n * Float64(2.0 * Float64(U * t))) + Float64(Float64(U * (l ^ 2.0)) * Float64(Float64(n / Om) * -4.0)))); elseif (l <= 2.3e+247) tmp = Float64(l * t_2); elseif (l <= 7.2e+263) tmp = sqrt(Float64(Float64(U * Float64(Float64(t - Float64(Float64(U - U_42_) * Float64(n * t_3))) - t_1)) * Float64(n + n))); else tmp = Float64(l * sqrt(Float64(Float64(Float64(n * U) / Om) * -4.0))); end return tmp end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (l * (l / Om)); t_2 = sqrt(((n * (U * (((U - U_42_) * (n / (Om ^ 2.0))) + (2.0 * (1.0 / Om))))) * -2.0)); t_3 = (l / Om) ^ 2.0; tmp = 0.0; if (l <= -4.1e+171) tmp = l * -t_2; elseif (l <= 2.1e-83) tmp = sqrt(((2.0 * (n * U)) * ((t - t_1) - (t_3 * (n * (U - U_42_)))))); elseif (l <= 7.6e+80) tmp = sqrt(((n * (2.0 * (U * t))) + ((U * (l ^ 2.0)) * ((n / Om) * -4.0)))); elseif (l <= 2.3e+247) tmp = l * t_2; elseif (l <= 7.2e+263) tmp = sqrt(((U * ((t - ((U - U_42_) * (n * t_3))) - t_1)) * (n + n))); else tmp = l * sqrt((((n * U) / Om) * -4.0)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[l, -4.1e+171], N[(l * (-t$95$2)), $MachinePrecision], If[LessEqual[l, 2.1e-83], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t - t$95$1), $MachinePrecision] - N[(t$95$3 * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 7.6e+80], N[Sqrt[N[(N[(n * N[(2.0 * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(U * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.3e+247], N[(l * t$95$2), $MachinePrecision], If[LessEqual[l, 7.2e+263], N[Sqrt[N[(N[(U * N[(N[(t - N[(N[(U - U$42$), $MachinePrecision] * N[(n * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] * N[(n + n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l * N[Sqrt[N[(N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\begin{array}{l}
t_1 := 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
t_2 := \sqrt{\left(n \cdot \left(U \cdot \left(\left(U - U*\right) \cdot \frac{n}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right)\right)\right) \cdot -2}\\
t_3 := {\left(\frac{\ell}{Om}\right)}^{2}\\
\mathbf{if}\;\ell \leq -4.1 \cdot 10^{+171}:\\
\;\;\;\;\ell \cdot \left(-t_2\right)\\
\mathbf{elif}\;\ell \leq 2.1 \cdot 10^{-83}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - t_1\right) - t_3 \cdot \left(n \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 7.6 \cdot 10^{+80}:\\
\;\;\;\;\sqrt{n \cdot \left(2 \cdot \left(U \cdot t\right)\right) + \left(U \cdot {\ell}^{2}\right) \cdot \left(\frac{n}{Om} \cdot -4\right)}\\
\mathbf{elif}\;\ell \leq 2.3 \cdot 10^{+247}:\\
\;\;\;\;\ell \cdot t_2\\
\mathbf{elif}\;\ell \leq 7.2 \cdot 10^{+263}:\\
\;\;\;\;\sqrt{\left(U \cdot \left(\left(t - \left(U - U*\right) \cdot \left(n \cdot t_3\right)\right) - t_1\right)\right) \cdot \left(n + n\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \sqrt{\frac{n \cdot U}{Om} \cdot -4}\\
\end{array}
Results
if l < -4.0999999999999996e171Initial program 64.0
Simplified49.9
[Start]64.0 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
|---|---|
rational.json-simplify-49 [=>]49.9 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
Taylor expanded in t around 0 64.0
Simplified64.0
[Start]64.0 | \[ \left(\sqrt{2} \cdot \sqrt{-1}\right) \cdot \sqrt{n \cdot \left(U \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)}
\] |
|---|---|
exponential.json-simplify-20 [=>]64.0 | \[ \color{blue}{\sqrt{-1 \cdot 2}} \cdot \sqrt{n \cdot \left(U \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)}
\] |
metadata-eval [=>]64.0 | \[ \sqrt{\color{blue}{-2}} \cdot \sqrt{n \cdot \left(U \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)}
\] |
rational.json-simplify-2 [=>]64.0 | \[ \sqrt{-2} \cdot \sqrt{n \cdot \color{blue}{\left(\left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right) \cdot U\right)}}
\] |
exponential.json-simplify-20 [=>]64.0 | \[ \color{blue}{\sqrt{\left(n \cdot \left(\left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right) \cdot U\right)\right) \cdot -2}}
\] |
rational.json-simplify-2 [<=]64.0 | \[ \sqrt{\color{blue}{-2 \cdot \left(n \cdot \left(\left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right) \cdot U\right)\right)}}
\] |
rational.json-simplify-43 [=>]64.0 | \[ \sqrt{-2 \cdot \color{blue}{\left(\left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right) \cdot \left(U \cdot n\right)\right)}}
\] |
Taylor expanded in l around -inf 64.0
Simplified34.3
[Start]64.0 | \[ -1 \cdot \left(\sqrt{\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot U\right)} \cdot \left(\ell \cdot \sqrt{-2}\right)\right)
\] |
|---|---|
rational.json-simplify-43 [=>]64.0 | \[ -1 \cdot \color{blue}{\left(\ell \cdot \left(\sqrt{-2} \cdot \sqrt{\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot U\right)}\right)\right)}
\] |
rational.json-simplify-43 [=>]64.0 | \[ \color{blue}{\ell \cdot \left(\left(\sqrt{-2} \cdot \sqrt{\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot U\right)}\right) \cdot -1\right)}
\] |
rational.json-simplify-9 [=>]64.0 | \[ \ell \cdot \color{blue}{\left(-\sqrt{-2} \cdot \sqrt{\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot U\right)}\right)}
\] |
exponential.json-simplify-20 [=>]33.3 | \[ \ell \cdot \left(-\color{blue}{\sqrt{\left(\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot U\right)\right) \cdot -2}}\right)
\] |
rational.json-simplify-43 [=>]34.4 | \[ \ell \cdot \left(-\sqrt{\color{blue}{\left(n \cdot \left(U \cdot \left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right)\right)\right)} \cdot -2}\right)
\] |
rational.json-simplify-49 [=>]34.3 | \[ \ell \cdot \left(-\sqrt{\left(n \cdot \left(U \cdot \left(\color{blue}{\left(U - U*\right) \cdot \frac{n}{{Om}^{2}}} + 2 \cdot \frac{1}{Om}\right)\right)\right) \cdot -2}\right)
\] |
if -4.0999999999999996e171 < l < 2.0999999999999999e-83Initial program 28.0
Simplified29.7
[Start]28.0 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
|---|---|
rational.json-simplify-2 [=>]28.0 | \[ \sqrt{\color{blue}{\left(U \cdot \left(2 \cdot n\right)\right)} \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
rational.json-simplify-43 [=>]28.0 | \[ \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
rational.json-simplify-49 [=>]27.5 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
rational.json-simplify-2 [=>]27.5 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \color{blue}{\left(U - U*\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)}
\] |
rational.json-simplify-2 [=>]27.5 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(U - U*\right) \cdot \color{blue}{\left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right)}\right)}
\] |
rational.json-simplify-43 [=>]29.7 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}\right)}
\] |
if 2.0999999999999999e-83 < l < 7.59999999999999995e80Initial program 30.9
Simplified30.9
[Start]30.9 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
|---|---|
rational.json-simplify-49 [=>]30.9 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
Taylor expanded in Om around inf 35.6
Simplified34.7
[Start]35.6 | \[ \sqrt{2 \cdot \left(n \cdot \left(t \cdot U\right)\right) + -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}}
\] |
|---|---|
rational.json-simplify-43 [=>]35.6 | \[ \sqrt{\color{blue}{n \cdot \left(\left(t \cdot U\right) \cdot 2\right)} + -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}}
\] |
rational.json-simplify-2 [=>]35.6 | \[ \sqrt{n \cdot \color{blue}{\left(2 \cdot \left(t \cdot U\right)\right)} + -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}}
\] |
rational.json-simplify-2 [=>]35.6 | \[ \sqrt{n \cdot \left(2 \cdot \color{blue}{\left(U \cdot t\right)}\right) + -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}}
\] |
rational.json-simplify-49 [=>]34.7 | \[ \sqrt{n \cdot \left(2 \cdot \left(U \cdot t\right)\right) + -4 \cdot \color{blue}{\left(\left({\ell}^{2} \cdot U\right) \cdot \frac{n}{Om}\right)}}
\] |
rational.json-simplify-43 [=>]34.7 | \[ \sqrt{n \cdot \left(2 \cdot \left(U \cdot t\right)\right) + \color{blue}{\left({\ell}^{2} \cdot U\right) \cdot \left(\frac{n}{Om} \cdot -4\right)}}
\] |
rational.json-simplify-2 [=>]34.7 | \[ \sqrt{n \cdot \left(2 \cdot \left(U \cdot t\right)\right) + \color{blue}{\left(U \cdot {\ell}^{2}\right)} \cdot \left(\frac{n}{Om} \cdot -4\right)}
\] |
if 7.59999999999999995e80 < l < 2.29999999999999991e247Initial program 50.4
Simplified39.6
[Start]50.4 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
|---|---|
rational.json-simplify-49 [=>]39.6 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
Taylor expanded in t around 0 64.0
Simplified59.5
[Start]64.0 | \[ \left(\sqrt{2} \cdot \sqrt{-1}\right) \cdot \sqrt{n \cdot \left(U \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)}
\] |
|---|---|
exponential.json-simplify-20 [=>]64.0 | \[ \color{blue}{\sqrt{-1 \cdot 2}} \cdot \sqrt{n \cdot \left(U \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)}
\] |
metadata-eval [=>]64.0 | \[ \sqrt{\color{blue}{-2}} \cdot \sqrt{n \cdot \left(U \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)}
\] |
rational.json-simplify-2 [=>]64.0 | \[ \sqrt{-2} \cdot \sqrt{n \cdot \color{blue}{\left(\left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right) \cdot U\right)}}
\] |
exponential.json-simplify-20 [=>]58.6 | \[ \color{blue}{\sqrt{\left(n \cdot \left(\left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right) \cdot U\right)\right) \cdot -2}}
\] |
rational.json-simplify-2 [<=]58.6 | \[ \sqrt{\color{blue}{-2 \cdot \left(n \cdot \left(\left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right) \cdot U\right)\right)}}
\] |
rational.json-simplify-43 [=>]59.3 | \[ \sqrt{-2 \cdot \color{blue}{\left(\left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right) \cdot \left(U \cdot n\right)\right)}}
\] |
Taylor expanded in l around 0 64.0
Simplified36.3
[Start]64.0 | \[ \sqrt{\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot U\right)} \cdot \left(\ell \cdot \sqrt{-2}\right)
\] |
|---|---|
rational.json-simplify-43 [=>]64.0 | \[ \color{blue}{\ell \cdot \left(\sqrt{-2} \cdot \sqrt{\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot U\right)}\right)}
\] |
exponential.json-simplify-20 [=>]36.2 | \[ \ell \cdot \color{blue}{\sqrt{\left(\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot U\right)\right) \cdot -2}}
\] |
rational.json-simplify-43 [=>]36.4 | \[ \ell \cdot \sqrt{\color{blue}{\left(n \cdot \left(U \cdot \left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right)\right)\right)} \cdot -2}
\] |
rational.json-simplify-49 [=>]36.3 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(\color{blue}{\left(U - U*\right) \cdot \frac{n}{{Om}^{2}}} + 2 \cdot \frac{1}{Om}\right)\right)\right) \cdot -2}
\] |
if 2.29999999999999991e247 < l < 7.19999999999999956e263Initial program 64.0
Simplified56.1
[Start]64.0 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
|---|---|
rational.json-simplify-2 [=>]64.0 | \[ \sqrt{\color{blue}{\left(U \cdot \left(2 \cdot n\right)\right)} \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
rational.json-simplify-43 [=>]64.0 | \[ \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
rational.json-simplify-49 [=>]56.1 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
rational.json-simplify-2 [=>]56.1 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \color{blue}{\left(U - U*\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)}
\] |
rational.json-simplify-2 [=>]56.1 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(U - U*\right) \cdot \color{blue}{\left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right)}\right)}
\] |
rational.json-simplify-43 [=>]56.1 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}\right)}
\] |
Applied egg-rr55.7
Simplified55.7
[Start]55.7 | \[ \sqrt{n \cdot \left(U \cdot \left(\left(t - {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right) + n \cdot \left(U \cdot \left(\left(t - {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}
\] |
|---|---|
rational.json-simplify-2 [=>]55.7 | \[ \sqrt{\color{blue}{\left(U \cdot \left(\left(t - {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right) \cdot n} + n \cdot \left(U \cdot \left(\left(t - {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}
\] |
rational.json-simplify-51 [=>]55.7 | \[ \sqrt{\color{blue}{\left(U \cdot \left(\left(t - {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right) \cdot \left(n + n\right)}}
\] |
rational.json-simplify-2 [=>]55.7 | \[ \sqrt{\left(U \cdot \left(\left(t - {\left(\frac{\ell}{Om}\right)}^{2} \cdot \color{blue}{\left(\left(U - U*\right) \cdot n\right)}\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right) \cdot \left(n + n\right)}
\] |
rational.json-simplify-43 [=>]55.7 | \[ \sqrt{\left(U \cdot \left(\left(t - \color{blue}{\left(U - U*\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right) \cdot \left(n + n\right)}
\] |
if 7.19999999999999956e263 < l Initial program 64.0
Simplified58.9
[Start]64.0 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
|---|---|
rational.json-simplify-2 [=>]64.0 | \[ \sqrt{\color{blue}{\left(U \cdot \left(2 \cdot n\right)\right)} \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
rational.json-simplify-43 [=>]64.0 | \[ \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
rational.json-simplify-49 [=>]58.9 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
rational.json-simplify-2 [=>]58.9 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \color{blue}{\left(U - U*\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)}
\] |
rational.json-simplify-2 [=>]58.9 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(U - U*\right) \cdot \color{blue}{\left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right)}\right)}
\] |
rational.json-simplify-43 [=>]58.9 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}\right)}
\] |
Taylor expanded in n around 0 64.0
Applied egg-rr64.0
Taylor expanded in t around 0 64.0
Simplified36.3
[Start]64.0 | \[ \left(\sqrt{2} \cdot \left(\ell \cdot \sqrt{-2}\right)\right) \cdot \sqrt{\frac{n \cdot U}{Om}}
\] |
|---|---|
rational.json-simplify-2 [=>]64.0 | \[ \color{blue}{\sqrt{\frac{n \cdot U}{Om}} \cdot \left(\sqrt{2} \cdot \left(\ell \cdot \sqrt{-2}\right)\right)}
\] |
rational.json-simplify-43 [=>]64.0 | \[ \sqrt{\frac{n \cdot U}{Om}} \cdot \color{blue}{\left(\ell \cdot \left(\sqrt{-2} \cdot \sqrt{2}\right)\right)}
\] |
rational.json-simplify-43 [=>]64.0 | \[ \color{blue}{\ell \cdot \left(\left(\sqrt{-2} \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot U}{Om}}\right)}
\] |
exponential.json-simplify-20 [=>]64.0 | \[ \ell \cdot \left(\color{blue}{\sqrt{2 \cdot -2}} \cdot \sqrt{\frac{n \cdot U}{Om}}\right)
\] |
metadata-eval [=>]64.0 | \[ \ell \cdot \left(\sqrt{\color{blue}{-4}} \cdot \sqrt{\frac{n \cdot U}{Om}}\right)
\] |
exponential.json-simplify-20 [=>]36.3 | \[ \ell \cdot \color{blue}{\sqrt{\frac{n \cdot U}{Om} \cdot -4}}
\] |
Final simplification31.9
| Alternative 1 | |
|---|---|
| Error | 31.7 |
| Cost | 14728 |
| Alternative 2 | |
|---|---|
| Error | 32.3 |
| Cost | 14404 |
| Alternative 3 | |
|---|---|
| Error | 32.5 |
| Cost | 14340 |
| Alternative 4 | |
|---|---|
| Error | 34.1 |
| Cost | 14092 |
| Alternative 5 | |
|---|---|
| Error | 32.9 |
| Cost | 14092 |
| Alternative 6 | |
|---|---|
| Error | 32.8 |
| Cost | 14092 |
| Alternative 7 | |
|---|---|
| Error | 32.9 |
| Cost | 13960 |
| Alternative 8 | |
|---|---|
| Error | 33.0 |
| Cost | 13960 |
| Alternative 9 | |
|---|---|
| Error | 35.8 |
| Cost | 7240 |
| Alternative 10 | |
|---|---|
| Error | 35.8 |
| Cost | 7240 |
| Alternative 11 | |
|---|---|
| Error | 41.4 |
| Cost | 7112 |
| Alternative 12 | |
|---|---|
| Error | 38.0 |
| Cost | 7108 |
| Alternative 13 | |
|---|---|
| Error | 38.1 |
| Cost | 7108 |
| Alternative 14 | |
|---|---|
| Error | 40.6 |
| Cost | 6980 |
| Alternative 15 | |
|---|---|
| Error | 40.6 |
| Cost | 6848 |
herbie shell --seed 2023075
(FPCore (n U t l Om U*)
:name "Toniolo and Linder, Equation (13)"
:precision binary64
(sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))