| Alternative 1 | |
|---|---|
| Error | 25.3 |
| Cost | 44300 |
(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 n) U)
(+
(+ t (* (/ (* l l) Om) -2.0))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 2e-321)
(* (sqrt 2.0) (* (sqrt (* U (fma l (/ (* l -2.0) Om) t))) (sqrt n)))
(if (<= t_1 4e+301)
(sqrt t_1)
(if (<= t_1 INFINITY)
(fabs (/ (* (* l (sqrt (* U U*))) (* n (sqrt 2.0))) Om))
(sqrt (* -4.0 (/ (* n l) (/ Om (* U l))))))))))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 * n) * U) * ((t + (((l * l) / Om) * -2.0)) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 2e-321) {
tmp = sqrt(2.0) * (sqrt((U * fma(l, ((l * -2.0) / Om), t))) * sqrt(n));
} else if (t_1 <= 4e+301) {
tmp = sqrt(t_1);
} else if (t_1 <= ((double) INFINITY)) {
tmp = fabs((((l * sqrt((U * U_42_))) * (n * sqrt(2.0))) / Om));
} else {
tmp = sqrt((-4.0 * ((n * l) / (Om / (U * l)))));
}
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(Float64(2.0 * n) * U) * Float64(Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 2e-321) tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(U * fma(l, Float64(Float64(l * -2.0) / Om), t))) * sqrt(n))); elseif (t_1 <= 4e+301) tmp = sqrt(t_1); elseif (t_1 <= Inf) tmp = abs(Float64(Float64(Float64(l * sqrt(Float64(U * U_42_))) * Float64(n * sqrt(2.0))) / Om)); else tmp = sqrt(Float64(-4.0 * Float64(Float64(n * l) / Float64(Om / Float64(U * l))))); 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[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e-321], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(U * N[(l * N[(N[(l * -2.0), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+301], N[Sqrt[t$95$1], $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[Abs[N[(N[(N[(l * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(N[(n * l), $MachinePrecision] / N[(Om / N[(U * l), $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(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{-321}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{U \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)} \cdot \sqrt{n}\right)\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;\sqrt{t_1}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\left|\frac{\left(\ell \cdot \sqrt{U \cdot U*}\right) \cdot \left(n \cdot \sqrt{2}\right)}{Om}\right|\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{n \cdot \ell}{\frac{Om}{U \cdot \ell}}}\\
\end{array}
if (*.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*)))) < 2.00097e-321Initial program 57.1
Simplified41.7
[Start]57.1 | \[ \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* [=>]41.9 | \[ \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- [=>]41.9 | \[ \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 [=>]41.9 | \[ \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 [<=]41.9 | \[ \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 [<=]41.9 | \[ \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 [=>]41.9 | \[ \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* [=>]40.4 | \[ \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* [=>]41.7 | \[ \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 44.4
Simplified41.8
[Start]44.4 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(\left(t - \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{{Om}^{2}}\right)\right) \cdot U\right)}
\] |
|---|---|
*-commutative [=>]44.4 | \[ \sqrt{2} \cdot \sqrt{n \cdot \color{blue}{\left(U \cdot \left(t - \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{{Om}^{2}}\right)\right)\right)}}
\] |
fma-def [=>]44.4 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(U \cdot \left(t - \color{blue}{\mathsf{fma}\left(2, \frac{{\ell}^{2}}{Om}, \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{{Om}^{2}}\right)}\right)\right)}
\] |
unpow2 [=>]44.4 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\color{blue}{\ell \cdot \ell}}{Om}, \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{{Om}^{2}}\right)\right)\right)}
\] |
*-commutative [=>]44.4 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, \frac{\color{blue}{\left({\ell}^{2} \cdot U\right) \cdot n}}{{Om}^{2}}\right)\right)\right)}
\] |
unpow2 [=>]44.4 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, \frac{\left({\ell}^{2} \cdot U\right) \cdot n}{\color{blue}{Om \cdot Om}}\right)\right)\right)}
\] |
times-frac [=>]41.8 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, \color{blue}{\frac{{\ell}^{2} \cdot U}{Om} \cdot \frac{n}{Om}}\right)\right)\right)}
\] |
unpow2 [=>]41.8 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, \frac{\color{blue}{\left(\ell \cdot \ell\right)} \cdot U}{Om} \cdot \frac{n}{Om}\right)\right)\right)}
\] |
associate-*l* [=>]41.8 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, \frac{\color{blue}{\ell \cdot \left(\ell \cdot U\right)}}{Om} \cdot \frac{n}{Om}\right)\right)\right)}
\] |
Taylor expanded in Om around inf 42.4
Simplified40.8
[Start]42.4 | \[ \sqrt{2} \cdot \sqrt{-2 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om} + n \cdot \left(t \cdot U\right)}
\] |
|---|---|
+-commutative [=>]42.4 | \[ \sqrt{2} \cdot \sqrt{\color{blue}{n \cdot \left(t \cdot U\right) + -2 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}}}
\] |
fma-def [=>]42.4 | \[ \sqrt{2} \cdot \sqrt{\color{blue}{\mathsf{fma}\left(n, t \cdot U, -2 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}\right)}}
\] |
*-commutative [=>]42.4 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, \color{blue}{U \cdot t}, -2 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}\right)}
\] |
*-commutative [=>]42.4 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, U \cdot t, -2 \cdot \frac{\color{blue}{\left({\ell}^{2} \cdot U\right) \cdot n}}{Om}\right)}
\] |
unpow2 [=>]42.4 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, U \cdot t, -2 \cdot \frac{\left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot U\right) \cdot n}{Om}\right)}
\] |
*-commutative [<=]42.4 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, U \cdot t, -2 \cdot \frac{\color{blue}{\left(U \cdot \left(\ell \cdot \ell\right)\right)} \cdot n}{Om}\right)}
\] |
associate-*l/ [<=]42.0 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, U \cdot t, -2 \cdot \color{blue}{\left(\frac{U \cdot \left(\ell \cdot \ell\right)}{Om} \cdot n\right)}\right)}
\] |
associate-*r* [=>]41.3 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, U \cdot t, -2 \cdot \left(\frac{\color{blue}{\left(U \cdot \ell\right) \cdot \ell}}{Om} \cdot n\right)\right)}
\] |
*-commutative [<=]41.3 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, U \cdot t, -2 \cdot \left(\frac{\color{blue}{\left(\ell \cdot U\right)} \cdot \ell}{Om} \cdot n\right)\right)}
\] |
associate-*r/ [<=]41.0 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, U \cdot t, -2 \cdot \left(\color{blue}{\left(\left(\ell \cdot U\right) \cdot \frac{\ell}{Om}\right)} \cdot n\right)\right)}
\] |
associate-*l* [=>]40.8 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, U \cdot t, -2 \cdot \color{blue}{\left(\left(\ell \cdot U\right) \cdot \left(\frac{\ell}{Om} \cdot n\right)\right)}\right)}
\] |
*-commutative [<=]40.8 | \[ \sqrt{2} \cdot \sqrt{\mathsf{fma}\left(n, U \cdot t, -2 \cdot \left(\left(\ell \cdot U\right) \cdot \color{blue}{\left(n \cdot \frac{\ell}{Om}\right)}\right)\right)}
\] |
Taylor expanded in n around 0 42.0
Simplified41.0
[Start]42.0 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(t \cdot U + -2 \cdot \frac{{\ell}^{2} \cdot U}{Om}\right)}
\] |
|---|---|
*-commutative [=>]42.0 | \[ \sqrt{2} \cdot \sqrt{n \cdot \left(\color{blue}{U \cdot t} + -2 \cdot \frac{{\ell}^{2} \cdot U}{Om}\right)}
\] |
fma-def [=>]42.0 | \[ \sqrt{2} \cdot \sqrt{n \cdot \color{blue}{\mathsf{fma}\left(U, t, -2 \cdot \frac{{\ell}^{2} \cdot U}{Om}\right)}}
\] |
unpow2 [=>]42.0 | \[ \sqrt{2} \cdot \sqrt{n \cdot \mathsf{fma}\left(U, t, -2 \cdot \frac{\color{blue}{\left(\ell \cdot \ell\right)} \cdot U}{Om}\right)}
\] |
associate-*r* [<=]41.3 | \[ \sqrt{2} \cdot \sqrt{n \cdot \mathsf{fma}\left(U, t, -2 \cdot \frac{\color{blue}{\ell \cdot \left(\ell \cdot U\right)}}{Om}\right)}
\] |
*-commutative [<=]41.3 | \[ \sqrt{2} \cdot \sqrt{n \cdot \mathsf{fma}\left(U, t, -2 \cdot \frac{\ell \cdot \color{blue}{\left(U \cdot \ell\right)}}{Om}\right)}
\] |
associate-*l/ [<=]41.0 | \[ \sqrt{2} \cdot \sqrt{n \cdot \mathsf{fma}\left(U, t, -2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \left(U \cdot \ell\right)\right)}\right)}
\] |
*-commutative [<=]41.0 | \[ \sqrt{2} \cdot \sqrt{n \cdot \mathsf{fma}\left(U, t, -2 \cdot \color{blue}{\left(\left(U \cdot \ell\right) \cdot \frac{\ell}{Om}\right)}\right)}
\] |
Applied egg-rr42.0
Simplified42.0
[Start]42.0 | \[ \sqrt{2} \cdot \left(\sqrt{\mathsf{fma}\left(U, t, U \cdot \left(\left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)} \cdot \sqrt{n}\right)
\] |
|---|---|
fma-udef [=>]42.0 | \[ \sqrt{2} \cdot \left(\sqrt{\color{blue}{U \cdot t + U \cdot \left(\left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)}} \cdot \sqrt{n}\right)
\] |
distribute-lft-out [=>]42.0 | \[ \sqrt{2} \cdot \left(\sqrt{\color{blue}{U \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)}} \cdot \sqrt{n}\right)
\] |
associate-*r/ [=>]42.9 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \left(t + \color{blue}{\frac{\ell \cdot \ell}{Om}} \cdot -2\right)} \cdot \sqrt{n}\right)
\] |
unpow2 [<=]42.9 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \left(t + \frac{\color{blue}{{\ell}^{2}}}{Om} \cdot -2\right)} \cdot \sqrt{n}\right)
\] |
*-commutative [<=]42.9 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \left(t + \color{blue}{-2 \cdot \frac{{\ell}^{2}}{Om}}\right)} \cdot \sqrt{n}\right)
\] |
+-commutative [=>]42.9 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)}} \cdot \sqrt{n}\right)
\] |
*-commutative [=>]42.9 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \left(\color{blue}{\frac{{\ell}^{2}}{Om} \cdot -2} + t\right)} \cdot \sqrt{n}\right)
\] |
unpow2 [=>]42.9 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \left(\frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot -2 + t\right)} \cdot \sqrt{n}\right)
\] |
associate-*r/ [<=]42.0 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \left(\color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)} \cdot -2 + t\right)} \cdot \sqrt{n}\right)
\] |
associate-*l* [=>]42.0 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \left(\color{blue}{\ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)} + t\right)} \cdot \sqrt{n}\right)
\] |
fma-def [=>]42.0 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \color{blue}{\mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)}} \cdot \sqrt{n}\right)
\] |
associate-*l/ [=>]42.0 | \[ \sqrt{2} \cdot \left(\sqrt{U \cdot \mathsf{fma}\left(\ell, \color{blue}{\frac{\ell \cdot -2}{Om}}, t\right)} \cdot \sqrt{n}\right)
\] |
if 2.00097e-321 < (*.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.00000000000000021e301Initial program 1.7
if 4.00000000000000021e301 < (*.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 63.0
Taylor expanded in U* around inf 62.7
Simplified62.5
[Start]62.7 | \[ \sqrt{2 \cdot \frac{{n}^{2} \cdot \left({\ell}^{2} \cdot \left(U \cdot U*\right)\right)}{{Om}^{2}}}
\] |
|---|---|
associate-*r/ [=>]62.7 | \[ \sqrt{\color{blue}{\frac{2 \cdot \left({n}^{2} \cdot \left({\ell}^{2} \cdot \left(U \cdot U*\right)\right)\right)}{{Om}^{2}}}}
\] |
associate-*r* [=>]62.7 | \[ \sqrt{\frac{\color{blue}{\left(2 \cdot {n}^{2}\right) \cdot \left({\ell}^{2} \cdot \left(U \cdot U*\right)\right)}}{{Om}^{2}}}
\] |
unpow2 [=>]62.7 | \[ \sqrt{\frac{\left(2 \cdot \color{blue}{\left(n \cdot n\right)}\right) \cdot \left({\ell}^{2} \cdot \left(U \cdot U*\right)\right)}{{Om}^{2}}}
\] |
unpow2 [=>]62.7 | \[ \sqrt{\frac{\left(2 \cdot \left(n \cdot n\right)\right) \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot \left(U \cdot U*\right)\right)}{{Om}^{2}}}
\] |
associate-*l* [=>]62.5 | \[ \sqrt{\frac{\left(2 \cdot \left(n \cdot n\right)\right) \cdot \color{blue}{\left(\ell \cdot \left(\ell \cdot \left(U \cdot U*\right)\right)\right)}}{{Om}^{2}}}
\] |
unpow2 [=>]62.5 | \[ \sqrt{\frac{\left(2 \cdot \left(n \cdot n\right)\right) \cdot \left(\ell \cdot \left(\ell \cdot \left(U \cdot U*\right)\right)\right)}{\color{blue}{Om \cdot Om}}}
\] |
Applied egg-rr48.3
if +inf.0 < (*.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 64.0
Simplified59.6
[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 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)}}
\] |
cancel-sign-sub-inv [=>]64.0 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\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{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\left(\left(-n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right) + \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}\right)}
\] |
distribute-lft-neg-in [<=]64.0 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\color{blue}{\left(-\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} + \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)}
\] |
associate-*l* [=>]64.0 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(-\color{blue}{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right) + \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)}
\] |
distribute-rgt-neg-in [=>]64.0 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\color{blue}{n \cdot \left(-{\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)} + \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)}
\] |
fma-def [=>]64.0 | \[ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\mathsf{fma}\left(n, -{\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right), t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)}\right)}
\] |
Taylor expanded in l around inf 61.0
Simplified47.6
[Start]61.0 | \[ \sqrt{2 \cdot \left(n \cdot \left({\ell}^{2} \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)\right)\right)}
\] |
|---|---|
associate-*r* [=>]61.0 | \[ \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \left({\ell}^{2} \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)\right)}}
\] |
associate-*r* [=>]61.0 | \[ \sqrt{\left(2 \cdot n\right) \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)}}
\] |
associate-*r* [=>]60.4 | \[ \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \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)}}
\] |
unpow2 [=>]60.4 | \[ \sqrt{\left(\left(2 \cdot n\right) \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)}
\] |
associate-*l* [=>]47.6 | \[ \sqrt{\left(\left(2 \cdot n\right) \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)}
\] |
cancel-sign-sub-inv [=>]47.6 | \[ \sqrt{\left(\left(2 \cdot n\right) \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)}}
\] |
associate-/l* [=>]49.0 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\color{blue}{\frac{n}{\frac{{Om}^{2}}{U* - U}}} + \left(-2\right) \cdot \frac{1}{Om}\right)}
\] |
associate-/r/ [=>]47.6 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\color{blue}{\frac{n}{{Om}^{2}} \cdot \left(U* - U\right)} + \left(-2\right) \cdot \frac{1}{Om}\right)}
\] |
unpow2 [=>]47.6 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\frac{n}{\color{blue}{Om \cdot Om}} \cdot \left(U* - U\right) + \left(-2\right) \cdot \frac{1}{Om}\right)}
\] |
metadata-eval [=>]47.6 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \color{blue}{-2} \cdot \frac{1}{Om}\right)}
\] |
associate-*r/ [=>]47.6 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \color{blue}{\frac{-2 \cdot 1}{Om}}\right)}
\] |
metadata-eval [=>]47.6 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right) \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \frac{\color{blue}{-2}}{Om}\right)}
\] |
Taylor expanded in n around 0 60.0
Simplified48.9
[Start]60.0 | \[ \sqrt{-4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}}
\] |
|---|---|
associate-/l* [=>]59.2 | \[ \sqrt{-4 \cdot \color{blue}{\frac{n}{\frac{Om}{{\ell}^{2} \cdot U}}}}
\] |
unpow2 [=>]59.2 | \[ \sqrt{-4 \cdot \frac{n}{\frac{Om}{\color{blue}{\left(\ell \cdot \ell\right)} \cdot U}}}
\] |
associate-*r* [<=]49.0 | \[ \sqrt{-4 \cdot \frac{n}{\frac{Om}{\color{blue}{\ell \cdot \left(\ell \cdot U\right)}}}}
\] |
associate-/r/ [=>]48.9 | \[ \sqrt{-4 \cdot \color{blue}{\left(\frac{n}{Om} \cdot \left(\ell \cdot \left(\ell \cdot U\right)\right)\right)}}
\] |
Applied egg-rr39.2
Final simplification25.5
| Alternative 1 | |
|---|---|
| Error | 25.3 |
| Cost | 44300 |
| Alternative 2 | |
|---|---|
| Error | 25.5 |
| Cost | 44300 |
| Alternative 3 | |
|---|---|
| Error | 26.9 |
| Cost | 30728 |
| Alternative 4 | |
|---|---|
| Error | 30.5 |
| Cost | 14672 |
| Alternative 5 | |
|---|---|
| Error | 30.2 |
| Cost | 14672 |
| Alternative 6 | |
|---|---|
| Error | 31.1 |
| Cost | 14212 |
| Alternative 7 | |
|---|---|
| Error | 32.1 |
| Cost | 14152 |
| Alternative 8 | |
|---|---|
| Error | 31.9 |
| Cost | 13644 |
| Alternative 9 | |
|---|---|
| Error | 31.9 |
| Cost | 8784 |
| Alternative 10 | |
|---|---|
| Error | 32.8 |
| Cost | 8264 |
| Alternative 11 | |
|---|---|
| Error | 33.2 |
| Cost | 7625 |
| Alternative 12 | |
|---|---|
| Error | 33.7 |
| Cost | 7624 |
| Alternative 13 | |
|---|---|
| Error | 34.8 |
| Cost | 7492 |
| Alternative 14 | |
|---|---|
| Error | 37.1 |
| Cost | 7369 |
| Alternative 15 | |
|---|---|
| Error | 36.8 |
| Cost | 7369 |
| Alternative 16 | |
|---|---|
| Error | 36.1 |
| Cost | 7369 |
| Alternative 17 | |
|---|---|
| Error | 35.4 |
| Cost | 7369 |
| Alternative 18 | |
|---|---|
| Error | 39.3 |
| Cost | 7236 |
| Alternative 19 | |
|---|---|
| Error | 40.1 |
| Cost | 6848 |
herbie shell --seed 2023012
(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*))))))