| Alternative 1 | |
|---|---|
| Error | 27.1 |
| Cost | 30728 |
(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
(sqrt
(*
n
(* U (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.0 Om))))))))
(if (<= l -2.1e+141)
(* t_1 (* (sqrt 2.0) (- l)))
(if (<= l -1.06e-20)
(sqrt (* 2.0 (* U (* n (- t (* (/ l Om) (* l 2.0)))))))
(if (<= l 1.05e-62)
(pow (* (cbrt n) (cbrt (* U (* 2.0 t)))) 1.5)
(if (<= l 2.6e+66)
(sqrt
(*
(* 2.0 n)
(*
U
(+
t
(+
(* (/ (* l (* l U*)) Om) (/ n Om))
(/ -2.0 (/ (/ Om l) l)))))))
(if (<= l 1.06e+183)
(sqrt
(*
(* 2.0 n)
(* (* l (* l U)) (+ (/ -2.0 Om) (* (/ n Om) (/ (- U* U) Om))))))
(* (* l (sqrt 2.0)) t_1))))))))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 = sqrt((n * (U * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om))))));
double tmp;
if (l <= -2.1e+141) {
tmp = t_1 * (sqrt(2.0) * -l);
} else if (l <= -1.06e-20) {
tmp = sqrt((2.0 * (U * (n * (t - ((l / Om) * (l * 2.0)))))));
} else if (l <= 1.05e-62) {
tmp = pow((cbrt(n) * cbrt((U * (2.0 * t)))), 1.5);
} else if (l <= 2.6e+66) {
tmp = sqrt(((2.0 * n) * (U * (t + ((((l * (l * U_42_)) / Om) * (n / Om)) + (-2.0 / ((Om / l) / l)))))));
} else if (l <= 1.06e+183) {
tmp = sqrt(((2.0 * n) * ((l * (l * U)) * ((-2.0 / Om) + ((n / Om) * ((U_42_ - U) / Om))))));
} else {
tmp = (l * sqrt(2.0)) * t_1;
}
return tmp;
}
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 = Math.sqrt((n * (U * (((n * (U_42_ - U)) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om))))));
double tmp;
if (l <= -2.1e+141) {
tmp = t_1 * (Math.sqrt(2.0) * -l);
} else if (l <= -1.06e-20) {
tmp = Math.sqrt((2.0 * (U * (n * (t - ((l / Om) * (l * 2.0)))))));
} else if (l <= 1.05e-62) {
tmp = Math.pow((Math.cbrt(n) * Math.cbrt((U * (2.0 * t)))), 1.5);
} else if (l <= 2.6e+66) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((((l * (l * U_42_)) / Om) * (n / Om)) + (-2.0 / ((Om / l) / l)))))));
} else if (l <= 1.06e+183) {
tmp = Math.sqrt(((2.0 * n) * ((l * (l * U)) * ((-2.0 / Om) + ((n / Om) * ((U_42_ - U) / Om))))));
} else {
tmp = (l * Math.sqrt(2.0)) * t_1;
}
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 = sqrt(Float64(n * Float64(U * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) tmp = 0.0 if (l <= -2.1e+141) tmp = Float64(t_1 * Float64(sqrt(2.0) * Float64(-l))); elseif (l <= -1.06e-20) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(Float64(l / Om) * Float64(l * 2.0))))))); elseif (l <= 1.05e-62) tmp = Float64(cbrt(n) * cbrt(Float64(U * Float64(2.0 * t)))) ^ 1.5; elseif (l <= 2.6e+66) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(Float64(Float64(l * Float64(l * U_42_)) / Om) * Float64(n / Om)) + Float64(-2.0 / Float64(Float64(Om / l) / l))))))); elseif (l <= 1.06e+183) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l * Float64(l * U)) * Float64(Float64(-2.0 / Om) + Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)))))); else tmp = Float64(Float64(l * sqrt(2.0)) * t_1); end return 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[Sqrt[N[(n * N[(U * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -2.1e+141], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * (-l)), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1.06e-20], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(N[(l / Om), $MachinePrecision] * N[(l * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.05e-62], N[Power[N[(N[Power[n, 1/3], $MachinePrecision] * N[Power[N[(U * N[(2.0 * t), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], If[LessEqual[l, 2.6e+66], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(N[(N[(l * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / N[(N[(Om / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.06e+183], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l * N[(l * U), $MachinePrecision]), $MachinePrecision] * N[(N[(-2.0 / Om), $MachinePrecision] + N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * t$95$1), $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 := \sqrt{n \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)}\\
\mathbf{if}\;\ell \leq -2.1 \cdot 10^{+141}:\\
\;\;\;\;t_1 \cdot \left(\sqrt{2} \cdot \left(-\ell\right)\right)\\
\mathbf{elif}\;\ell \leq -1.06 \cdot 10^{-20}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{\ell}{Om} \cdot \left(\ell \cdot 2\right)\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.05 \cdot 10^{-62}:\\
\;\;\;\;{\left(\sqrt[3]{n} \cdot \sqrt[3]{U \cdot \left(2 \cdot t\right)}\right)}^{1.5}\\
\mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+66}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \left(\frac{\ell \cdot \left(\ell \cdot U*\right)}{Om} \cdot \frac{n}{Om} + \frac{-2}{\frac{\frac{Om}{\ell}}{\ell}}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.06 \cdot 10^{+183}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\left(\ell \cdot \left(\ell \cdot U\right)\right) \cdot \left(\frac{-2}{Om} + \frac{n}{Om} \cdot \frac{U* - U}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot t_1\\
\end{array}
Results
if l < -2.0999999999999998e141Initial program 61.7
Simplified46.5
[Start]61.7 | \[ \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)}
\] |
|---|---|
associate-*l* [=>]61.7 | \[ \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)}
\] |
associate-*l* [=>]61.7 | \[ \sqrt{\color{blue}{2 \cdot \left(\left(n \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)\right)}}
\] |
*-commutative [=>]61.7 | \[ \sqrt{2 \cdot \color{blue}{\left(\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) \cdot \left(n \cdot U\right)\right)}}
\] |
Taylor expanded in l around -inf 34.4
if -2.0999999999999998e141 < l < -1.06e-20Initial program 32.4
Taylor expanded in n around 0 34.8
Simplified33.7
[Start]34.8 | \[ \sqrt{2 \cdot \left(n \cdot \left(\left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot U\right)\right)}
\] |
|---|---|
associate-*r* [=>]33.7 | \[ \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot U\right)}}
\] |
*-commutative [=>]33.7 | \[ \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}}
\] |
unpow2 [=>]33.7 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right)\right)\right)}
\] |
associate-*r/ [<=]33.7 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right)\right)\right)}
\] |
cancel-sign-sub-inv [=>]33.7 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{\left(t + \left(-2\right) \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}\right)\right)}
\] |
metadata-eval [=>]33.7 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{-2} \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}
\] |
*-commutative [<=]33.7 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2}\right)\right)\right)}
\] |
*-commutative [=>]33.7 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)} \cdot -2\right)\right)\right)}
\] |
associate-*l* [=>]33.7 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{\ell}{Om} \cdot \left(\ell \cdot -2\right)}\right)\right)\right)}
\] |
if -1.06e-20 < l < 1.05e-62Initial program 26.0
Simplified28.4
[Start]26.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)}
\] |
|---|---|
associate-*l* [=>]26.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)}
\] |
associate-*l* [=>]26.0 | \[ \sqrt{\color{blue}{2 \cdot \left(\left(n \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)\right)}}
\] |
*-commutative [=>]26.0 | \[ \sqrt{2 \cdot \color{blue}{\left(\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) \cdot \left(n \cdot U\right)\right)}}
\] |
Taylor expanded in l around 0 30.6
Applied egg-rr31.0
Applied egg-rr24.0
if 1.05e-62 < l < 2.60000000000000012e66Initial program 29.0
Simplified30.6
[Start]29.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)}
\] |
|---|---|
associate-*l* [=>]29.5 | \[ \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \left(U \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)\right)}}
\] |
associate--l- [=>]29.5 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\left(t - \left(2 \cdot \frac{\ell \cdot \ell}{Om} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\right)}
\] |
sub-neg [=>]29.5 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\left(t + \left(-\left(2 \cdot \frac{\ell \cdot \ell}{Om} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}\right)}
\] |
sub-neg [<=]29.5 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\left(t - \left(2 \cdot \frac{\ell \cdot \ell}{Om} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\right)}
\] |
cancel-sign-sub [<=]29.5 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(2 \cdot \frac{\ell \cdot \ell}{Om} - \left(-n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\right)\right)}
\] |
cancel-sign-sub [=>]29.5 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(2 \cdot \frac{\ell \cdot \ell}{Om} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\right)\right)}
\] |
associate-/l* [=>]29.5 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}
\] |
associate-*l* [=>]30.6 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + \color{blue}{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)\right)\right)}
\] |
Taylor expanded in U around 0 31.8
Simplified28.5
[Start]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(\left(t - \left(-1 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}} + 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot U\right)}
\] |
|---|---|
*-commutative [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(U \cdot \left(t - \left(-1 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}} + 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}}
\] |
+-commutative [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(2 \cdot \frac{{\ell}^{2}}{Om} + -1 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)}\right)\right)}
\] |
mul-1-neg [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{{\ell}^{2}}{Om} + \color{blue}{\left(-\frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)}\right)\right)\right)}
\] |
unsub-neg [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(2 \cdot \frac{{\ell}^{2}}{Om} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)}\right)\right)}
\] |
associate-*r/ [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(\color{blue}{\frac{2 \cdot {\ell}^{2}}{Om}} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)\right)}
\] |
associate-/l* [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(\color{blue}{\frac{2}{\frac{Om}{{\ell}^{2}}}} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)\right)}
\] |
unpow2 [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(\frac{2}{\frac{Om}{\color{blue}{\ell \cdot \ell}}} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)\right)}
\] |
associate-/r* [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(\frac{2}{\color{blue}{\frac{\frac{Om}{\ell}}{\ell}}} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)\right)}
\] |
*-commutative [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(\frac{2}{\frac{\frac{Om}{\ell}}{\ell}} - \frac{\color{blue}{\left({\ell}^{2} \cdot U*\right) \cdot n}}{{Om}^{2}}\right)\right)\right)}
\] |
unpow2 [=>]31.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(\frac{2}{\frac{\frac{Om}{\ell}}{\ell}} - \frac{\left({\ell}^{2} \cdot U*\right) \cdot n}{\color{blue}{Om \cdot Om}}\right)\right)\right)}
\] |
times-frac [=>]28.5 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(\frac{2}{\frac{\frac{Om}{\ell}}{\ell}} - \color{blue}{\frac{{\ell}^{2} \cdot U*}{Om} \cdot \frac{n}{Om}}\right)\right)\right)}
\] |
unpow2 [=>]28.5 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(\frac{2}{\frac{\frac{Om}{\ell}}{\ell}} - \frac{\color{blue}{\left(\ell \cdot \ell\right)} \cdot U*}{Om} \cdot \frac{n}{Om}\right)\right)\right)}
\] |
associate-*l* [=>]28.5 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(\frac{2}{\frac{\frac{Om}{\ell}}{\ell}} - \frac{\color{blue}{\ell \cdot \left(\ell \cdot U*\right)}}{Om} \cdot \frac{n}{Om}\right)\right)\right)}
\] |
if 2.60000000000000012e66 < l < 1.06e183Initial program 38.6
Simplified35.1
[Start]38.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)}
\] |
|---|---|
associate-*l* [=>]39.3 | \[ \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \left(U \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)\right)}}
\] |
associate--l- [=>]39.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\left(t - \left(2 \cdot \frac{\ell \cdot \ell}{Om} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\right)}
\] |
sub-neg [=>]39.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\left(t + \left(-\left(2 \cdot \frac{\ell \cdot \ell}{Om} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}\right)}
\] |
sub-neg [<=]39.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\left(t - \left(2 \cdot \frac{\ell \cdot \ell}{Om} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\right)}
\] |
cancel-sign-sub [<=]39.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(2 \cdot \frac{\ell \cdot \ell}{Om} - \left(-n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\right)\right)}
\] |
cancel-sign-sub [=>]39.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(2 \cdot \frac{\ell \cdot \ell}{Om} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\right)\right)}
\] |
associate-/l* [=>]34.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}} + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}
\] |
associate-*l* [=>]35.1 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + \color{blue}{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)\right)\right)}
\] |
Taylor expanded in l around inf 48.3
Simplified40.6
[Start]48.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(-1 \cdot \left(\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
|---|---|
mul-1-neg [=>]48.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(-\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)}}
\] |
distribute-rgt-neg-in [=>]48.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(\left(\frac{n \cdot \left(U - U*\right)}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(-{\ell}^{2} \cdot U\right)\right)}}
\] |
*-commutative [<=]48.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(\left(\frac{\color{blue}{\left(U - U*\right) \cdot n}}{{Om}^{2}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(-{\ell}^{2} \cdot U\right)\right)}
\] |
unpow2 [=>]48.3 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(\left(\frac{\left(U - U*\right) \cdot n}{\color{blue}{Om \cdot Om}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(-{\ell}^{2} \cdot U\right)\right)}
\] |
times-frac [=>]45.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(\left(\color{blue}{\frac{U - U*}{Om} \cdot \frac{n}{Om}} + 2 \cdot \frac{1}{Om}\right) \cdot \left(-{\ell}^{2} \cdot U\right)\right)}
\] |
associate-*r/ [=>]45.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(\left(\frac{U - U*}{Om} \cdot \frac{n}{Om} + \color{blue}{\frac{2 \cdot 1}{Om}}\right) \cdot \left(-{\ell}^{2} \cdot U\right)\right)}
\] |
metadata-eval [=>]45.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(\left(\frac{U - U*}{Om} \cdot \frac{n}{Om} + \frac{\color{blue}{2}}{Om}\right) \cdot \left(-{\ell}^{2} \cdot U\right)\right)}
\] |
unpow2 [=>]45.8 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(\left(\frac{U - U*}{Om} \cdot \frac{n}{Om} + \frac{2}{Om}\right) \cdot \left(-\color{blue}{\left(\ell \cdot \ell\right)} \cdot U\right)\right)}
\] |
associate-*l* [=>]40.6 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(\left(\frac{U - U*}{Om} \cdot \frac{n}{Om} + \frac{2}{Om}\right) \cdot \left(-\color{blue}{\ell \cdot \left(\ell \cdot U\right)}\right)\right)}
\] |
if 1.06e183 < l Initial program 64.0
Simplified51.4
[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)}
\] |
|---|---|
associate-*l* [=>]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)}
\] |
associate-*l* [=>]64.0 | \[ \sqrt{\color{blue}{2 \cdot \left(\left(n \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)\right)}}
\] |
*-commutative [=>]64.0 | \[ \sqrt{2 \cdot \color{blue}{\left(\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) \cdot \left(n \cdot U\right)\right)}}
\] |
Taylor expanded in l around inf 34.4
Final simplification28.7
| Alternative 1 | |
|---|---|
| Error | 27.1 |
| Cost | 30728 |
| Alternative 2 | |
|---|---|
| Error | 28.8 |
| Cost | 21268 |
| Alternative 3 | |
|---|---|
| Error | 28.8 |
| Cost | 20108 |
| Alternative 4 | |
|---|---|
| Error | 33.2 |
| Cost | 15520 |
| Alternative 5 | |
|---|---|
| Error | 33.3 |
| Cost | 14813 |
| Alternative 6 | |
|---|---|
| Error | 32.8 |
| Cost | 14417 |
| Alternative 7 | |
|---|---|
| Error | 30.6 |
| Cost | 14408 |
| Alternative 8 | |
|---|---|
| Error | 31.5 |
| Cost | 14280 |
| Alternative 9 | |
|---|---|
| Error | 30.5 |
| Cost | 14280 |
| Alternative 10 | |
|---|---|
| Error | 32.2 |
| Cost | 8524 |
| Alternative 11 | |
|---|---|
| Error | 31.9 |
| Cost | 8392 |
| Alternative 12 | |
|---|---|
| Error | 34.4 |
| Cost | 8268 |
| Alternative 13 | |
|---|---|
| Error | 34.4 |
| Cost | 7888 |
| Alternative 14 | |
|---|---|
| Error | 34.8 |
| Cost | 7625 |
| Alternative 15 | |
|---|---|
| Error | 36.7 |
| Cost | 7497 |
| Alternative 16 | |
|---|---|
| Error | 40.6 |
| Cost | 7369 |
| Alternative 17 | |
|---|---|
| Error | 38.8 |
| Cost | 7369 |
| Alternative 18 | |
|---|---|
| Error | 39.3 |
| Cost | 7113 |
| Alternative 19 | |
|---|---|
| Error | 39.3 |
| Cost | 7113 |
| Alternative 20 | |
|---|---|
| Error | 40.5 |
| Cost | 6848 |
herbie shell --seed 2023032
(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*))))))