| Alternative 1 | |
|---|---|
| Error | 41.02% |
| Cost | 64524 |
(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 (pow (/ l Om) 2.0))
(t_2 (* l (/ l Om)))
(t_3 (/ (* l l) Om))
(t_4
(sqrt
(* (* U (* n -2.0)) (+ (* (* n t_1) (- U U*)) (- (* 2.0 t_3) t)))))
(t_5 (/ (- U U*) Om)))
(if (<= t_4 0.0)
(*
(sqrt (* U (- t (fma 2.0 t_3 (* t_1 (* n (- U U*)))))))
(sqrt (* 2.0 n)))
(if (<= t_4 4e+148)
t_4
(if (<= t_4 INFINITY)
(*
(sqrt (* 2.0 (* n U)))
(sqrt (- t (fma 2.0 t_2 (* (* n t_2) t_5)))))
(sqrt
(*
-2.0
(* (* n (* l (* U l))) (+ (/ 2.0 Om) (* t_5 (/ n 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 = pow((l / Om), 2.0);
double t_2 = l * (l / Om);
double t_3 = (l * l) / Om;
double t_4 = sqrt(((U * (n * -2.0)) * (((n * t_1) * (U - U_42_)) + ((2.0 * t_3) - t))));
double t_5 = (U - U_42_) / Om;
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt((U * (t - fma(2.0, t_3, (t_1 * (n * (U - U_42_))))))) * sqrt((2.0 * n));
} else if (t_4 <= 4e+148) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((2.0 * (n * U))) * sqrt((t - fma(2.0, t_2, ((n * t_2) * t_5))));
} else {
tmp = sqrt((-2.0 * ((n * (l * (U * l))) * ((2.0 / Om) + (t_5 * (n / 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(l / Om) ^ 2.0 t_2 = Float64(l * Float64(l / Om)) t_3 = Float64(Float64(l * l) / Om) t_4 = sqrt(Float64(Float64(U * Float64(n * -2.0)) * Float64(Float64(Float64(n * t_1) * Float64(U - U_42_)) + Float64(Float64(2.0 * t_3) - t)))) t_5 = Float64(Float64(U - U_42_) / Om) tmp = 0.0 if (t_4 <= 0.0) tmp = Float64(sqrt(Float64(U * Float64(t - fma(2.0, t_3, Float64(t_1 * Float64(n * Float64(U - U_42_))))))) * sqrt(Float64(2.0 * n))); elseif (t_4 <= 4e+148) tmp = t_4; elseif (t_4 <= Inf) tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(Float64(t - fma(2.0, t_2, Float64(Float64(n * t_2) * t_5))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(n * Float64(l * Float64(U * l))) * Float64(Float64(2.0 / Om) + Float64(t_5 * Float64(n / Om)))))); 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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(U * N[(n * -2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(n * t$95$1), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * t$95$3), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[(N[Sqrt[N[(U * N[(t - N[(2.0 * t$95$3 + N[(t$95$1 * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 4e+148], t$95$4, If[LessEqual[t$95$4, Infinity], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(t - N[(2.0 * t$95$2 + N[(N[(n * t$95$2), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(n * N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] + N[(t$95$5 * N[(n / 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 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \ell \cdot \frac{\ell}{Om}\\
t_3 := \frac{\ell \cdot \ell}{Om}\\
t_4 := \sqrt{\left(U \cdot \left(n \cdot -2\right)\right) \cdot \left(\left(n \cdot t_1\right) \cdot \left(U - U*\right) + \left(2 \cdot t_3 - t\right)\right)}\\
t_5 := \frac{U - U*}{Om}\\
\mathbf{if}\;t_4 \leq 0:\\
\;\;\;\;\sqrt{U \cdot \left(t - \mathsf{fma}\left(2, t_3, t_1 \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t_4 \leq 4 \cdot 10^{+148}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t - \mathsf{fma}\left(2, t_2, \left(n \cdot t_2\right) \cdot t_5\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right) \cdot \left(\frac{2}{Om} + t_5 \cdot \frac{n}{Om}\right)\right)}\\
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 87.41
Simplified62.07
[Start]87.41 | \[ \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* [=>]59.43 | \[ \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- [=>]59.43 | \[ \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 [=>]59.43 | \[ \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 [<=]59.43 | \[ \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 [<=]59.43 | \[ \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 [=>]59.43 | \[ \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* [=>]59.43 | \[ \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* [=>]62.07 | \[ \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)}
\] |
Applied egg-rr62.54
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.0000000000000002e148Initial program 2.72
if 4.0000000000000002e148 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 98.63
Simplified83.07
[Start]98.63 | \[ \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* [=>]96.05 | \[ \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- [=>]96.05 | \[ \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 [=>]96.05 | \[ \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 [<=]96.05 | \[ \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 [<=]96.05 | \[ \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 [=>]96.05 | \[ \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* [=>]84.07 | \[ \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* [=>]83.07 | \[ \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 95.38
Simplified82.67
[Start]95.38 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\frac{{\ell}^{2} \cdot U}{{Om}^{2}} + -1 \cdot \frac{{\ell}^{2} \cdot U*}{{Om}^{2}}\right)\right)\right)\right)}
\] |
|---|---|
mul-1-neg [=>]95.38 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\frac{{\ell}^{2} \cdot U}{{Om}^{2}} + \color{blue}{\left(-\frac{{\ell}^{2} \cdot U*}{{Om}^{2}}\right)}\right)\right)\right)\right)}
\] |
unsub-neg [=>]95.38 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \color{blue}{\left(\frac{{\ell}^{2} \cdot U}{{Om}^{2}} - \frac{{\ell}^{2} \cdot U*}{{Om}^{2}}\right)}\right)\right)\right)}
\] |
unpow2 [=>]95.38 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\frac{{\ell}^{2} \cdot U}{\color{blue}{Om \cdot Om}} - \frac{{\ell}^{2} \cdot U*}{{Om}^{2}}\right)\right)\right)\right)}
\] |
times-frac [=>]95.45 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\color{blue}{\frac{{\ell}^{2}}{Om} \cdot \frac{U}{Om}} - \frac{{\ell}^{2} \cdot U*}{{Om}^{2}}\right)\right)\right)\right)}
\] |
unpow2 [=>]95.45 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot \frac{U}{Om} - \frac{{\ell}^{2} \cdot U*}{{Om}^{2}}\right)\right)\right)\right)}
\] |
associate-/l* [=>]95.47 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\color{blue}{\frac{\ell}{\frac{Om}{\ell}}} \cdot \frac{U}{Om} - \frac{{\ell}^{2} \cdot U*}{{Om}^{2}}\right)\right)\right)\right)}
\] |
associate-/r/ [=>]95.47 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)} \cdot \frac{U}{Om} - \frac{{\ell}^{2} \cdot U*}{{Om}^{2}}\right)\right)\right)\right)}
\] |
unpow2 [=>]95.47 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \frac{U}{Om} - \frac{{\ell}^{2} \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)\right)\right)}
\] |
times-frac [=>]94.7 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \frac{U}{Om} - \color{blue}{\frac{{\ell}^{2}}{Om} \cdot \frac{U*}{Om}}\right)\right)\right)\right)}
\] |
unpow2 [=>]94.7 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \frac{U}{Om} - \frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot \frac{U*}{Om}\right)\right)\right)\right)}
\] |
associate-/l* [=>]82.67 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \frac{U}{Om} - \color{blue}{\frac{\ell}{\frac{Om}{\ell}}} \cdot \frac{U*}{Om}\right)\right)\right)\right)}
\] |
associate-/r/ [=>]82.67 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \frac{U}{Om} - \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)} \cdot \frac{U*}{Om}\right)\right)\right)\right)}
\] |
Applied egg-rr80.33
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 100
Simplified95.81
[Start]100 | \[ \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* [=>]100 | \[ \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* [=>]100 | \[ \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 [=>]100 | \[ \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 93.45
Simplified96.54
[Start]93.45 | \[ \sqrt{2 \cdot \left(n \cdot \left({\ell}^{2} \cdot \left(\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)\right) + n \cdot \left(t \cdot U\right)\right)}
\] |
|---|---|
distribute-lft-out [=>]93.45 | \[ \sqrt{2 \cdot \color{blue}{\left(n \cdot \left({\ell}^{2} \cdot \left(\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right) + t \cdot U\right)\right)}}
\] |
associate-*r* [=>]96.64 | \[ \sqrt{2 \cdot \left(n \cdot \left(\color{blue}{\left({\ell}^{2} \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right) \cdot U} + t \cdot U\right)\right)}
\] |
distribute-rgt-out [=>]96.64 | \[ \sqrt{2 \cdot \left(n \cdot \color{blue}{\left(U \cdot \left({\ell}^{2} \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) + t\right)\right)}\right)}
\] |
+-commutative [<=]96.64 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \color{blue}{\left(t + {\ell}^{2} \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}\right)\right)}
\] |
unpow2 [=>]96.64 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \color{blue}{\left(\ell \cdot \ell\right)} \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)\right)\right)}
\] |
cancel-sign-sub-inv [=>]96.64 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \color{blue}{\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + \left(-2\right) \cdot \frac{1}{Om}\right)}\right)\right)\right)}
\] |
associate-/l* [=>]96.5 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\color{blue}{\frac{n}{\frac{{Om}^{2}}{U* - U}}} + \left(-2\right) \cdot \frac{1}{Om}\right)\right)\right)\right)}
\] |
associate-/r/ [=>]96.54 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\color{blue}{\frac{n}{{Om}^{2}} \cdot \left(U* - U\right)} + \left(-2\right) \cdot \frac{1}{Om}\right)\right)\right)\right)}
\] |
unpow2 [=>]96.54 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{n}{\color{blue}{Om \cdot Om}} \cdot \left(U* - U\right) + \left(-2\right) \cdot \frac{1}{Om}\right)\right)\right)\right)}
\] |
metadata-eval [=>]96.54 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \color{blue}{-2} \cdot \frac{1}{Om}\right)\right)\right)\right)}
\] |
associate-*r/ [=>]96.54 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \color{blue}{\frac{-2 \cdot 1}{Om}}\right)\right)\right)\right)}
\] |
metadata-eval [=>]96.54 | \[ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \frac{\color{blue}{-2}}{Om}\right)\right)\right)\right)}
\] |
Taylor expanded in t around 0 94.12
Simplified67.63
[Start]94.12 | \[ \sqrt{2 \cdot \left(n \cdot \left({\ell}^{2} \cdot \left(\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)\right)\right)}
\] |
|---|---|
*-commutative [<=]94.12 | \[ \sqrt{2 \cdot \left(n \cdot \left({\ell}^{2} \cdot \color{blue}{\left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}\right)\right)}
\] |
associate-*r* [=>]94.15 | \[ \sqrt{2 \cdot \left(n \cdot \color{blue}{\left(\left({\ell}^{2} \cdot U\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}\right)}
\] |
associate-*r* [=>]93.01 | \[ \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot \left({\ell}^{2} \cdot U\right)\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}}
\] |
unpow2 [=>]93.01 | \[ \sqrt{2 \cdot \left(\left(n \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot U\right)\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}
\] |
associate-*l* [=>]75.14 | \[ \sqrt{2 \cdot \left(\left(n \cdot \color{blue}{\left(\ell \cdot \left(\ell \cdot U\right)\right)}\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}
\] |
cancel-sign-sub-inv [=>]75.14 | \[ \sqrt{2 \cdot \left(\left(n \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \color{blue}{\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + \left(-2\right) \cdot \frac{1}{Om}\right)}\right)}
\] |
unpow2 [=>]75.14 | \[ \sqrt{2 \cdot \left(\left(n \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{\color{blue}{Om \cdot Om}} + \left(-2\right) \cdot \frac{1}{Om}\right)\right)}
\] |
times-frac [=>]67.63 | \[ \sqrt{2 \cdot \left(\left(n \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\color{blue}{\frac{n}{Om} \cdot \frac{U* - U}{Om}} + \left(-2\right) \cdot \frac{1}{Om}\right)\right)}
\] |
metadata-eval [=>]67.63 | \[ \sqrt{2 \cdot \left(\left(n \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \color{blue}{-2} \cdot \frac{1}{Om}\right)\right)}
\] |
associate-*r/ [=>]67.63 | \[ \sqrt{2 \cdot \left(\left(n \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \color{blue}{\frac{-2 \cdot 1}{Om}}\right)\right)}
\] |
metadata-eval [=>]67.63 | \[ \sqrt{2 \cdot \left(\left(n \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{\color{blue}{-2}}{Om}\right)\right)}
\] |
Final simplification40.41
| Alternative 1 | |
|---|---|
| Error | 41.02% |
| Cost | 64524 |
| Alternative 2 | |
|---|---|
| Error | 40.42% |
| Cost | 64524 |
| Alternative 3 | |
|---|---|
| Error | 40.89% |
| Cost | 63628 |
| Alternative 4 | |
|---|---|
| Error | 41.47% |
| Cost | 51468 |
| Alternative 5 | |
|---|---|
| Error | 48.3% |
| Cost | 14416 |
| Alternative 6 | |
|---|---|
| Error | 47.9% |
| Cost | 13908 |
| Alternative 7 | |
|---|---|
| Error | 47.73% |
| Cost | 13908 |
| Alternative 8 | |
|---|---|
| Error | 48.37% |
| Cost | 13777 |
| Alternative 9 | |
|---|---|
| Error | 53.72% |
| Cost | 13776 |
| Alternative 10 | |
|---|---|
| Error | 48.36% |
| Cost | 13776 |
| Alternative 11 | |
|---|---|
| Error | 53.97% |
| Cost | 9560 |
| Alternative 12 | |
|---|---|
| Error | 53.81% |
| Cost | 9560 |
| Alternative 13 | |
|---|---|
| Error | 55.2% |
| Cost | 8928 |
| Alternative 14 | |
|---|---|
| Error | 50.9% |
| Cost | 8648 |
| Alternative 15 | |
|---|---|
| Error | 53.5% |
| Cost | 8532 |
| Alternative 16 | |
|---|---|
| Error | 52.67% |
| Cost | 7625 |
| Alternative 17 | |
|---|---|
| Error | 50.31% |
| Cost | 7625 |
| Alternative 18 | |
|---|---|
| Error | 50.35% |
| Cost | 7625 |
| Alternative 19 | |
|---|---|
| Error | 59.25% |
| Cost | 7497 |
| Alternative 20 | |
|---|---|
| Error | 53.3% |
| Cost | 7492 |
| Alternative 21 | |
|---|---|
| Error | 61.62% |
| Cost | 7113 |
| Alternative 22 | |
|---|---|
| Error | 61.37% |
| Cost | 7113 |
| Alternative 23 | |
|---|---|
| Error | 61.8% |
| Cost | 6848 |
herbie shell --seed 2023115
(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*))))))