| Alternative 1 | |
|---|---|
| Error | 28.8 |
| Cost | 14412 |
(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 (* (/ n Om) (/ U* Om))))
(if (<= l -4.8e+162)
(* (sqrt 2.0) (* l (- (sqrt (* (* n U) (+ t_1 (/ -2.0 Om)))))))
(if (<= l 1.66e-46)
(sqrt
(*
(* 2.0 (* n U))
(+ t (+ (* (/ n (/ Om l)) (* U* (/ l Om))) (* -2.0 (/ l (/ Om l)))))))
(if (<= l 3.1e+199)
(sqrt (* 2.0 (* n (- (* U t) (* (* l (* l U)) (- (/ 2.0 Om) t_1))))))
(*
(* l (sqrt 2.0))
(sqrt (* n (* U (+ (/ n (/ (* Om Om) U*)) (/ -2.0 Om)))))))))))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 = (n / Om) * (U_42_ / Om);
double tmp;
if (l <= -4.8e+162) {
tmp = sqrt(2.0) * (l * -sqrt(((n * U) * (t_1 + (-2.0 / Om)))));
} else if (l <= 1.66e-46) {
tmp = sqrt(((2.0 * (n * U)) * (t + (((n / (Om / l)) * (U_42_ * (l / Om))) + (-2.0 * (l / (Om / l)))))));
} else if (l <= 3.1e+199) {
tmp = sqrt((2.0 * (n * ((U * t) - ((l * (l * U)) * ((2.0 / Om) - t_1))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((n / ((Om * Om) / U_42_)) + (-2.0 / Om)))));
}
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) :: tmp
t_1 = (n / om) * (u_42 / om)
if (l <= (-4.8d+162)) then
tmp = sqrt(2.0d0) * (l * -sqrt(((n * u) * (t_1 + ((-2.0d0) / om)))))
else if (l <= 1.66d-46) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (((n / (om / l)) * (u_42 * (l / om))) + ((-2.0d0) * (l / (om / l)))))))
else if (l <= 3.1d+199) then
tmp = sqrt((2.0d0 * (n * ((u * t) - ((l * (l * u)) * ((2.0d0 / om) - t_1))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt((n * (u * ((n / ((om * om) / u_42)) + ((-2.0d0) / om)))))
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 = (n / Om) * (U_42_ / Om);
double tmp;
if (l <= -4.8e+162) {
tmp = Math.sqrt(2.0) * (l * -Math.sqrt(((n * U) * (t_1 + (-2.0 / Om)))));
} else if (l <= 1.66e-46) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (((n / (Om / l)) * (U_42_ * (l / Om))) + (-2.0 * (l / (Om / l)))))));
} else if (l <= 3.1e+199) {
tmp = Math.sqrt((2.0 * (n * ((U * t) - ((l * (l * U)) * ((2.0 / Om) - t_1))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((n * (U * ((n / ((Om * Om) / U_42_)) + (-2.0 / Om)))));
}
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 = (n / Om) * (U_42_ / Om) tmp = 0 if l <= -4.8e+162: tmp = math.sqrt(2.0) * (l * -math.sqrt(((n * U) * (t_1 + (-2.0 / Om))))) elif l <= 1.66e-46: tmp = math.sqrt(((2.0 * (n * U)) * (t + (((n / (Om / l)) * (U_42_ * (l / Om))) + (-2.0 * (l / (Om / l))))))) elif l <= 3.1e+199: tmp = math.sqrt((2.0 * (n * ((U * t) - ((l * (l * U)) * ((2.0 / Om) - t_1)))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((n * (U * ((n / ((Om * Om) / U_42_)) + (-2.0 / Om))))) 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(Float64(n / Om) * Float64(U_42_ / Om)) tmp = 0.0 if (l <= -4.8e+162) tmp = Float64(sqrt(2.0) * Float64(l * Float64(-sqrt(Float64(Float64(n * U) * Float64(t_1 + Float64(-2.0 / Om))))))); elseif (l <= 1.66e-46) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(Float64(n / Float64(Om / l)) * Float64(U_42_ * Float64(l / Om))) + Float64(-2.0 * Float64(l / Float64(Om / l))))))); elseif (l <= 3.1e+199) tmp = sqrt(Float64(2.0 * Float64(n * Float64(Float64(U * t) - Float64(Float64(l * Float64(l * U)) * Float64(Float64(2.0 / Om) - t_1)))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n * Float64(U * Float64(Float64(n / Float64(Float64(Om * Om) / U_42_)) + Float64(-2.0 / Om)))))); 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 = (n / Om) * (U_42_ / Om); tmp = 0.0; if (l <= -4.8e+162) tmp = sqrt(2.0) * (l * -sqrt(((n * U) * (t_1 + (-2.0 / Om))))); elseif (l <= 1.66e-46) tmp = sqrt(((2.0 * (n * U)) * (t + (((n / (Om / l)) * (U_42_ * (l / Om))) + (-2.0 * (l / (Om / l))))))); elseif (l <= 3.1e+199) tmp = sqrt((2.0 * (n * ((U * t) - ((l * (l * U)) * ((2.0 / Om) - t_1)))))); else tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((n / ((Om * Om) / U_42_)) + (-2.0 / Om))))); 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[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -4.8e+162], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * (-N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(t$95$1 + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.66e-46], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(N[(n / N[(Om / l), $MachinePrecision]), $MachinePrecision] * N[(U$42$ * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.1e+199], N[Sqrt[N[(2.0 * N[(n * N[(N[(U * t), $MachinePrecision] - N[(N[(l * N[(l * U), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n * N[(U * N[(N[(n / N[(N[(Om * Om), $MachinePrecision] / U$42$), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := \frac{n}{Om} \cdot \frac{U*}{Om}\\
\mathbf{if}\;\ell \leq -4.8 \cdot 10^{+162}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \left(-\sqrt{\left(n \cdot U\right) \cdot \left(t_1 + \frac{-2}{Om}\right)}\right)\right)\\
\mathbf{elif}\;\ell \leq 1.66 \cdot 10^{-46}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\frac{n}{\frac{Om}{\ell}} \cdot \left(U* \cdot \frac{\ell}{Om}\right) + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)}\\
\mathbf{elif}\;\ell \leq 3.1 \cdot 10^{+199}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t - \left(\ell \cdot \left(\ell \cdot U\right)\right) \cdot \left(\frac{2}{Om} - t_1\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{\frac{Om \cdot Om}{U*}} + \frac{-2}{Om}\right)\right)}\\
\end{array}
Results
if l < -4.80000000000000018e162Initial program 64.0
Taylor expanded in U around 0 64.0
Simplified50.2
[Start]64.0 | \[ \sqrt{2 \cdot \left(n \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)\right)}
\] |
|---|---|
associate-*r* [=>]64.0 | \[ \sqrt{\color{blue}{\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 [=>]64.0 | \[ \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)}}
\] |
associate-*r* [=>]64.0 | \[ \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right) \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)}}
\] |
associate-*r* [<=]64.0 | \[ \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \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)}
\] |
+-commutative [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
mul-1-neg [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
unsub-neg [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
unpow2 [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)}
\] |
associate-/l* [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)}
\] |
associate-/l* [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \color{blue}{\frac{n}{\frac{{Om}^{2}}{{\ell}^{2} \cdot U*}}}\right)\right)}
\] |
associate-/r* [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \frac{n}{\color{blue}{\frac{\frac{{Om}^{2}}{{\ell}^{2}}}{U*}}}\right)\right)}
\] |
Taylor expanded in l around -inf 32.9
Simplified28.6
[Start]32.9 | \[ -1 \cdot \left(\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(\left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)}\right)
\] |
|---|---|
mul-1-neg [=>]32.9 | \[ \color{blue}{-\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(\left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)}}
\] |
associate-*l* [=>]32.9 | \[ -\color{blue}{\sqrt{2} \cdot \left(\ell \cdot \sqrt{n \cdot \left(\left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)}\right)}
\] |
distribute-rgt-neg-in [=>]32.9 | \[ \color{blue}{\sqrt{2} \cdot \left(-\ell \cdot \sqrt{n \cdot \left(\left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)}\right)}
\] |
*-commutative [=>]32.9 | \[ \sqrt{2} \cdot \left(-\ell \cdot \sqrt{n \cdot \color{blue}{\left(U \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}}\right)
\] |
associate-*r* [=>]32.8 | \[ \sqrt{2} \cdot \left(-\ell \cdot \sqrt{\color{blue}{\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)}}\right)
\] |
cancel-sign-sub-inv [=>]32.8 | \[ \sqrt{2} \cdot \left(-\ell \cdot \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(\frac{n \cdot U*}{{Om}^{2}} + \left(-2\right) \cdot \frac{1}{Om}\right)}}\right)
\] |
unpow2 [=>]32.8 | \[ \sqrt{2} \cdot \left(-\ell \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{\color{blue}{Om \cdot Om}} + \left(-2\right) \cdot \frac{1}{Om}\right)}\right)
\] |
times-frac [=>]28.6 | \[ \sqrt{2} \cdot \left(-\ell \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{n}{Om} \cdot \frac{U*}{Om}} + \left(-2\right) \cdot \frac{1}{Om}\right)}\right)
\] |
metadata-eval [=>]28.6 | \[ \sqrt{2} \cdot \left(-\ell \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \color{blue}{-2} \cdot \frac{1}{Om}\right)}\right)
\] |
associate-*r/ [=>]28.6 | \[ \sqrt{2} \cdot \left(-\ell \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \color{blue}{\frac{-2 \cdot 1}{Om}}\right)}\right)
\] |
metadata-eval [=>]28.6 | \[ \sqrt{2} \cdot \left(-\ell \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \frac{\color{blue}{-2}}{Om}\right)}\right)
\] |
if -4.80000000000000018e162 < l < 1.6599999999999999e-46Initial program 27.7
Taylor expanded in U around 0 33.4
Simplified28.0
[Start]33.4 | \[ \sqrt{2 \cdot \left(n \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)\right)}
\] |
|---|---|
associate-*r* [=>]33.4 | \[ \sqrt{\color{blue}{\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 [=>]33.4 | \[ \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)}}
\] |
associate-*r* [=>]33.2 | \[ \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right) \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)}}
\] |
associate-*r* [<=]33.2 | \[ \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \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)}
\] |
+-commutative [=>]33.2 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
mul-1-neg [=>]33.2 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
unsub-neg [=>]33.2 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
unpow2 [=>]33.2 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)}
\] |
associate-/l* [=>]33.2 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)}
\] |
associate-/l* [=>]33.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \color{blue}{\frac{n}{\frac{{Om}^{2}}{{\ell}^{2} \cdot U*}}}\right)\right)}
\] |
associate-/r* [=>]32.3 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \frac{n}{\color{blue}{\frac{\frac{{Om}^{2}}{{\ell}^{2}}}{U*}}}\right)\right)}
\] |
Applied egg-rr26.6
if 1.6599999999999999e-46 < l < 3.09999999999999986e199Initial program 38.6
Taylor expanded in U around 0 41.7
Simplified34.7
[Start]41.7 | \[ \sqrt{2 \cdot \left(n \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)\right)}
\] |
|---|---|
associate-*r* [=>]41.7 | \[ \sqrt{\color{blue}{\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 [=>]41.7 | \[ \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)}}
\] |
associate-*r* [=>]42.1 | \[ \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right) \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)}}
\] |
associate-*r* [<=]42.1 | \[ \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \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)}
\] |
+-commutative [=>]42.1 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
mul-1-neg [=>]42.1 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
unsub-neg [=>]42.1 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
unpow2 [=>]42.1 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)}
\] |
associate-/l* [=>]42.1 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)}
\] |
associate-/l* [=>]41.6 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \color{blue}{\frac{n}{\frac{{Om}^{2}}{{\ell}^{2} \cdot U*}}}\right)\right)}
\] |
associate-/r* [=>]39.3 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \frac{n}{\color{blue}{\frac{\frac{{Om}^{2}}{{\ell}^{2}}}{U*}}}\right)\right)}
\] |
Taylor expanded in l around 0 38.6
Simplified31.4
[Start]38.6 | \[ \sqrt{2 \cdot \left(n \cdot \left(t \cdot U\right)\right) + 2 \cdot \left(n \cdot \left(\left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
|---|---|
distribute-lft-out [=>]38.6 | \[ \sqrt{\color{blue}{2 \cdot \left(n \cdot \left(t \cdot U\right) + n \cdot \left(\left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}}
\] |
distribute-lft-out [=>]38.6 | \[ \sqrt{2 \cdot \color{blue}{\left(n \cdot \left(t \cdot U + \left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}}
\] |
*-commutative [=>]38.6 | \[ \sqrt{2 \cdot \left(n \cdot \left(\color{blue}{U \cdot t} + \left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
cancel-sign-sub-inv [=>]38.6 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t + \color{blue}{\left(\frac{n \cdot U*}{{Om}^{2}} + \left(-2\right) \cdot \frac{1}{Om}\right)} \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
unpow2 [=>]38.6 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t + \left(\frac{n \cdot U*}{\color{blue}{Om \cdot Om}} + \left(-2\right) \cdot \frac{1}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
times-frac [=>]35.7 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t + \left(\color{blue}{\frac{n}{Om} \cdot \frac{U*}{Om}} + \left(-2\right) \cdot \frac{1}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
metadata-eval [=>]35.7 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t + \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \color{blue}{-2} \cdot \frac{1}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
associate-*r/ [=>]35.7 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t + \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \color{blue}{\frac{-2 \cdot 1}{Om}}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
metadata-eval [=>]35.7 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t + \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \frac{\color{blue}{-2}}{Om}\right) \cdot \left({\ell}^{2} \cdot U\right)\right)\right)}
\] |
unpow2 [=>]35.7 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t + \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \frac{-2}{Om}\right) \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot U\right)\right)\right)}
\] |
associate-*l* [=>]31.4 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t + \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \frac{-2}{Om}\right) \cdot \color{blue}{\left(\ell \cdot \left(\ell \cdot U\right)\right)}\right)\right)}
\] |
if 3.09999999999999986e199 < l Initial program 64.0
Taylor expanded in U around 0 64.0
Simplified55.6
[Start]64.0 | \[ \sqrt{2 \cdot \left(n \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)\right)}
\] |
|---|---|
associate-*r* [=>]64.0 | \[ \sqrt{\color{blue}{\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 [=>]64.0 | \[ \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)}}
\] |
associate-*r* [=>]64.0 | \[ \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right) \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)}}
\] |
associate-*r* [<=]64.0 | \[ \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \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)}
\] |
+-commutative [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
mul-1-neg [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
unsub-neg [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)}
\] |
unpow2 [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)}
\] |
associate-/l* [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}} - \frac{n \cdot \left({\ell}^{2} \cdot U*\right)}{{Om}^{2}}\right)\right)}
\] |
associate-/l* [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \color{blue}{\frac{n}{\frac{{Om}^{2}}{{\ell}^{2} \cdot U*}}}\right)\right)}
\] |
associate-/r* [=>]64.0 | \[ \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - \frac{n}{\color{blue}{\frac{\frac{{Om}^{2}}{{\ell}^{2}}}{U*}}}\right)\right)}
\] |
Taylor expanded in l around inf 32.7
Simplified33.9
[Start]32.7 | \[ \left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(\left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)}
\] |
|---|---|
*-commutative [=>]32.7 | \[ \left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \color{blue}{\left(U \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}}
\] |
associate-/l* [=>]33.9 | \[ \left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\color{blue}{\frac{n}{\frac{{Om}^{2}}{U*}}} - 2 \cdot \frac{1}{Om}\right)\right)}
\] |
unpow2 [=>]33.9 | \[ \left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{\frac{\color{blue}{Om \cdot Om}}{U*}} - 2 \cdot \frac{1}{Om}\right)\right)}
\] |
associate-*r/ [=>]33.9 | \[ \left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{\frac{Om \cdot Om}{U*}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)}
\] |
metadata-eval [=>]33.9 | \[ \left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{\frac{Om \cdot Om}{U*}} - \frac{\color{blue}{2}}{Om}\right)\right)}
\] |
Final simplification28.1
| Alternative 1 | |
|---|---|
| Error | 28.8 |
| Cost | 14412 |
| Alternative 2 | |
|---|---|
| Error | 29.2 |
| Cost | 14412 |
| Alternative 3 | |
|---|---|
| Error | 30.7 |
| Cost | 13908 |
| Alternative 4 | |
|---|---|
| Error | 30.7 |
| Cost | 13908 |
| Alternative 5 | |
|---|---|
| Error | 29.5 |
| Cost | 13900 |
| Alternative 6 | |
|---|---|
| Error | 31.4 |
| Cost | 8656 |
| Alternative 7 | |
|---|---|
| Error | 33.1 |
| Cost | 8528 |
| Alternative 8 | |
|---|---|
| Error | 35.4 |
| Cost | 8272 |
| Alternative 9 | |
|---|---|
| Error | 34.3 |
| Cost | 8272 |
| Alternative 10 | |
|---|---|
| Error | 34.2 |
| Cost | 8272 |
| Alternative 11 | |
|---|---|
| Error | 35.1 |
| Cost | 8144 |
| Alternative 12 | |
|---|---|
| Error | 35.1 |
| Cost | 8144 |
| Alternative 13 | |
|---|---|
| Error | 33.7 |
| Cost | 7625 |
| Alternative 14 | |
|---|---|
| Error | 34.2 |
| Cost | 7624 |
| Alternative 15 | |
|---|---|
| Error | 36.7 |
| Cost | 7497 |
| Alternative 16 | |
|---|---|
| Error | 40.0 |
| Cost | 6848 |
herbie shell --seed 2023053
(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*))))))