
(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*))))))
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_)))));
}
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
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_)))));
}
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_)))))
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 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
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]
\begin{array}{l}
\\
\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)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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*))))))
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_)))));
}
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
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_)))));
}
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_)))))
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 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
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]
\begin{array}{l}
\\
\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)}
\end{array}
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U))))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n (+ t (* -2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (+ (* 2.0 (* l_m (/ l_m Om))) (* t_1 (- U U*))))))
(*
(sqrt (* U (/ (+ (* n -2.0) (/ (* U* (pow n 2.0)) Om)) Om)))
(* l_m (sqrt 2.0)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * (t + (-2.0 * (pow(l_m, 2.0) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = sqrt((U * (((n * -2.0) + ((U_42_ * pow(n, 2.0)) / Om)) / Om))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * Math.pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = Math.sqrt((U * (((n * -2.0) + ((U_42_ * Math.pow(n, 2.0)) / Om)) / Om))) * (l_m * Math.sqrt(2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = n * math.pow((l_m / Om), 2.0) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * (t + (-2.0 * (math.pow(l_m, 2.0) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_)))))) else: tmp = math.sqrt((U * (((n * -2.0) + ((U_42_ * math.pow(n, 2.0)) / Om)) / Om))) * (l_m * math.sqrt(2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * Float64(l_m * Float64(l_m / Om))) + Float64(t_1 * Float64(U - U_42_)))))); else tmp = Float64(sqrt(Float64(U * Float64(Float64(Float64(n * -2.0) + Float64(Float64(U_42_ * (n ^ 2.0)) / Om)) / Om))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = n * ((l_m / Om) ^ 2.0); t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * (t + (-2.0 * ((l_m ^ 2.0) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_)))))); else tmp = sqrt((U * (((n * -2.0) + ((U_42_ * (n ^ 2.0)) / Om)) / Om))) * (l_m * sqrt(2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(N[(N[(n * -2.0), $MachinePrecision] + N[(N[(U$42$ * N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right) + t\_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \frac{n \cdot -2 + \frac{U* \cdot {n}^{2}}{Om}}{Om}} \cdot \left(l\_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 11.6%
Simplified26.2%
Taylor expanded in n around 0 30.5%
pow1/230.8%
associate-*r*30.8%
unpow-prod-down37.9%
pow1/237.7%
associate-*r/37.7%
Applied egg-rr37.7%
unpow1/237.7%
associate-*r/37.7%
cancel-sign-sub-inv37.7%
metadata-eval37.7%
Simplified37.7%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 71.6%
Simplified76.1%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified10.3%
Taylor expanded in l around inf 21.3%
Taylor expanded in U around 0 21.3%
associate-*r/21.3%
metadata-eval21.3%
Simplified21.3%
Taylor expanded in Om around inf 24.0%
Final simplification60.3%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U))))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n (+ t (* -2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (+ (* 2.0 (* l_m (/ l_m Om))) (* t_1 (- U U*))))))
(*
(* l_m (sqrt 2.0))
(sqrt (* U (* n (- (/ (* n U*) (pow Om 2.0)) (/ 2.0 Om))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * (t + (-2.0 * (pow(l_m, 2.0) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) - (2.0 / Om)))));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * Math.pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = n * math.pow((l_m / Om), 2.0) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * (t + (-2.0 * (math.pow(l_m, 2.0) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_)))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * Float64(l_m * Float64(l_m / Om))) + Float64(t_1 * Float64(U - U_42_)))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = n * ((l_m / Om) ^ 2.0); t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * (t + (-2.0 * ((l_m ^ 2.0) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_)))))); else tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) - (2.0 / Om))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right) + t\_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 11.6%
Simplified26.2%
Taylor expanded in n around 0 30.5%
pow1/230.8%
associate-*r*30.8%
unpow-prod-down37.9%
pow1/237.7%
associate-*r/37.7%
Applied egg-rr37.7%
unpow1/237.7%
associate-*r/37.7%
cancel-sign-sub-inv37.7%
metadata-eval37.7%
Simplified37.7%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 71.6%
Simplified76.1%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified10.3%
Taylor expanded in l around inf 21.3%
Taylor expanded in U around 0 21.3%
associate-*r/21.3%
metadata-eval21.3%
Simplified21.3%
Final simplification59.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U))))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n (+ t (* -2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (+ (* 2.0 (* l_m (/ l_m Om))) (* t_1 (- U U*))))))
(* (* l_m (sqrt 2.0)) (cbrt (pow (* -2.0 (/ (* n U) Om)) 1.5)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * (t + (-2.0 * (pow(l_m, 2.0) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = (l_m * sqrt(2.0)) * cbrt(pow((-2.0 * ((n * U) / Om)), 1.5));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * Math.pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.cbrt(Math.pow((-2.0 * ((n * U) / Om)), 1.5));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * Float64(l_m * Float64(l_m / Om))) + Float64(t_1 * Float64(U - U_42_)))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * cbrt((Float64(-2.0 * Float64(Float64(n * U) / Om)) ^ 1.5))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right) + t\_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt[3]{{\left(-2 \cdot \frac{n \cdot U}{Om}\right)}^{1.5}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 11.6%
Simplified26.2%
Taylor expanded in n around 0 30.5%
pow1/230.8%
associate-*r*30.8%
unpow-prod-down37.9%
pow1/237.7%
associate-*r/37.7%
Applied egg-rr37.7%
unpow1/237.7%
associate-*r/37.7%
cancel-sign-sub-inv37.7%
metadata-eval37.7%
Simplified37.7%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 71.6%
Simplified76.1%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified10.3%
Taylor expanded in l around inf 21.3%
Taylor expanded in U around 0 21.3%
associate-*r/21.3%
metadata-eval21.3%
Simplified21.3%
add-cbrt-cube19.2%
add-sqr-sqrt19.2%
pow119.2%
pow1/219.3%
pow-prod-up19.3%
Applied egg-rr23.2%
Taylor expanded in n around 0 14.9%
Final simplification58.7%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U))))))
(if (<= t_2 0.0)
(sqrt
(*
(* 2.0 n)
(* U (- t (/ (* (pow l_m 2.0) (+ 2.0 (/ (* n (- U U*)) Om))) Om)))))
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (+ (* 2.0 (* l_m (/ l_m Om))) (* t_1 (- U U*))))))
(* (* l_m (sqrt 2.0)) (cbrt (pow (* -2.0 (/ (* n U) Om)) 1.5)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - ((pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = (l_m * sqrt(2.0)) * cbrt(pow((-2.0 * ((n * U) / Om)), 1.5));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * Math.pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - ((Math.pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.cbrt(Math.pow((-2.0 * ((n * U) / Om)), 1.5));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64((l_m ^ 2.0) * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * Float64(l_m * Float64(l_m / Om))) + Float64(t_1 * Float64(U - U_42_)))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * cbrt((Float64(-2.0 * Float64(Float64(n * U) / Om)) ^ 1.5))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{{l\_m}^{2} \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right) + t\_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt[3]{{\left(-2 \cdot \frac{n \cdot U}{Om}\right)}^{1.5}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 11.6%
Simplified26.2%
Taylor expanded in Om around inf 30.4%
*-commutative30.4%
associate-/l*30.4%
distribute-lft-out30.7%
Simplified30.7%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 71.6%
Simplified76.1%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified10.3%
Taylor expanded in l around inf 21.3%
Taylor expanded in U around 0 21.3%
associate-*r/21.3%
metadata-eval21.3%
Simplified21.3%
add-cbrt-cube19.2%
add-sqr-sqrt19.2%
pow119.2%
pow1/219.3%
pow-prod-up19.3%
Applied egg-rr23.2%
Taylor expanded in n around 0 14.9%
Final simplification57.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U))))))
(if (or (<= t_2 0.0) (not (<= t_2 INFINITY)))
(sqrt
(*
(* 2.0 n)
(* U (- t (/ (* (pow l_m 2.0) (+ 2.0 (/ (* n (- U U*)) Om))) Om)))))
(sqrt
(*
(* 2.0 (* n U))
(- t (+ (* 2.0 (* l_m (/ l_m Om))) (* t_1 (- U U*)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if ((t_2 <= 0.0) || !(t_2 <= ((double) INFINITY))) {
tmp = sqrt(((2.0 * n) * (U * (t - ((pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * Math.pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if ((t_2 <= 0.0) || !(t_2 <= Double.POSITIVE_INFINITY)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - ((Math.pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = n * math.pow((l_m / Om), 2.0) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))) tmp = 0 if (t_2 <= 0.0) or not (t_2 <= math.inf): tmp = math.sqrt(((2.0 * n) * (U * (t - ((math.pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om))))) else: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) tmp = 0.0 if ((t_2 <= 0.0) || !(t_2 <= Inf)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64((l_m ^ 2.0) * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om))) / Om))))); else tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * Float64(l_m * Float64(l_m / Om))) + Float64(t_1 * Float64(U - U_42_)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = n * ((l_m / Om) ^ 2.0); t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))); tmp = 0.0; if ((t_2 <= 0.0) || ~((t_2 <= Inf))) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m ^ 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om))))); else tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m * (l_m / Om))) + (t_1 * (U - U_42_)))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, 0.0], N[Not[LessEqual[t$95$2, Infinity]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 0 \lor \neg \left(t\_2 \leq \infty\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{{l\_m}^{2} \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right) + t\_1 \cdot \left(U - U*\right)\right)\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0 or +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 5.9%
Simplified18.4%
Taylor expanded in Om around inf 20.4%
*-commutative20.4%
associate-/l*20.4%
distribute-lft-out31.8%
Simplified31.8%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 71.6%
Simplified76.1%
Final simplification60.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= Om -2.05e-72)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(if (<= Om 5400.0)
(sqrt
(*
(* 2.0 n)
(* U (- t (/ (* (pow l_m 2.0) (+ 2.0 (/ (* n (- U U*)) Om))) Om)))))
(pow (* 2.0 (* (* n U) (- t (/ (* 2.0 (pow l_m 2.0)) Om)))) 0.5))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (Om <= -2.05e-72) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else if (Om <= 5400.0) {
tmp = sqrt(((2.0 * n) * (U * (t - ((pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else {
tmp = pow((2.0 * ((n * U) * (t - ((2.0 * pow(l_m, 2.0)) / Om)))), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (om <= (-2.05d-72)) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else if (om <= 5400.0d0) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (((l_m ** 2.0d0) * (2.0d0 + ((n * (u - u_42)) / om))) / om)))))
else
tmp = (2.0d0 * ((n * u) * (t - ((2.0d0 * (l_m ** 2.0d0)) / om)))) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (Om <= -2.05e-72) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else if (Om <= 5400.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - ((Math.pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else {
tmp = Math.pow((2.0 * ((n * U) * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om)))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if Om <= -2.05e-72: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) elif Om <= 5400.0: tmp = math.sqrt(((2.0 * n) * (U * (t - ((math.pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om))))) else: tmp = math.pow((2.0 * ((n * U) * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (Om <= -2.05e-72) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); elseif (Om <= 5400.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64((l_m ^ 2.0) * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om))) / Om))))); else tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om)))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (Om <= -2.05e-72) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); elseif (Om <= 5400.0) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m ^ 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om))))); else tmp = (2.0 * ((n * U) * (t - ((2.0 * (l_m ^ 2.0)) / Om)))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -2.05e-72], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 5400.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -2.05 \cdot 10^{-72}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;Om \leq 5400:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{{l\_m}^{2} \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if Om < -2.05000000000000002e-72Initial program 52.7%
Simplified45.1%
Taylor expanded in n around 0 55.6%
if -2.05000000000000002e-72 < Om < 5400Initial program 45.4%
Simplified45.6%
Taylor expanded in Om around inf 49.0%
*-commutative49.0%
associate-/l*46.9%
distribute-lft-out54.6%
Simplified54.6%
if 5400 < Om Initial program 48.2%
Simplified52.5%
Taylor expanded in n around 0 40.8%
pow1/243.4%
associate-*r*49.0%
associate-*r/49.0%
Applied egg-rr49.0%
Final simplification53.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 1.85e+76)
(pow (* t (* 2.0 (* n U))) 0.5)
(if (<= l_m 2.2e+156)
(sqrt (* 2.0 (* U (* -2.0 (/ (* n (pow l_m 2.0)) Om)))))
(* (* l_m (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 1.85e+76) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else if (l_m <= 2.2e+156) {
tmp = sqrt((2.0 * (U * (-2.0 * ((n * pow(l_m, 2.0)) / Om)))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 1.85d+76) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else if (l_m <= 2.2d+156) then
tmp = sqrt((2.0d0 * (u * ((-2.0d0) * ((n * (l_m ** 2.0d0)) / om)))))
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / om)))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 1.85e+76) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else if (l_m <= 2.2e+156) {
tmp = Math.sqrt((2.0 * (U * (-2.0 * ((n * Math.pow(l_m, 2.0)) / Om)))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.85e+76: tmp = math.pow((t * (2.0 * (n * U))), 0.5) elif l_m <= 2.2e+156: tmp = math.sqrt((2.0 * (U * (-2.0 * ((n * math.pow(l_m, 2.0)) / Om))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.85e+76) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; elseif (l_m <= 2.2e+156) tmp = sqrt(Float64(2.0 * Float64(U * Float64(-2.0 * Float64(Float64(n * (l_m ^ 2.0)) / Om))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 1.85e+76) tmp = (t * (2.0 * (n * U))) ^ 0.5; elseif (l_m <= 2.2e+156) tmp = sqrt((2.0 * (U * (-2.0 * ((n * (l_m ^ 2.0)) / Om))))); else tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 1.85e+76], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l$95$m, 2.2e+156], N[Sqrt[N[(2.0 * N[(U * N[(-2.0 * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.85 \cdot 10^{+76}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;l\_m \leq 2.2 \cdot 10^{+156}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{n \cdot {l\_m}^{2}}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 1.85e76Initial program 53.9%
Simplified51.2%
Taylor expanded in l around 0 35.8%
Taylor expanded in n around 0 39.2%
associate-*r*41.0%
Simplified41.0%
pow1/242.9%
associate-*r*42.9%
*-commutative42.9%
Applied egg-rr42.9%
if 1.85e76 < l < 2.20000000000000004e156Initial program 35.8%
Simplified41.8%
Taylor expanded in n around 0 55.2%
Taylor expanded in t around 0 48.9%
if 2.20000000000000004e156 < l Initial program 15.4%
Simplified26.2%
Taylor expanded in l around inf 53.9%
Taylor expanded in n around 0 45.7%
Final simplification43.6%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 5e+80)
(pow (* t (* 2.0 (* n U))) 0.5)
(if (<= l_m 1.7e+156)
(sqrt (* 2.0 (* -2.0 (/ (* U (* n (pow l_m 2.0))) Om))))
(* (* l_m (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5e+80) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else if (l_m <= 1.7e+156) {
tmp = sqrt((2.0 * (-2.0 * ((U * (n * pow(l_m, 2.0))) / Om))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 5d+80) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else if (l_m <= 1.7d+156) then
tmp = sqrt((2.0d0 * ((-2.0d0) * ((u * (n * (l_m ** 2.0d0))) / om))))
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / om)))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5e+80) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else if (l_m <= 1.7e+156) {
tmp = Math.sqrt((2.0 * (-2.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 5e+80: tmp = math.pow((t * (2.0 * (n * U))), 0.5) elif l_m <= 1.7e+156: tmp = math.sqrt((2.0 * (-2.0 * ((U * (n * math.pow(l_m, 2.0))) / Om)))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 5e+80) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; elseif (l_m <= 1.7e+156) tmp = sqrt(Float64(2.0 * Float64(-2.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om)))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 5e+80) tmp = (t * (2.0 * (n * U))) ^ 0.5; elseif (l_m <= 1.7e+156) tmp = sqrt((2.0 * (-2.0 * ((U * (n * (l_m ^ 2.0))) / Om)))); else tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 5e+80], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l$95$m, 1.7e+156], N[Sqrt[N[(2.0 * N[(-2.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5 \cdot 10^{+80}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;l\_m \leq 1.7 \cdot 10^{+156}:\\
\;\;\;\;\sqrt{2 \cdot \left(-2 \cdot \frac{U \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 4.99999999999999961e80Initial program 53.9%
Simplified51.2%
Taylor expanded in l around 0 35.8%
Taylor expanded in n around 0 39.2%
associate-*r*41.0%
Simplified41.0%
pow1/242.9%
associate-*r*42.9%
*-commutative42.9%
Applied egg-rr42.9%
if 4.99999999999999961e80 < l < 1.7e156Initial program 35.8%
Simplified41.8%
Taylor expanded in n around 0 55.2%
Taylor expanded in t around 0 55.5%
if 1.7e156 < l Initial program 15.4%
Simplified26.2%
Taylor expanded in l around inf 53.9%
Taylor expanded in n around 0 45.7%
Final simplification43.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= t 1.25e+212) (pow (* 2.0 (* (* n U) (- t (/ (* 2.0 (pow l_m 2.0)) Om)))) 0.5) (* (sqrt (* (* 2.0 n) U)) (sqrt t))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 1.25e+212) {
tmp = pow((2.0 * ((n * U) * (t - ((2.0 * pow(l_m, 2.0)) / Om)))), 0.5);
} else {
tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 1.25d+212) then
tmp = (2.0d0 * ((n * u) * (t - ((2.0d0 * (l_m ** 2.0d0)) / om)))) ** 0.5d0
else
tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 1.25e+212) {
tmp = Math.pow((2.0 * ((n * U) * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om)))), 0.5);
} else {
tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= 1.25e+212: tmp = math.pow((2.0 * ((n * U) * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))), 0.5) else: tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= 1.25e+212) tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om)))) ^ 0.5; else tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= 1.25e+212) tmp = (2.0 * ((n * U) * (t - ((2.0 * (l_m ^ 2.0)) / Om)))) ^ 0.5; else tmp = sqrt(((2.0 * n) * U)) * sqrt(t); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, 1.25e+212], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.25 \cdot 10^{+212}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < 1.24999999999999998e212Initial program 48.1%
Simplified45.9%
Taylor expanded in n around 0 44.0%
pow1/249.0%
associate-*r*48.1%
associate-*r/47.6%
Applied egg-rr47.6%
if 1.24999999999999998e212 < t Initial program 51.3%
Simplified61.5%
Taylor expanded in t around inf 52.5%
associate-*r*52.5%
Simplified52.5%
pow1/252.5%
associate-*r*47.1%
unpow-prod-down62.8%
*-commutative62.8%
pow1/262.8%
Applied egg-rr62.8%
unpow1/262.8%
associate-*l*62.8%
Simplified62.8%
Final simplification49.4%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 2.35e+156) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om))))))) (* (* l_m (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2.35e+156) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 2.35d+156) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / om)))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2.35e+156) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 2.35e+156: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 2.35e+156) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 2.35e+156) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); else tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2.35e+156], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.35 \cdot 10^{+156}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 2.35e156Initial program 52.7%
Simplified50.5%
Taylor expanded in n around 0 48.5%
if 2.35e156 < l Initial program 15.4%
Simplified26.2%
Taylor expanded in l around inf 53.9%
Taylor expanded in n around 0 45.7%
Final simplification48.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.6e+86) (pow (* t (* 2.0 (* n U))) 0.5) (* (* l_m (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 1.6e+86) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 1.6d+86) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / om)))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 1.6e+86) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.6e+86: tmp = math.pow((t * (2.0 * (n * U))), 0.5) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.6e+86) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 1.6e+86) tmp = (t * (2.0 * (n * U))) ^ 0.5; else tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 1.6e+86], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.6 \cdot 10^{+86}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 1.6e86Initial program 53.7%
Simplified51.4%
Taylor expanded in l around 0 36.1%
Taylor expanded in n around 0 39.4%
associate-*r*40.8%
Simplified40.8%
pow1/242.7%
associate-*r*42.7%
*-commutative42.7%
Applied egg-rr42.7%
if 1.6e86 < l Initial program 22.8%
Simplified29.9%
Taylor expanded in l around inf 46.7%
Taylor expanded in n around 0 43.2%
Final simplification42.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.95e+86) (pow (* t (* 2.0 (* n U))) 0.5) (* (* l_m (sqrt 2.0)) (sqrt (* -2.0 (* U (/ n Om)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 1.95e+86) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * (U * (n / Om))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 1.95d+86) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((-2.0d0) * (u * (n / om))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 1.95e+86) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((-2.0 * (U * (n / Om))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.95e+86: tmp = math.pow((t * (2.0 * (n * U))), 0.5) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((-2.0 * (U * (n / Om)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.95e+86) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(U * Float64(n / Om))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 1.95e+86) tmp = (t * (2.0 * (n * U))) ^ 0.5; else tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * (U * (n / Om)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 1.95e+86], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(U * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.95 \cdot 10^{+86}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \left(U \cdot \frac{n}{Om}\right)}\\
\end{array}
\end{array}
if l < 1.9500000000000001e86Initial program 53.7%
Simplified51.4%
Taylor expanded in l around 0 36.1%
Taylor expanded in n around 0 39.4%
associate-*r*40.8%
Simplified40.8%
pow1/242.7%
associate-*r*42.7%
*-commutative42.7%
Applied egg-rr42.7%
if 1.9500000000000001e86 < l Initial program 22.8%
Simplified29.9%
Taylor expanded in l around inf 46.7%
Taylor expanded in U around 0 46.7%
associate-*r/46.7%
metadata-eval46.7%
Simplified46.7%
Taylor expanded in n around 0 43.2%
associate-/l*37.4%
Simplified37.4%
Final simplification41.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= t 9.8e-295) (pow (* t (* 2.0 (* n U))) 0.5) (* (sqrt (* (* 2.0 n) U)) (sqrt t))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 9.8e-295) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 9.8d-295) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else
tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 9.8e-295) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= 9.8e-295: tmp = math.pow((t * (2.0 * (n * U))), 0.5) else: tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= 9.8e-295) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= 9.8e-295) tmp = (t * (2.0 * (n * U))) ^ 0.5; else tmp = sqrt(((2.0 * n) * U)) * sqrt(t); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, 9.8e-295], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.8 \cdot 10^{-295}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < 9.80000000000000054e-295Initial program 45.1%
Simplified44.3%
Taylor expanded in l around 0 27.1%
Taylor expanded in n around 0 31.1%
associate-*r*31.3%
Simplified31.3%
pow1/234.4%
associate-*r*34.4%
*-commutative34.4%
Applied egg-rr34.4%
if 9.80000000000000054e-295 < t Initial program 51.9%
Simplified51.3%
Taylor expanded in t around inf 37.7%
associate-*r*37.7%
Simplified37.7%
pow1/238.5%
associate-*r*40.3%
unpow-prod-down48.2%
*-commutative48.2%
pow1/248.2%
Applied egg-rr48.2%
unpow1/248.2%
associate-*l*48.2%
Simplified48.2%
Final simplification41.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (let* ((t_1 (* 2.0 (* n U)))) (if (<= t 8e-295) (pow (* t t_1) 0.5) (* (sqrt t) (sqrt t_1)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (t <= 8e-295) {
tmp = pow((t * t_1), 0.5);
} else {
tmp = sqrt(t) * sqrt(t_1);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
if (t <= 8d-295) then
tmp = (t * t_1) ** 0.5d0
else
tmp = sqrt(t) * sqrt(t_1)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (t <= 8e-295) {
tmp = Math.pow((t * t_1), 0.5);
} else {
tmp = Math.sqrt(t) * Math.sqrt(t_1);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = 2.0 * (n * U) tmp = 0 if t <= 8e-295: tmp = math.pow((t * t_1), 0.5) else: tmp = math.sqrt(t) * math.sqrt(t_1) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if (t <= 8e-295) tmp = Float64(t * t_1) ^ 0.5; else tmp = Float64(sqrt(t) * sqrt(t_1)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = 2.0 * (n * U); tmp = 0.0; if (t <= 8e-295) tmp = (t * t_1) ^ 0.5; else tmp = sqrt(t) * sqrt(t_1); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 8e-295], N[Power[N[(t * t$95$1), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;t \leq 8 \cdot 10^{-295}:\\
\;\;\;\;{\left(t \cdot t\_1\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{t\_1}\\
\end{array}
\end{array}
if t < 8.00000000000000048e-295Initial program 45.1%
Simplified44.3%
Taylor expanded in l around 0 27.1%
Taylor expanded in n around 0 31.1%
associate-*r*31.3%
Simplified31.3%
pow1/234.4%
associate-*r*34.4%
*-commutative34.4%
Applied egg-rr34.4%
if 8.00000000000000048e-295 < t Initial program 51.9%
Simplified51.3%
Taylor expanded in l around 0 36.1%
Taylor expanded in n around 0 37.7%
associate-*r*39.5%
Simplified39.5%
pow1/240.3%
associate-*r*40.3%
unpow-prod-down48.2%
*-commutative48.2%
pow1/248.2%
Applied egg-rr48.2%
unpow1/248.2%
Simplified48.2%
Final simplification41.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 5.5e+14) (sqrt (* 2.0 (* t (* n U)))) (pow (* (* 2.0 n) (* U t)) 0.5)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5.5e+14) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = pow(((2.0 * n) * (U * t)), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 5.5d+14) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = ((2.0d0 * n) * (u * t)) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5.5e+14) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.pow(((2.0 * n) * (U * t)), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 5.5e+14: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.pow(((2.0 * n) * (U * t)), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 5.5e+14) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = Float64(Float64(2.0 * n) * Float64(U * t)) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 5.5e+14) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = ((2.0 * n) * (U * t)) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 5.5e+14], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5.5 \cdot 10^{+14}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 5.5e14Initial program 54.2%
Simplified51.4%
Taylor expanded in l around 0 36.8%
Taylor expanded in n around 0 40.3%
associate-*r*42.2%
Simplified42.2%
if 5.5e14 < l Initial program 26.5%
Simplified34.0%
Taylor expanded in l around 0 11.6%
pow1/217.3%
associate-*r*17.3%
Applied egg-rr17.3%
Final simplification37.0%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (pow (* t (* 2.0 (* n U))) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return pow((t * (2.0 * (n * U))), 0.5);
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = (t * (2.0d0 * (n * u))) ** 0.5d0
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.pow((t * (2.0 * (n * U))), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow((t * (2.0 * (n * U))), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = (t * (2.0 * (n * U))) ^ 0.5; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}
\end{array}
Initial program 48.5%
Simplified47.8%
Taylor expanded in l around 0 31.6%
Taylor expanded in n around 0 34.4%
associate-*r*35.3%
Simplified35.3%
pow1/237.3%
associate-*r*37.3%
*-commutative37.3%
Applied egg-rr37.3%
Final simplification37.3%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* t (* n U)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((2.0 * (t * (n * U))));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (t * (n * u))))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt((2.0 * (t * (n * U))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (t * (n * U))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(t * Float64(n * U)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (t * (n * U)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}
\end{array}
Initial program 48.5%
Simplified47.8%
Taylor expanded in l around 0 31.6%
Taylor expanded in n around 0 34.4%
associate-*r*35.3%
Simplified35.3%
Final simplification35.3%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((2.0 * (n * (U * t))));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (n * (u * t))))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt((2.0 * (n * (U * t))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (n * (U * t))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * t)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (n * (U * t)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 48.5%
Simplified47.8%
Taylor expanded in l around 0 31.6%
herbie shell --seed 2024094
(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*))))))