| Alternative 1 | |
|---|---|
| Error | 32.0 |
| 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 (/ 1.0 Om)))
(t_2 (* 2.0 (* l (/ l Om))))
(t_3 (pow (/ l Om) 2.0)))
(if (<= l -3.8e+172)
(*
l
(- (sqrt (* (* n (* U (+ t_1 (* n (/ (- U U*) (pow Om 2.0)))))) -2.0))))
(if (<= l -5e-96)
(sqrt (* (* 2.0 (* n U)) (- (- t t_2) (* t_3 (* n (- U U*))))))
(if (<= l 4.9e+110)
(sqrt (* (* U (- (- t (* (- U U*) (* t_3 n))) t_2)) (+ n n)))
(*
l
(sqrt
(* (* n (* U (+ (* U* (/ n (- (pow Om 2.0)))) t_1))) -2.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 * (1.0 / Om);
double t_2 = 2.0 * (l * (l / Om));
double t_3 = pow((l / Om), 2.0);
double tmp;
if (l <= -3.8e+172) {
tmp = l * -sqrt(((n * (U * (t_1 + (n * ((U - U_42_) / pow(Om, 2.0)))))) * -2.0));
} else if (l <= -5e-96) {
tmp = sqrt(((2.0 * (n * U)) * ((t - t_2) - (t_3 * (n * (U - U_42_))))));
} else if (l <= 4.9e+110) {
tmp = sqrt(((U * ((t - ((U - U_42_) * (t_3 * n))) - t_2)) * (n + n)));
} else {
tmp = l * sqrt(((n * (U * ((U_42_ * (n / -pow(Om, 2.0))) + t_1))) * -2.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 * (1.0d0 / om)
t_2 = 2.0d0 * (l * (l / om))
t_3 = (l / om) ** 2.0d0
if (l <= (-3.8d+172)) then
tmp = l * -sqrt(((n * (u * (t_1 + (n * ((u - u_42) / (om ** 2.0d0)))))) * (-2.0d0)))
else if (l <= (-5d-96)) then
tmp = sqrt(((2.0d0 * (n * u)) * ((t - t_2) - (t_3 * (n * (u - u_42))))))
else if (l <= 4.9d+110) then
tmp = sqrt(((u * ((t - ((u - u_42) * (t_3 * n))) - t_2)) * (n + n)))
else
tmp = l * sqrt(((n * (u * ((u_42 * (n / -(om ** 2.0d0))) + t_1))) * (-2.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 * (1.0 / Om);
double t_2 = 2.0 * (l * (l / Om));
double t_3 = Math.pow((l / Om), 2.0);
double tmp;
if (l <= -3.8e+172) {
tmp = l * -Math.sqrt(((n * (U * (t_1 + (n * ((U - U_42_) / Math.pow(Om, 2.0)))))) * -2.0));
} else if (l <= -5e-96) {
tmp = Math.sqrt(((2.0 * (n * U)) * ((t - t_2) - (t_3 * (n * (U - U_42_))))));
} else if (l <= 4.9e+110) {
tmp = Math.sqrt(((U * ((t - ((U - U_42_) * (t_3 * n))) - t_2)) * (n + n)));
} else {
tmp = l * Math.sqrt(((n * (U * ((U_42_ * (n / -Math.pow(Om, 2.0))) + t_1))) * -2.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 * (1.0 / Om) t_2 = 2.0 * (l * (l / Om)) t_3 = math.pow((l / Om), 2.0) tmp = 0 if l <= -3.8e+172: tmp = l * -math.sqrt(((n * (U * (t_1 + (n * ((U - U_42_) / math.pow(Om, 2.0)))))) * -2.0)) elif l <= -5e-96: tmp = math.sqrt(((2.0 * (n * U)) * ((t - t_2) - (t_3 * (n * (U - U_42_)))))) elif l <= 4.9e+110: tmp = math.sqrt(((U * ((t - ((U - U_42_) * (t_3 * n))) - t_2)) * (n + n))) else: tmp = l * math.sqrt(((n * (U * ((U_42_ * (n / -math.pow(Om, 2.0))) + t_1))) * -2.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(1.0 / Om)) t_2 = Float64(2.0 * Float64(l * Float64(l / Om))) t_3 = Float64(l / Om) ^ 2.0 tmp = 0.0 if (l <= -3.8e+172) tmp = Float64(l * Float64(-sqrt(Float64(Float64(n * Float64(U * Float64(t_1 + Float64(n * Float64(Float64(U - U_42_) / (Om ^ 2.0)))))) * -2.0)))); elseif (l <= -5e-96) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t - t_2) - Float64(t_3 * Float64(n * Float64(U - U_42_)))))); elseif (l <= 4.9e+110) tmp = sqrt(Float64(Float64(U * Float64(Float64(t - Float64(Float64(U - U_42_) * Float64(t_3 * n))) - t_2)) * Float64(n + n))); else tmp = Float64(l * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(U_42_ * Float64(n / Float64(-(Om ^ 2.0)))) + t_1))) * -2.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 * (1.0 / Om); t_2 = 2.0 * (l * (l / Om)); t_3 = (l / Om) ^ 2.0; tmp = 0.0; if (l <= -3.8e+172) tmp = l * -sqrt(((n * (U * (t_1 + (n * ((U - U_42_) / (Om ^ 2.0)))))) * -2.0)); elseif (l <= -5e-96) tmp = sqrt(((2.0 * (n * U)) * ((t - t_2) - (t_3 * (n * (U - U_42_)))))); elseif (l <= 4.9e+110) tmp = sqrt(((U * ((t - ((U - U_42_) * (t_3 * n))) - t_2)) * (n + n))); else tmp = l * sqrt(((n * (U * ((U_42_ * (n / -(Om ^ 2.0))) + t_1))) * -2.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[(1.0 / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[l, -3.8e+172], N[(l * (-N[Sqrt[N[(N[(n * N[(U * N[(t$95$1 + N[(n * N[(N[(U - U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[l, -5e-96], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t - t$95$2), $MachinePrecision] - N[(t$95$3 * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 4.9e+110], N[Sqrt[N[(N[(U * N[(N[(t - N[(N[(U - U$42$), $MachinePrecision] * N[(t$95$3 * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision] * N[(n + n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l * N[Sqrt[N[(N[(n * N[(U * N[(N[(U$42$ * N[(n / (-N[Power[Om, 2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.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 \frac{1}{Om}\\
t_2 := 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
t_3 := {\left(\frac{\ell}{Om}\right)}^{2}\\
\mathbf{if}\;\ell \leq -3.8 \cdot 10^{+172}:\\
\;\;\;\;\ell \cdot \left(-\sqrt{\left(n \cdot \left(U \cdot \left(t_1 + n \cdot \frac{U - U*}{{Om}^{2}}\right)\right)\right) \cdot -2}\right)\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-96}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - t_2\right) - t_3 \cdot \left(n \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 4.9 \cdot 10^{+110}:\\
\;\;\;\;\sqrt{\left(U \cdot \left(\left(t - \left(U - U*\right) \cdot \left(t_3 \cdot n\right)\right) - t_2\right)\right) \cdot \left(n + n\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(U* \cdot \frac{n}{-{Om}^{2}} + t_1\right)\right)\right) \cdot -2}\\
\end{array}
Results
if l < -3.7999999999999997e172Initial program 64.0
Simplified50.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-49 [=>]50.1 | \[ \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 l around inf 64.0
Simplified64.0
[Start]64.0 | \[ \sqrt{-2 \cdot \left(\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
|---|---|
rational.json-simplify-43 [=>]64.0 | \[ \sqrt{\color{blue}{\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(\left(n \cdot \left({\ell}^{2} \cdot U\right)\right) \cdot -2\right)}}
\] |
rational.json-simplify-2 [=>]64.0 | \[ \sqrt{\left(\frac{\color{blue}{\left(U - U*\right) \cdot n}}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(\left(n \cdot \left({\ell}^{2} \cdot U\right)\right) \cdot -2\right)}
\] |
rational.json-simplify-49 [=>]64.0 | \[ \sqrt{\left(\color{blue}{n \cdot \frac{U - U*}{{Om}^{2}}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(\left(n \cdot \left({\ell}^{2} \cdot U\right)\right) \cdot -2\right)}
\] |
rational.json-simplify-2 [=>]64.0 | \[ \sqrt{\left(n \cdot \frac{U - U*}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \color{blue}{\left(-2 \cdot \left(n \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}}
\] |
rational.json-simplify-2 [=>]64.0 | \[ \sqrt{\left(n \cdot \frac{U - U*}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(-2 \cdot \left(n \cdot \color{blue}{\left(U \cdot {\ell}^{2}\right)}\right)\right)}
\] |
Taylor expanded in l around -inf 64.0
Simplified35.2
[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 [=>]32.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)
\] |
if -3.7999999999999997e172 < l < -4.99999999999999995e-96Initial program 32.6
Simplified33.3
[Start]32.6 | \[ \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 [=>]32.6 | \[ \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 [=>]32.6 | \[ \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 [=>]31.2 | \[ \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 [=>]31.2 | \[ \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 [=>]31.2 | \[ \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 [=>]33.3 | \[ \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 -4.99999999999999995e-96 < l < 4.90000000000000002e110Initial program 26.5
Simplified28.7
[Start]26.5 | \[ \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 [=>]26.5 | \[ \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 [=>]26.5 | \[ \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 [=>]26.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 [=>]26.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 [=>]26.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 [=>]28.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)}
\] |
Applied egg-rr29.6
Simplified26.8
[Start]29.6 | \[ \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 [=>]29.6 | \[ \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 [=>]29.5 | \[ \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-43 [=>]27.1 | \[ \sqrt{\left(U \cdot \left(\left(t - \color{blue}{n \cdot \left(\left(U - U*\right) \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)}
\] |
rational.json-simplify-43 [=>]26.8 | \[ \sqrt{\left(U \cdot \left(\left(t - \color{blue}{\left(U - U*\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right)}\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right) \cdot \left(n + n\right)}
\] |
if 4.90000000000000002e110 < l Initial program 57.8
Simplified46.9
[Start]57.8 | \[ \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 [=>]46.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 l around inf 59.3
Simplified59.5
[Start]59.3 | \[ \sqrt{-2 \cdot \left(\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(n \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
|---|---|
rational.json-simplify-43 [=>]59.3 | \[ \sqrt{\color{blue}{\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(\left(n \cdot \left({\ell}^{2} \cdot U\right)\right) \cdot -2\right)}}
\] |
rational.json-simplify-2 [=>]59.3 | \[ \sqrt{\left(\frac{\color{blue}{\left(U - U*\right) \cdot n}}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(\left(n \cdot \left({\ell}^{2} \cdot U\right)\right) \cdot -2\right)}
\] |
rational.json-simplify-49 [=>]59.5 | \[ \sqrt{\left(\color{blue}{n \cdot \frac{U - U*}{{Om}^{2}}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(\left(n \cdot \left({\ell}^{2} \cdot U\right)\right) \cdot -2\right)}
\] |
rational.json-simplify-2 [=>]59.5 | \[ \sqrt{\left(n \cdot \frac{U - U*}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \color{blue}{\left(-2 \cdot \left(n \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}}
\] |
rational.json-simplify-2 [=>]59.5 | \[ \sqrt{\left(n \cdot \frac{U - U*}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(-2 \cdot \left(n \cdot \color{blue}{\left(U \cdot {\ell}^{2}\right)}\right)\right)}
\] |
Taylor expanded in l around 0 64.0
Simplified36.8
[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 [=>]35.1 | \[ \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 [=>]35.7 | \[ \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-1 [=>]35.7 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \color{blue}{\left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)}\right)\right) \cdot -2}
\] |
rational.json-simplify-2 [=>]35.7 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(2 \cdot \frac{1}{Om} + \frac{\color{blue}{\left(U - U*\right) \cdot n}}{{Om}^{2}}\right)\right)\right) \cdot -2}
\] |
rational.json-simplify-49 [=>]36.8 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(2 \cdot \frac{1}{Om} + \color{blue}{n \cdot \frac{U - U*}{{Om}^{2}}}\right)\right)\right) \cdot -2}
\] |
Taylor expanded in U around 0 36.1
Simplified35.7
[Start]36.1 | \[ \ell \cdot \sqrt{\left(n \cdot \left(\left(-1 \cdot \frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot U\right)\right) \cdot -2}
\] |
|---|---|
rational.json-simplify-2 [=>]36.1 | \[ \ell \cdot \sqrt{\left(n \cdot \color{blue}{\left(U \cdot \left(-1 \cdot \frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right)\right)}\right) \cdot -2}
\] |
rational.json-simplify-49 [=>]35.7 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(-1 \cdot \color{blue}{\left(U* \cdot \frac{n}{{Om}^{2}}\right)} + 2 \cdot \frac{1}{Om}\right)\right)\right) \cdot -2}
\] |
rational.json-simplify-43 [=>]35.7 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(\color{blue}{U* \cdot \left(\frac{n}{{Om}^{2}} \cdot -1\right)} + 2 \cdot \frac{1}{Om}\right)\right)\right) \cdot -2}
\] |
rational.json-simplify-8 [<=]35.7 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(U* \cdot \color{blue}{\left(-\frac{n}{{Om}^{2}}\right)} + 2 \cdot \frac{1}{Om}\right)\right)\right) \cdot -2}
\] |
rational.json-simplify-10 [=>]35.7 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(U* \cdot \color{blue}{\frac{\frac{n}{{Om}^{2}}}{-1}} + 2 \cdot \frac{1}{Om}\right)\right)\right) \cdot -2}
\] |
rational.json-simplify-46 [<=]35.7 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(U* \cdot \color{blue}{\frac{n}{{Om}^{2} \cdot -1}} + 2 \cdot \frac{1}{Om}\right)\right)\right) \cdot -2}
\] |
rational.json-simplify-8 [<=]35.7 | \[ \ell \cdot \sqrt{\left(n \cdot \left(U \cdot \left(U* \cdot \frac{n}{\color{blue}{-{Om}^{2}}} + 2 \cdot \frac{1}{Om}\right)\right)\right) \cdot -2}
\] |
Final simplification29.9
| Alternative 1 | |
|---|---|
| Error | 32.0 |
| Cost | 14728 |
| Alternative 2 | |
|---|---|
| Error | 32.7 |
| Cost | 14672 |
| Alternative 3 | |
|---|---|
| Error | 32.3 |
| Cost | 14672 |
| Alternative 4 | |
|---|---|
| Error | 32.8 |
| Cost | 14224 |
| Alternative 5 | |
|---|---|
| Error | 33.5 |
| Cost | 14224 |
| Alternative 6 | |
|---|---|
| Error | 36.8 |
| Cost | 13960 |
| Alternative 7 | |
|---|---|
| Error | 36.8 |
| Cost | 13900 |
| Alternative 8 | |
|---|---|
| Error | 36.6 |
| Cost | 7504 |
| Alternative 9 | |
|---|---|
| Error | 36.4 |
| Cost | 7240 |
| Alternative 10 | |
|---|---|
| Error | 39.5 |
| Cost | 7112 |
| Alternative 11 | |
|---|---|
| Error | 38.3 |
| Cost | 7108 |
| Alternative 12 | |
|---|---|
| Error | 38.2 |
| Cost | 7108 |
| Alternative 13 | |
|---|---|
| Error | 39.9 |
| Cost | 6980 |
| Alternative 14 | |
|---|---|
| Error | 40.3 |
| Cost | 6848 |
herbie shell --seed 2023073
(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*))))))