| Alternative 1 | |
|---|---|
| Error | 25.4 |
| Cost | 57612 |
(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 (cbrt (/ Om l)))
(t_2 (/ (* l l) Om))
(t_3 (* n (* U t)))
(t_4 (pow (/ l Om) 2.0))
(t_5 (* n (* (- U U*) t_4)))
(t_6 (+ (* (/ n (* Om Om)) (- U* U)) (/ -2.0 Om))))
(if (<= l -1.75e+83)
(* (sqrt (* t_6 (* n U))) (* l (- (sqrt 2.0))))
(if (<= l -7.4e-146)
(sqrt (* -2.0 (* U (* n (- (fma 2.0 t_2 t_5) t)))))
(if (<= l 6.4e-105)
(sqrt
(* (* U (* n 2.0)) (+ (- t (* 2.0 t_2)) (* (- U* U) (* n t_4)))))
(if (<= l 5.9e-55)
(* (sqrt (* n 2.0)) (sqrt (* U (- t (fma 2.0 (/ l (/ Om l)) t_5)))))
(if (<= l 7.5e+217)
(sqrt
(fma 2.0 t_3 (/ (/ (* (* l n) (* U -4.0)) (pow t_1 2.0)) t_1)))
(if (<= l 4.1e+260)
(* (sqrt 2.0) (* l (sqrt (* U (* n t_6)))))
(pow
(pow (fma 2.0 t_3 (* (* U -4.0) (/ (* l n) (/ Om l)))) 0.25)
2.0)))))))))double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = cbrt((Om / l));
double t_2 = (l * l) / Om;
double t_3 = n * (U * t);
double t_4 = pow((l / Om), 2.0);
double t_5 = n * ((U - U_42_) * t_4);
double t_6 = ((n / (Om * Om)) * (U_42_ - U)) + (-2.0 / Om);
double tmp;
if (l <= -1.75e+83) {
tmp = sqrt((t_6 * (n * U))) * (l * -sqrt(2.0));
} else if (l <= -7.4e-146) {
tmp = sqrt((-2.0 * (U * (n * (fma(2.0, t_2, t_5) - t)))));
} else if (l <= 6.4e-105) {
tmp = sqrt(((U * (n * 2.0)) * ((t - (2.0 * t_2)) + ((U_42_ - U) * (n * t_4)))));
} else if (l <= 5.9e-55) {
tmp = sqrt((n * 2.0)) * sqrt((U * (t - fma(2.0, (l / (Om / l)), t_5))));
} else if (l <= 7.5e+217) {
tmp = sqrt(fma(2.0, t_3, ((((l * n) * (U * -4.0)) / pow(t_1, 2.0)) / t_1)));
} else if (l <= 4.1e+260) {
tmp = sqrt(2.0) * (l * sqrt((U * (n * t_6))));
} else {
tmp = pow(pow(fma(2.0, t_3, ((U * -4.0) * ((l * n) / (Om / l)))), 0.25), 2.0);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function code(n, U, t, l, Om, U_42_) t_1 = cbrt(Float64(Om / l)) t_2 = Float64(Float64(l * l) / Om) t_3 = Float64(n * Float64(U * t)) t_4 = Float64(l / Om) ^ 2.0 t_5 = Float64(n * Float64(Float64(U - U_42_) * t_4)) t_6 = Float64(Float64(Float64(n / Float64(Om * Om)) * Float64(U_42_ - U)) + Float64(-2.0 / Om)) tmp = 0.0 if (l <= -1.75e+83) tmp = Float64(sqrt(Float64(t_6 * Float64(n * U))) * Float64(l * Float64(-sqrt(2.0)))); elseif (l <= -7.4e-146) tmp = sqrt(Float64(-2.0 * Float64(U * Float64(n * Float64(fma(2.0, t_2, t_5) - t))))); elseif (l <= 6.4e-105) tmp = sqrt(Float64(Float64(U * Float64(n * 2.0)) * Float64(Float64(t - Float64(2.0 * t_2)) + Float64(Float64(U_42_ - U) * Float64(n * t_4))))); elseif (l <= 5.9e-55) tmp = Float64(sqrt(Float64(n * 2.0)) * sqrt(Float64(U * Float64(t - fma(2.0, Float64(l / Float64(Om / l)), t_5))))); elseif (l <= 7.5e+217) tmp = sqrt(fma(2.0, t_3, Float64(Float64(Float64(Float64(l * n) * Float64(U * -4.0)) / (t_1 ^ 2.0)) / t_1))); elseif (l <= 4.1e+260) tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(U * Float64(n * t_6))))); else tmp = (fma(2.0, t_3, Float64(Float64(U * -4.0) * Float64(Float64(l * n) / Float64(Om / l)))) ^ 0.25) ^ 2.0; 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[(Om / l), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$3 = N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$5 = N[(n * N[(N[(U - U$42$), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(n / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.75e+83], N[(N[Sqrt[N[(t$95$6 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -7.4e-146], N[Sqrt[N[(-2.0 * N[(U * N[(n * N[(N[(2.0 * t$95$2 + t$95$5), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 6.4e-105], N[Sqrt[N[(N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(t - N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(U$42$ - U), $MachinePrecision] * N[(n * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 5.9e-55], N[(N[Sqrt[N[(n * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 7.5e+217], N[Sqrt[N[(2.0 * t$95$3 + N[(N[(N[(N[(l * n), $MachinePrecision] * N[(U * -4.0), $MachinePrecision]), $MachinePrecision] / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 4.1e+260], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(U * N[(n * t$95$6), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(2.0 * t$95$3 + N[(N[(U * -4.0), $MachinePrecision] * N[(N[(l * n), $MachinePrecision] / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], 2.0], $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[3]{\frac{Om}{\ell}}\\
t_2 := \frac{\ell \cdot \ell}{Om}\\
t_3 := n \cdot \left(U \cdot t\right)\\
t_4 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_5 := n \cdot \left(\left(U - U*\right) \cdot t_4\right)\\
t_6 := \frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \frac{-2}{Om}\\
\mathbf{if}\;\ell \leq -1.75 \cdot 10^{+83}:\\
\;\;\;\;\sqrt{t_6 \cdot \left(n \cdot U\right)} \cdot \left(\ell \cdot \left(-\sqrt{2}\right)\right)\\
\mathbf{elif}\;\ell \leq -7.4 \cdot 10^{-146}:\\
\;\;\;\;\sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(\mathsf{fma}\left(2, t_2, t_5\right) - t\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 6.4 \cdot 10^{-105}:\\
\;\;\;\;\sqrt{\left(U \cdot \left(n \cdot 2\right)\right) \cdot \left(\left(t - 2 \cdot t_2\right) + \left(U* - U\right) \cdot \left(n \cdot t_4\right)\right)}\\
\mathbf{elif}\;\ell \leq 5.9 \cdot 10^{-55}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{\frac{Om}{\ell}}, t_5\right)\right)}\\
\mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+217}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, t_3, \frac{\frac{\left(\ell \cdot n\right) \cdot \left(U \cdot -4\right)}{{t_1}^{2}}}{t_1}\right)}\\
\mathbf{elif}\;\ell \leq 4.1 \cdot 10^{+260}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{U \cdot \left(n \cdot t_6\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{fma}\left(2, t_3, \left(U \cdot -4\right) \cdot \frac{\ell \cdot n}{\frac{Om}{\ell}}\right)\right)}^{0.25}\right)}^{2}\\
\end{array}
if l < -1.74999999999999989e83Initial program 52.8
Simplified43.4
[Start]52.8 | \[ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\] |
|---|---|
associate-*l* [=>]52.8 | \[ \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* [=>]52.8 | \[ \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 [=>]52.8 | \[ \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 36.0
Simplified35.2
[Start]36.0 | \[ -1 \cdot \left(\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)}\right)
\] |
|---|---|
associate-*r* [=>]36.0 | \[ \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \ell\right)\right) \cdot \sqrt{n \cdot \left(\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)}}
\] |
*-commutative [=>]36.0 | \[ \color{blue}{\sqrt{n \cdot \left(\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)} \cdot \left(-1 \cdot \left(\sqrt{2} \cdot \ell\right)\right)}
\] |
if -1.74999999999999989e83 < l < -7.39999999999999973e-146Initial program 28.7
Simplified29.8
[Start]28.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* [=>]29.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)}}
\] |
associate--l- [=>]29.0 | \[ \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.0 | \[ \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.0 | \[ \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.0 | \[ \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.0 | \[ \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.0 | \[ \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* [=>]29.8 | \[ \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-rr45.4
Simplified30.4
[Start]45.4 | \[ e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(\left(U - U*\right) \cdot n\right)\right)\right)\right)}\right)} - 1
\] |
|---|---|
expm1-def [=>]31.4 | \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(\left(U - U*\right) \cdot n\right)\right)\right)\right)}\right)\right)}
\] |
expm1-log1p [=>]30.3 | \[ \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(\left(U - U*\right) \cdot n\right)\right)\right)\right)}}
\] |
*-commutative [=>]30.3 | \[ \sqrt{2 \cdot \left(\color{blue}{\left(U \cdot n\right)} \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(\left(U - U*\right) \cdot n\right)\right)\right)\right)}
\] |
associate-*l* [=>]30.4 | \[ \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(\left(U - U*\right) \cdot n\right)\right)\right)\right)\right)}}
\] |
associate-*r* [=>]30.4 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, \color{blue}{\left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right) \cdot n}\right)\right)\right)\right)}
\] |
*-commutative [=>]30.4 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, \color{blue}{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)\right)\right)\right)}
\] |
*-commutative [=>]30.4 | \[ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell \cdot \ell}{Om}, n \cdot \color{blue}{\left(\left(U - U*\right) \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)\right)\right)\right)}
\] |
if -7.39999999999999973e-146 < l < 6.39999999999999962e-105Initial program 24.5
if 6.39999999999999962e-105 < l < 5.8999999999999998e-55Initial program 27.2
Applied egg-rr40.9
Simplified40.8
[Start]40.9 | \[ \sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)}
\] |
|---|---|
associate-*r/ [=>]40.9 | \[ \sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \color{blue}{\frac{\ell \cdot \ell}{Om}}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)}
\] |
associate-/l* [=>]40.9 | \[ \sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \color{blue}{\frac{\ell}{\frac{Om}{\ell}}}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)}
\] |
associate-*r* [=>]39.7 | \[ \sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{\frac{Om}{\ell}}, \color{blue}{\left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) \cdot \left(U - U*\right)}\right)\right)}
\] |
*-commutative [<=]39.7 | \[ \sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{\frac{Om}{\ell}}, \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)} \cdot \left(U - U*\right)\right)\right)}
\] |
associate-*l* [=>]40.8 | \[ \sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{\frac{Om}{\ell}}, \color{blue}{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)\right)}
\] |
if 5.8999999999999998e-55 < l < 7.5000000000000001e217Initial program 38.5
Taylor expanded in Om around inf 40.3
Simplified39.8
[Start]40.3 | \[ \sqrt{2 \cdot \left(n \cdot \left(t \cdot U\right)\right) + -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}}
\] |
|---|---|
fma-def [=>]40.3 | \[ \sqrt{\color{blue}{\mathsf{fma}\left(2, n \cdot \left(t \cdot U\right), -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}\right)}}
\] |
*-commutative [=>]40.3 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \color{blue}{\left(U \cdot t\right)}, -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}\right)}
\] |
associate-/l* [=>]39.9 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), -4 \cdot \color{blue}{\frac{n}{\frac{Om}{{\ell}^{2} \cdot U}}}\right)}
\] |
associate-/r* [=>]39.8 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), -4 \cdot \frac{n}{\color{blue}{\frac{\frac{Om}{{\ell}^{2}}}{U}}}\right)}
\] |
unpow2 [=>]39.8 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), -4 \cdot \frac{n}{\frac{\frac{Om}{\color{blue}{\ell \cdot \ell}}}{U}}\right)}
\] |
Applied egg-rr50.6
Simplified33.4
[Start]50.6 | \[ e^{\mathsf{log1p}\left(\sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), \left(n \cdot \frac{\ell}{\frac{Om}{\ell}}\right) \cdot \left(U \cdot -4\right)\right)}\right)} - 1
\] |
|---|---|
expm1-def [=>]36.0 | \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), \left(n \cdot \frac{\ell}{\frac{Om}{\ell}}\right) \cdot \left(U \cdot -4\right)\right)}\right)\right)}
\] |
expm1-log1p [=>]35.2 | \[ \color{blue}{\sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), \left(n \cdot \frac{\ell}{\frac{Om}{\ell}}\right) \cdot \left(U \cdot -4\right)\right)}}
\] |
associate-*r/ [=>]33.4 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), \color{blue}{\frac{n \cdot \ell}{\frac{Om}{\ell}}} \cdot \left(U \cdot -4\right)\right)}
\] |
Applied egg-rr34.0
if 7.5000000000000001e217 < l < 4.10000000000000025e260Initial program 64.0
Simplified51.3
[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 33.4
Simplified37.5
[Start]33.4 | \[ \left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}
\] |
|---|---|
associate-*l* [=>]33.3 | \[ \color{blue}{\sqrt{2} \cdot \left(\ell \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}\right)}
\] |
*-commutative [=>]33.3 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{n \cdot \color{blue}{\left(\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right) \cdot U\right)}}\right)
\] |
associate-*r* [=>]37.0 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{\color{blue}{\left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right) \cdot U}}\right)
\] |
*-commutative [=>]37.0 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{\color{blue}{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}}\right)
\] |
cancel-sign-sub-inv [=>]37.0 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{U \cdot \left(n \cdot \color{blue}{\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + \left(-2\right) \cdot \frac{1}{Om}\right)}\right)}\right)
\] |
associate-/l* [=>]39.0 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{U \cdot \left(n \cdot \left(\color{blue}{\frac{n}{\frac{{Om}^{2}}{U* - U}}} + \left(-2\right) \cdot \frac{1}{Om}\right)\right)}\right)
\] |
associate-/r/ [=>]37.5 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{U \cdot \left(n \cdot \left(\color{blue}{\frac{n}{{Om}^{2}} \cdot \left(U* - U\right)} + \left(-2\right) \cdot \frac{1}{Om}\right)\right)}\right)
\] |
unpow2 [=>]37.5 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n}{\color{blue}{Om \cdot Om}} \cdot \left(U* - U\right) + \left(-2\right) \cdot \frac{1}{Om}\right)\right)}\right)
\] |
metadata-eval [=>]37.5 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \color{blue}{-2} \cdot \frac{1}{Om}\right)\right)}\right)
\] |
associate-*r/ [=>]37.5 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \color{blue}{\frac{-2 \cdot 1}{Om}}\right)\right)}\right)
\] |
metadata-eval [=>]37.5 | \[ \sqrt{2} \cdot \left(\ell \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) + \frac{\color{blue}{-2}}{Om}\right)\right)}\right)
\] |
if 4.10000000000000025e260 < l Initial program 64.0
Taylor expanded in Om around inf 64.0
Simplified64.0
[Start]64.0 | \[ \sqrt{2 \cdot \left(n \cdot \left(t \cdot U\right)\right) + -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}}
\] |
|---|---|
fma-def [=>]64.0 | \[ \sqrt{\color{blue}{\mathsf{fma}\left(2, n \cdot \left(t \cdot U\right), -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}\right)}}
\] |
*-commutative [=>]64.0 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \color{blue}{\left(U \cdot t\right)}, -4 \cdot \frac{n \cdot \left({\ell}^{2} \cdot U\right)}{Om}\right)}
\] |
associate-/l* [=>]64.0 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), -4 \cdot \color{blue}{\frac{n}{\frac{Om}{{\ell}^{2} \cdot U}}}\right)}
\] |
associate-/r* [=>]64.0 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), -4 \cdot \frac{n}{\color{blue}{\frac{\frac{Om}{{\ell}^{2}}}{U}}}\right)}
\] |
unpow2 [=>]64.0 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), -4 \cdot \frac{n}{\frac{\frac{Om}{\color{blue}{\ell \cdot \ell}}}{U}}\right)}
\] |
Applied egg-rr62.4
Simplified50.1
[Start]62.4 | \[ e^{\mathsf{log1p}\left(\sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), \left(n \cdot \frac{\ell}{\frac{Om}{\ell}}\right) \cdot \left(U \cdot -4\right)\right)}\right)} - 1
\] |
|---|---|
expm1-def [=>]60.5 | \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), \left(n \cdot \frac{\ell}{\frac{Om}{\ell}}\right) \cdot \left(U \cdot -4\right)\right)}\right)\right)}
\] |
expm1-log1p [=>]60.4 | \[ \color{blue}{\sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), \left(n \cdot \frac{\ell}{\frac{Om}{\ell}}\right) \cdot \left(U \cdot -4\right)\right)}}
\] |
associate-*r/ [=>]50.1 | \[ \sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), \color{blue}{\frac{n \cdot \ell}{\frac{Om}{\ell}}} \cdot \left(U \cdot -4\right)\right)}
\] |
Applied egg-rr46.0
Applied egg-rr50.2
Final simplification30.7
| Alternative 1 | |
|---|---|
| Error | 25.4 |
| Cost | 57612 |
| Alternative 2 | |
|---|---|
| Error | 26.1 |
| Cost | 57612 |
| Alternative 3 | |
|---|---|
| Error | 30.2 |
| Cost | 27664 |
| Alternative 4 | |
|---|---|
| Error | 29.6 |
| Cost | 21000 |
| Alternative 5 | |
|---|---|
| Error | 32.3 |
| Cost | 15332 |
| Alternative 6 | |
|---|---|
| Error | 31.7 |
| Cost | 15200 |
| Alternative 7 | |
|---|---|
| Error | 31.7 |
| Cost | 15200 |
| Alternative 8 | |
|---|---|
| Error | 30.8 |
| Cost | 15200 |
| Alternative 9 | |
|---|---|
| Error | 30.7 |
| Cost | 15200 |
| Alternative 10 | |
|---|---|
| Error | 30.0 |
| Cost | 14936 |
| Alternative 11 | |
|---|---|
| Error | 32.4 |
| Cost | 14812 |
| Alternative 12 | |
|---|---|
| Error | 32.5 |
| Cost | 14548 |
| Alternative 13 | |
|---|---|
| Error | 32.5 |
| Cost | 14548 |
| Alternative 14 | |
|---|---|
| Error | 32.5 |
| Cost | 13644 |
| Alternative 15 | |
|---|---|
| Error | 32.4 |
| Cost | 8784 |
| Alternative 16 | |
|---|---|
| Error | 33.4 |
| Cost | 8144 |
| Alternative 17 | |
|---|---|
| Error | 34.5 |
| Cost | 8012 |
| Alternative 18 | |
|---|---|
| Error | 34.2 |
| Cost | 7888 |
| Alternative 19 | |
|---|---|
| Error | 35.1 |
| Cost | 7756 |
| Alternative 20 | |
|---|---|
| Error | 35.1 |
| Cost | 7756 |
| Alternative 21 | |
|---|---|
| Error | 33.8 |
| Cost | 7624 |
| Alternative 22 | |
|---|---|
| Error | 36.0 |
| Cost | 7497 |
| Alternative 23 | |
|---|---|
| Error | 39.6 |
| Cost | 7113 |
| Alternative 24 | |
|---|---|
| Error | 39.6 |
| Cost | 6980 |
| Alternative 25 | |
|---|---|
| Error | 39.8 |
| Cost | 6848 |
herbie shell --seed 2023041
(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*))))))