
(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 22 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)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(t_3 (+ (/ (* n U*) (pow Om 2.0)) (* 2.0 (/ -1.0 Om)))))
(if (<= t_2 2e-155)
(*
(sqrt (* 2.0 n))
(sqrt (* U (+ t (- t_1 (* 2.0 (/ (pow l_m 2.0) Om)))))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
l_m
(+
(* 0.5 (* (sqrt (/ (* n U) t_3)) (/ (* t (sqrt 2.0)) (pow l_m 2.0))))
(* (sqrt 2.0) (sqrt (* U (* n t_3))))))))))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)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double t_3 = ((n * U_42_) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om));
double tmp;
if (t_2 <= 2e-155) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t + (t_1 - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = l_m * ((0.5 * (sqrt(((n * U) / t_3)) * ((t * sqrt(2.0)) / pow(l_m, 2.0)))) + (sqrt(2.0) * sqrt((U * (n * t_3)))));
}
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)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double t_3 = ((n * U_42_) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om));
double tmp;
if (t_2 <= 2e-155) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + (t_1 - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = l_m * ((0.5 * (Math.sqrt(((n * U) / t_3)) * ((t * Math.sqrt(2.0)) / Math.pow(l_m, 2.0)))) + (Math.sqrt(2.0) * Math.sqrt((U * (n * t_3)))));
}
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)) * (U_42_ - U) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) t_3 = ((n * U_42_) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)) tmp = 0 if t_2 <= 2e-155: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + (t_1 - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = l_m * ((0.5 * (math.sqrt(((n * U) / t_3)) * ((t * math.sqrt(2.0)) / math.pow(l_m, 2.0)))) + (math.sqrt(2.0) * math.sqrt((U * (n * t_3))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) t_3 = Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om))) tmp = 0.0 if (t_2 <= 2e-155) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(t_1 - 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(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(l_m * Float64(Float64(0.5 * Float64(sqrt(Float64(Float64(n * U) / t_3)) * Float64(Float64(t * sqrt(2.0)) / (l_m ^ 2.0)))) + Float64(sqrt(2.0) * sqrt(Float64(U * Float64(n * t_3)))))); 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)) * (U_42_ - U); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); t_3 = ((n * U_42_) / (Om ^ 2.0)) + (2.0 * (-1.0 / Om)); tmp = 0.0; if (t_2 <= 2e-155) tmp = sqrt((2.0 * n)) * sqrt((U * (t + (t_1 - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = l_m * ((0.5 * (sqrt(((n * U) / t_3)) * ((t * sqrt(2.0)) / (l_m ^ 2.0)))) + (sqrt(2.0) * sqrt((U * (n * t_3))))); 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 * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[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] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-155], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(t$95$1 - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $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[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[(N[(0.5 * N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] * N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(U * N[(n * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\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\right)}\\
t_3 := \frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \left(t\_1 - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left(0.5 \cdot \left(\sqrt{\frac{n \cdot U}{t\_3}} \cdot \frac{t \cdot \sqrt{2}}{{l\_m}^{2}}\right) + \sqrt{2} \cdot \sqrt{U \cdot \left(n \cdot t\_3\right)}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.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*))))) < 2.00000000000000003e-155Initial program 8.6%
Simplified24.0%
sqrt-prod31.3%
fma-undefine31.3%
associate-*r*34.4%
+-commutative34.4%
*-commutative34.4%
fma-define34.4%
associate-*r/34.4%
pow234.4%
Applied egg-rr34.4%
*-commutative34.4%
associate-*r/34.4%
Simplified34.4%
fma-undefine34.4%
associate-/l*34.4%
Applied egg-rr34.4%
if 2.00000000000000003e-155 < (sqrt.f64 (*.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 61.6%
Simplified68.0%
if +inf.0 < (sqrt.f64 (*.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%
Simplified14.5%
Taylor expanded in U around 0 0.8%
associate-/l*0.8%
unpow20.8%
unpow20.8%
times-frac15.1%
unpow215.1%
neg-mul-115.1%
distribute-lft-neg-out15.1%
*-commutative15.1%
Simplified15.1%
Taylor expanded in Om around -inf 17.4%
mul-1-neg17.4%
fma-define17.4%
associate-/l*17.4%
associate-/l*17.5%
Simplified17.5%
Taylor expanded in l around inf 37.6%
Final simplification58.1%
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)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_2 2e-155)
(*
(sqrt (* 2.0 n))
(sqrt (* U (+ t (- t_1 (* 2.0 (/ (pow l_m 2.0) Om)))))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
(sqrt (* U (* n (+ (/ (* n U*) (pow Om 2.0)) (* 2.0 (/ -1.0 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)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 2e-155) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t + (t_1 - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) + (2.0 * (-1.0 / 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)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 2e-155) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + (t_1 - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / 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)) * (U_42_ - U) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) tmp = 0 if t_2 <= 2e-155: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + (t_1 - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / 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(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_2 <= 2e-155) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(t_1 - 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(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / 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)) * (U_42_ - U); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); tmp = 0.0; if (t_2 <= 2e-155) tmp = sqrt((2.0 * n)) * sqrt((U * (t + (t_1 - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) + (2.0 * (-1.0 / 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 * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[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] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 2e-155], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(t$95$1 - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $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[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\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\right)}\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \left(t\_1 - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.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*))))) < 2.00000000000000003e-155Initial program 8.6%
Simplified24.0%
sqrt-prod31.3%
fma-undefine31.3%
associate-*r*34.4%
+-commutative34.4%
*-commutative34.4%
fma-define34.4%
associate-*r/34.4%
pow234.4%
Applied egg-rr34.4%
*-commutative34.4%
associate-*r/34.4%
Simplified34.4%
fma-undefine34.4%
associate-/l*34.4%
Applied egg-rr34.4%
if 2.00000000000000003e-155 < (sqrt.f64 (*.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 61.6%
Simplified68.0%
if +inf.0 < (sqrt.f64 (*.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%
Simplified14.5%
Taylor expanded in U around 0 0.8%
associate-/l*0.8%
unpow20.8%
unpow20.8%
times-frac15.1%
unpow215.1%
neg-mul-115.1%
distribute-lft-neg-out15.1%
*-commutative15.1%
Simplified15.1%
Taylor expanded in Om around -inf 17.4%
mul-1-neg17.4%
fma-define17.4%
associate-/l*17.4%
associate-/l*17.5%
Simplified17.5%
Taylor expanded in l around inf 37.6%
Final simplification58.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* l_m (/ l_m Om)))
(t_2 (pow (/ l_m Om) 2.0))
(t_3 (* (* n t_2) (- U* U)))
(t_4
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_3)))))
(if (<= t_4 2e-155)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (fma 2.0 t_1 (* (* t_2 U*) (- n)))))))
(if (<= t_4 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_3 (* 2.0 t_1)))))
(*
(sqrt (* U (* n (+ (/ (* n U*) (pow Om 2.0)) (* 2.0 (/ -1.0 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 = l_m * (l_m / Om);
double t_2 = pow((l_m / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_3)));
double tmp;
if (t_4 <= 2e-155) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, t_1, ((t_2 * U_42_) * -n)))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_3 - (2.0 * t_1)))));
} else {
tmp = sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(l_m * Float64(l_m / Om)) t_2 = Float64(l_m / Om) ^ 2.0 t_3 = Float64(Float64(n * t_2) * Float64(U_42_ - U)) t_4 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_3))) tmp = 0.0 if (t_4 <= 2e-155) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(2.0, t_1, Float64(Float64(t_2 * U_42_) * Float64(-n))))))); elseif (t_4 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_3 - Float64(2.0 * t_1))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) * Float64(l_m * sqrt(2.0))); 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[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(n * t$95$2), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[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] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 2e-155], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * t$95$1 + N[(N[(t$95$2 * U$42$), $MachinePrecision] * (-n)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$3 - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := l\_m \cdot \frac{l\_m}{Om}\\
t_2 := {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_3 := \left(n \cdot t\_2\right) \cdot \left(U* - U\right)\\
t_4 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_3\right)}\\
\mathbf{if}\;t\_4 \leq 2 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, t\_1, \left(t\_2 \cdot U*\right) \cdot \left(-n\right)\right)\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_3 - 2 \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.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*))))) < 2.00000000000000003e-155Initial program 8.6%
Simplified24.0%
Taylor expanded in U around 0 14.4%
associate-/l*20.9%
unpow220.9%
unpow220.9%
times-frac24.0%
unpow224.0%
neg-mul-124.0%
distribute-lft-neg-out24.0%
*-commutative24.0%
Simplified24.0%
pow1/224.0%
*-commutative24.0%
unpow-prod-down31.3%
pow1/231.3%
associate-*r/31.3%
unpow231.3%
pow1/231.3%
Applied egg-rr31.3%
unpow231.3%
associate-*r/31.3%
*-commutative31.3%
Applied egg-rr31.3%
if 2.00000000000000003e-155 < (sqrt.f64 (*.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 61.6%
Simplified68.0%
if +inf.0 < (sqrt.f64 (*.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%
Simplified14.5%
Taylor expanded in U around 0 0.8%
associate-/l*0.8%
unpow20.8%
unpow20.8%
times-frac15.1%
unpow215.1%
neg-mul-115.1%
distribute-lft-neg-out15.1%
*-commutative15.1%
Simplified15.1%
Taylor expanded in Om around -inf 17.4%
mul-1-neg17.4%
fma-define17.4%
associate-/l*17.4%
associate-/l*17.5%
Simplified17.5%
Taylor expanded in l around inf 37.6%
Final simplification57.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* l_m (/ l_m Om))))
(t_2 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_3
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_2)))))
(if (<= t_3 2e-155)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t t_1))))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 t_1))))
(*
(sqrt (* U (* n (+ (/ (* n U*) (pow Om 2.0)) (* 2.0 (/ -1.0 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 = 2.0 * (l_m * (l_m / Om));
double t_2 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
double tmp;
if (t_3 <= 2e-155) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - t_1)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) + (2.0 * (-1.0 / 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 = 2.0 * (l_m * (l_m / Om));
double t_2 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
double tmp;
if (t_3 <= 2e-155) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - t_1)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / 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 = 2.0 * (l_m * (l_m / Om)) t_2 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_3 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2))) tmp = 0 if t_3 <= 2e-155: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - t_1))) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))) else: tmp = math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / 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(2.0 * Float64(l_m * Float64(l_m / Om))) t_2 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_2))) tmp = 0.0 if (t_3 <= 2e-155) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - t_1)))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - t_1)))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / 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 = 2.0 * (l_m * (l_m / Om)); t_2 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2))); tmp = 0.0; if (t_3 <= 2e-155) tmp = sqrt((2.0 * n)) * sqrt((U * (t - t_1))); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))); else tmp = sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) + (2.0 * (-1.0 / 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[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[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] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-155], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$2 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_2\right)}\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - t\_1\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.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*))))) < 2.00000000000000003e-155Initial program 8.6%
Simplified24.0%
sqrt-prod31.3%
fma-undefine31.3%
associate-*r*34.4%
+-commutative34.4%
*-commutative34.4%
fma-define34.4%
associate-*r/34.4%
pow234.4%
Applied egg-rr34.4%
*-commutative34.4%
associate-*r/34.4%
Simplified34.4%
Taylor expanded in n around 0 28.2%
unpow231.3%
associate-*r/31.3%
*-commutative31.3%
Applied egg-rr28.2%
if 2.00000000000000003e-155 < (sqrt.f64 (*.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 61.6%
Simplified68.0%
if +inf.0 < (sqrt.f64 (*.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%
Simplified14.5%
Taylor expanded in U around 0 0.8%
associate-/l*0.8%
unpow20.8%
unpow20.8%
times-frac15.1%
unpow215.1%
neg-mul-115.1%
distribute-lft-neg-out15.1%
*-commutative15.1%
Simplified15.1%
Taylor expanded in Om around -inf 17.4%
mul-1-neg17.4%
fma-define17.4%
associate-/l*17.4%
associate-/l*17.5%
Simplified17.5%
Taylor expanded in l around inf 37.6%
Final simplification57.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* l_m (/ l_m Om))))
(t_2 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_3
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_2)))))
(if (<= t_3 2e-155)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t t_1))))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 t_1))))
(*
(* l_m (sqrt 2.0))
(sqrt (* (* n U) (- (/ (* 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 = 2.0 * (l_m * (l_m / Om));
double t_2 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
double tmp;
if (t_3 <= 2e-155) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - t_1)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * (((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 = 2.0 * (l_m * (l_m / Om));
double t_2 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
double tmp;
if (t_3 <= 2e-155) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - t_1)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * (((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 = 2.0 * (l_m * (l_m / Om)) t_2 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_3 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2))) tmp = 0 if t_3 <= 2e-155: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - t_1))) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * (((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(2.0 * Float64(l_m * Float64(l_m / Om))) t_2 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_2))) tmp = 0.0 if (t_3 <= 2e-155) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - t_1)))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - t_1)))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * 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 = 2.0 * (l_m * (l_m / Om)); t_2 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2))); tmp = 0.0; if (t_3 <= 2e-155) tmp = sqrt((2.0 * n)) * sqrt((U * (t - t_1))); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))); else tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * (((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[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[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] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-155], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$2 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_2\right)}\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - t\_1\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.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*))))) < 2.00000000000000003e-155Initial program 8.6%
Simplified24.0%
sqrt-prod31.3%
fma-undefine31.3%
associate-*r*34.4%
+-commutative34.4%
*-commutative34.4%
fma-define34.4%
associate-*r/34.4%
pow234.4%
Applied egg-rr34.4%
*-commutative34.4%
associate-*r/34.4%
Simplified34.4%
Taylor expanded in n around 0 28.2%
unpow231.3%
associate-*r/31.3%
*-commutative31.3%
Applied egg-rr28.2%
if 2.00000000000000003e-155 < (sqrt.f64 (*.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 61.6%
Simplified68.0%
if +inf.0 < (sqrt.f64 (*.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%
Simplified14.5%
Taylor expanded in U around 0 0.8%
associate-/l*0.8%
unpow20.8%
unpow20.8%
times-frac15.1%
unpow215.1%
neg-mul-115.1%
distribute-lft-neg-out15.1%
*-commutative15.1%
Simplified15.1%
Taylor expanded in Om around -inf 17.4%
mul-1-neg17.4%
fma-define17.4%
associate-/l*17.4%
associate-/l*17.5%
Simplified17.5%
Taylor expanded in l around inf 37.6%
*-commutative37.6%
associate-*r*35.6%
*-commutative35.6%
associate-*r/35.6%
metadata-eval35.6%
Simplified35.6%
Final simplification57.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* l_m (/ l_m Om))))
(t_2 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_3
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_2)))))
(if (<= t_3 2e-155)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t t_1))))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 t_1))))
(sqrt
(*
(* 2.0 n)
(+
(/ (* (pow l_m 2.0) (- (/ (* U (* n (- U* U))) Om) (* 2.0 U))) Om)
(* U t))))))))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 * (l_m * (l_m / Om));
double t_2 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
double tmp;
if (t_3 <= 2e-155) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - t_1)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = sqrt(((2.0 * n) * (((pow(l_m, 2.0) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om) + (U * t))));
}
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 = 2.0 * (l_m * (l_m / Om));
double t_2 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
double tmp;
if (t_3 <= 2e-155) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - t_1)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = Math.sqrt(((2.0 * n) * (((Math.pow(l_m, 2.0) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om) + (U * t))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = 2.0 * (l_m * (l_m / Om)) t_2 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_3 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2))) tmp = 0 if t_3 <= 2e-155: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - t_1))) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))) else: tmp = math.sqrt(((2.0 * n) * (((math.pow(l_m, 2.0) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om) + (U * t)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(2.0 * Float64(l_m * Float64(l_m / Om))) t_2 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_2))) tmp = 0.0 if (t_3 <= 2e-155) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - t_1)))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - t_1)))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(Float64((l_m ^ 2.0) * Float64(Float64(Float64(U * Float64(n * Float64(U_42_ - U))) / Om) - Float64(2.0 * U))) / Om) + Float64(U * t)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = 2.0 * (l_m * (l_m / Om)); t_2 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2))); tmp = 0.0; if (t_3 <= 2e-155) tmp = sqrt((2.0 * n)) * sqrt((U * (t - t_1))); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))); else tmp = sqrt(((2.0 * n) * ((((l_m ^ 2.0) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om) + (U * t)))); 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[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[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] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-155], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$2 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(U * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_2\right)}\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - t\_1\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{{l\_m}^{2} \cdot \left(\frac{U \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} - 2 \cdot U\right)}{Om} + U \cdot t\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.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*))))) < 2.00000000000000003e-155Initial program 8.6%
Simplified24.0%
sqrt-prod31.3%
fma-undefine31.3%
associate-*r*34.4%
+-commutative34.4%
*-commutative34.4%
fma-define34.4%
associate-*r/34.4%
pow234.4%
Applied egg-rr34.4%
*-commutative34.4%
associate-*r/34.4%
Simplified34.4%
Taylor expanded in n around 0 28.2%
unpow231.3%
associate-*r/31.3%
*-commutative31.3%
Applied egg-rr28.2%
if 2.00000000000000003e-155 < (sqrt.f64 (*.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 61.6%
Simplified68.0%
if +inf.0 < (sqrt.f64 (*.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%
Simplified14.5%
Taylor expanded in Om around -inf 18.7%
Taylor expanded in l around 0 33.7%
Final simplification56.6%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* l_m (/ l_m Om))))
(t_2 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_3
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_2)))))
(if (<= t_3 2e-155)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t t_1))))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 t_1))))
(pow (* (* 2.0 n) (* U (+ t (* (/ (pow l_m 2.0) Om) -2.0)))) 0.5)))))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 * (l_m * (l_m / Om));
double t_2 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
double tmp;
if (t_3 <= 2e-155) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - t_1)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = pow(((2.0 * n) * (U * (t + ((pow(l_m, 2.0) / Om) * -2.0)))), 0.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 = 2.0 * (l_m * (l_m / Om));
double t_2 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
double tmp;
if (t_3 <= 2e-155) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - t_1)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = Math.pow(((2.0 * n) * (U * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = 2.0 * (l_m * (l_m / Om)) t_2 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_3 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2))) tmp = 0 if t_3 <= 2e-155: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - t_1))) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))) else: tmp = math.pow(((2.0 * n) * (U * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(2.0 * Float64(l_m * Float64(l_m / Om))) t_2 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_2))) tmp = 0.0 if (t_3 <= 2e-155) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - t_1)))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - t_1)))); else tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = 2.0 * (l_m * (l_m / Om)); t_2 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2))); tmp = 0.0; if (t_3 <= 2e-155) tmp = sqrt((2.0 * n)) * sqrt((U * (t - t_1))); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))); else tmp = ((2.0 * n) * (U * (t + (((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; 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[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[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] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-155], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$2 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_2\right)}\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - t\_1\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if (sqrt.f64 (*.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*))))) < 2.00000000000000003e-155Initial program 8.6%
Simplified24.0%
sqrt-prod31.3%
fma-undefine31.3%
associate-*r*34.4%
+-commutative34.4%
*-commutative34.4%
fma-define34.4%
associate-*r/34.4%
pow234.4%
Applied egg-rr34.4%
*-commutative34.4%
associate-*r/34.4%
Simplified34.4%
Taylor expanded in n around 0 28.2%
unpow231.3%
associate-*r/31.3%
*-commutative31.3%
Applied egg-rr28.2%
if 2.00000000000000003e-155 < (sqrt.f64 (*.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 61.6%
Simplified68.0%
if +inf.0 < (sqrt.f64 (*.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%
Simplified14.5%
sqrt-prod10.2%
fma-undefine10.2%
associate-*r*8.2%
+-commutative8.2%
*-commutative8.2%
fma-define8.2%
associate-*r/0.2%
pow20.2%
Applied egg-rr0.2%
*-commutative0.2%
associate-*r/0.2%
Simplified0.2%
Taylor expanded in n around 0 3.0%
*-commutative3.0%
pow1/213.8%
pow1/213.8%
*-commutative13.8%
pow-prod-down31.9%
cancel-sign-sub-inv31.9%
metadata-eval31.9%
Applied egg-rr31.9%
Final simplification56.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)) (- U* U)))
(t_2 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(if (<= t_2 2e-310)
(sqrt
(*
(* 2.0 n)
(*
U
(+
t
(/ (- (* U* (* (pow l_m 2.0) (/ n Om))) (* 2.0 (pow l_m 2.0))) Om)))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
(sqrt (* U (* n (+ (/ (* n U*) (pow Om 2.0)) (* 2.0 (/ -1.0 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)) * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_2 <= 2e-310) {
tmp = sqrt(((2.0 * n) * (U * (t + (((U_42_ * (pow(l_m, 2.0) * (n / Om))) - (2.0 * pow(l_m, 2.0))) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) + (2.0 * (-1.0 / 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)) * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_2 <= 2e-310) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (((U_42_ * (Math.pow(l_m, 2.0) * (n / Om))) - (2.0 * Math.pow(l_m, 2.0))) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / 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)) * (U_42_ - U) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) tmp = 0 if t_2 <= 2e-310: tmp = math.sqrt(((2.0 * n) * (U * (t + (((U_42_ * (math.pow(l_m, 2.0) * (n / Om))) - (2.0 * math.pow(l_m, 2.0))) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / 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(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)) tmp = 0.0 if (t_2 <= 2e-310) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(Float64(U_42_ * Float64((l_m ^ 2.0) * Float64(n / Om))) - Float64(2.0 * (l_m ^ 2.0))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / 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)) * (U_42_ - U); t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); tmp = 0.0; if (t_2 <= 2e-310) tmp = sqrt(((2.0 * n) * (U * (t + (((U_42_ * ((l_m ^ 2.0) * (n / Om))) - (2.0 * (l_m ^ 2.0))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) + (2.0 * (-1.0 / 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 * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $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] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-310], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(N[(U$42$ * N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[Power[l$95$m, 2.0], $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[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
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\right)\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{U* \cdot \left({l\_m}^{2} \cdot \frac{n}{Om}\right) - 2 \cdot {l\_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \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*)))) < 1.999999999999994e-310Initial program 7.2%
Simplified25.5%
Taylor expanded in U around 0 12.1%
associate-/l*17.5%
unpow217.5%
unpow217.5%
times-frac25.5%
unpow225.5%
neg-mul-125.5%
distribute-lft-neg-out25.5%
*-commutative25.5%
Simplified25.5%
Taylor expanded in Om around -inf 28.3%
mul-1-neg28.3%
fma-define28.3%
associate-/l*28.3%
associate-/l*30.9%
Simplified30.9%
Taylor expanded in Om around inf 28.3%
cancel-sign-sub-inv28.3%
mul-1-neg28.3%
associate-/l*28.3%
associate-*r/30.9%
metadata-eval30.9%
Simplified30.9%
if 1.999999999999994e-310 < (*.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 61.6%
Simplified68.0%
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%
Simplified11.8%
Taylor expanded in U around 0 0.9%
associate-/l*0.9%
unpow20.9%
unpow20.9%
times-frac12.6%
unpow212.6%
neg-mul-112.6%
distribute-lft-neg-out12.6%
*-commutative12.6%
Simplified12.6%
Taylor expanded in Om around -inf 12.9%
mul-1-neg12.9%
fma-define12.9%
associate-/l*12.9%
associate-/l*12.9%
Simplified12.9%
Taylor expanded in l around inf 42.8%
Final simplification58.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= n -5e-310)
(pow (* (* 2.0 n) (* U (+ t (* (/ (pow l_m 2.0) Om) -2.0)))) 0.5)
(if (<= n 5.8e+104)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))
(sqrt
(*
(* 2.0 n)
(+ (* U t) (/ (/ (* (* U U*) (* n (pow l_m 2.0))) Om) Om)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= -5e-310) {
tmp = pow(((2.0 * n) * (U * (t + ((pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
} else if (n <= 5.8e+104) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = sqrt(((2.0 * n) * ((U * t) + ((((U * U_42_) * (n * pow(l_m, 2.0))) / Om) / 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 (n <= (-5d-310)) then
tmp = ((2.0d0 * n) * (u * (t + (((l_m ** 2.0d0) / om) * (-2.0d0))))) ** 0.5d0
else if (n <= 5.8d+104) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * (t - (2.0d0 * (l_m * (l_m / om))))))
else
tmp = sqrt(((2.0d0 * n) * ((u * t) + ((((u * u_42) * (n * (l_m ** 2.0d0))) / om) / 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 (n <= -5e-310) {
tmp = Math.pow(((2.0 * n) * (U * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
} else if (n <= 5.8e+104) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((U * t) + ((((U * U_42_) * (n * Math.pow(l_m, 2.0))) / Om) / Om))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= -5e-310: tmp = math.pow(((2.0 * n) * (U * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5) elif n <= 5.8e+104: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))) else: tmp = math.sqrt(((2.0 * n) * ((U * t) + ((((U * U_42_) * (n * math.pow(l_m, 2.0))) / Om) / Om)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= -5e-310) tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; elseif (n <= 5.8e+104) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(U * t) + Float64(Float64(Float64(Float64(U * U_42_) * Float64(n * (l_m ^ 2.0))) / Om) / 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 (n <= -5e-310) tmp = ((2.0 * n) * (U * (t + (((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; elseif (n <= 5.8e+104) tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))); else tmp = sqrt(((2.0 * n) * ((U * t) + ((((U * U_42_) * (n * (l_m ^ 2.0))) / Om) / Om)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, -5e-310], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[n, 5.8e+104], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(U * t), $MachinePrecision] + N[(N[(N[(N[(U * U$42$), $MachinePrecision] * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq -5 \cdot 10^{-310}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;n \leq 5.8 \cdot 10^{+104}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t + \frac{\frac{\left(U \cdot U*\right) \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}}{Om}\right)}\\
\end{array}
\end{array}
if n < -4.999999999999985e-310Initial program 40.6%
Simplified43.6%
sqrt-prod0.0%
fma-undefine0.0%
associate-*r*0.0%
+-commutative0.0%
*-commutative0.0%
fma-define0.0%
associate-*r/0.0%
pow20.0%
Applied egg-rr0.0%
*-commutative0.0%
associate-*r/0.0%
Simplified0.0%
Taylor expanded in n around 0 0.0%
*-commutative0.0%
pow1/20.0%
pow1/20.0%
*-commutative0.0%
pow-prod-down43.6%
cancel-sign-sub-inv43.6%
metadata-eval43.6%
Applied egg-rr43.6%
if -4.999999999999985e-310 < n < 5.7999999999999997e104Initial program 40.0%
Simplified48.8%
sqrt-prod57.8%
fma-undefine57.8%
associate-*r*59.0%
+-commutative59.0%
*-commutative59.0%
fma-define59.0%
associate-*r/51.3%
pow251.3%
Applied egg-rr51.3%
*-commutative51.3%
associate-*r/51.3%
Simplified51.3%
Taylor expanded in n around 0 45.1%
unpow249.1%
associate-*r/57.8%
*-commutative57.8%
Applied egg-rr53.8%
if 5.7999999999999997e104 < n Initial program 58.9%
Simplified69.7%
Taylor expanded in Om around -inf 43.7%
Taylor expanded in U* around inf 65.2%
mul-1-neg65.2%
associate-*r*67.6%
Simplified67.6%
Final simplification51.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (- t (* 2.0 (/ (pow l_m 2.0) Om)))))
(if (<= n -1.6e-134)
(pow (* 2.0 (* (* n U) t_1)) 0.5)
(if (<= n -1e-309)
(sqrt (* 2.0 (* U (* n t_1))))
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = t - (2.0 * (pow(l_m, 2.0) / Om));
double tmp;
if (n <= -1.6e-134) {
tmp = pow((2.0 * ((n * U) * t_1)), 0.5);
} else if (n <= -1e-309) {
tmp = sqrt((2.0 * (U * (n * t_1))));
} else {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * (l_m * (l_m / 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) :: t_1
real(8) :: tmp
t_1 = t - (2.0d0 * ((l_m ** 2.0d0) / om))
if (n <= (-1.6d-134)) then
tmp = (2.0d0 * ((n * u) * t_1)) ** 0.5d0
else if (n <= (-1d-309)) then
tmp = sqrt((2.0d0 * (u * (n * t_1))))
else
tmp = sqrt((2.0d0 * n)) * sqrt((u * (t - (2.0d0 * (l_m * (l_m / 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 t_1 = t - (2.0 * (Math.pow(l_m, 2.0) / Om));
double tmp;
if (n <= -1.6e-134) {
tmp = Math.pow((2.0 * ((n * U) * t_1)), 0.5);
} else if (n <= -1e-309) {
tmp = Math.sqrt((2.0 * (U * (n * t_1))));
} else {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = t - (2.0 * (math.pow(l_m, 2.0) / Om)) tmp = 0 if n <= -1.6e-134: tmp = math.pow((2.0 * ((n * U) * t_1)), 0.5) elif n <= -1e-309: tmp = math.sqrt((2.0 * (U * (n * t_1)))) else: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))) tmp = 0.0 if (n <= -1.6e-134) tmp = Float64(2.0 * Float64(Float64(n * U) * t_1)) ^ 0.5; elseif (n <= -1e-309) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t_1)))); else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = t - (2.0 * ((l_m ^ 2.0) / Om)); tmp = 0.0; if (n <= -1.6e-134) tmp = (2.0 * ((n * U) * t_1)) ^ 0.5; elseif (n <= -1e-309) tmp = sqrt((2.0 * (U * (n * t_1)))); else tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * (l_m * (l_m / 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[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[n, -1.6e-134], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[n, -1e-309], N[Sqrt[N[(2.0 * N[(U * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := t - 2 \cdot \frac{{l\_m}^{2}}{Om}\\
\mathbf{if}\;n \leq -1.6 \cdot 10^{-134}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\_1\right)\right)}^{0.5}\\
\mathbf{elif}\;n \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\end{array}
\end{array}
if n < -1.6000000000000001e-134Initial program 49.4%
Simplified52.9%
Taylor expanded in Om around inf 41.7%
associate-*r/41.7%
Simplified41.7%
pow1/249.0%
associate-*l*49.0%
associate-/l*49.0%
Applied egg-rr49.0%
if -1.6000000000000001e-134 < n < -1.000000000000002e-309Initial program 20.5%
Simplified27.7%
Taylor expanded in n around 0 36.2%
if -1.000000000000002e-309 < n Initial program 46.5%
Simplified55.1%
sqrt-prod64.0%
fma-undefine64.0%
associate-*r*64.0%
+-commutative64.0%
*-commutative64.0%
fma-define64.0%
associate-*r/57.4%
pow257.4%
Applied egg-rr57.4%
*-commutative57.4%
associate-*r/57.4%
Simplified57.4%
Taylor expanded in n around 0 45.6%
unpow256.7%
associate-*r/64.0%
*-commutative64.0%
Applied egg-rr51.9%
Final simplification48.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n -5e-310) (pow (* (* 2.0 n) (* U (+ t (* (/ (pow l_m 2.0) Om) -2.0)))) 0.5) (* (sqrt (* 2.0 n)) (sqrt (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= -5e-310) {
tmp = pow(((2.0 * n) * (U * (t + ((pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
} else {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * (l_m * (l_m / 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 (n <= (-5d-310)) then
tmp = ((2.0d0 * n) * (u * (t + (((l_m ** 2.0d0) / om) * (-2.0d0))))) ** 0.5d0
else
tmp = sqrt((2.0d0 * n)) * sqrt((u * (t - (2.0d0 * (l_m * (l_m / 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 (n <= -5e-310) {
tmp = Math.pow(((2.0 * n) * (U * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
} else {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= -5e-310: tmp = math.pow(((2.0 * n) * (U * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5) else: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= -5e-310) tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / 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 (n <= -5e-310) tmp = ((2.0 * n) * (U * (t + (((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; else tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, -5e-310], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq -5 \cdot 10^{-310}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\end{array}
\end{array}
if n < -4.999999999999985e-310Initial program 40.6%
Simplified43.6%
sqrt-prod0.0%
fma-undefine0.0%
associate-*r*0.0%
+-commutative0.0%
*-commutative0.0%
fma-define0.0%
associate-*r/0.0%
pow20.0%
Applied egg-rr0.0%
*-commutative0.0%
associate-*r/0.0%
Simplified0.0%
Taylor expanded in n around 0 0.0%
*-commutative0.0%
pow1/20.0%
pow1/20.0%
*-commutative0.0%
pow-prod-down43.6%
cancel-sign-sub-inv43.6%
metadata-eval43.6%
Applied egg-rr43.6%
if -4.999999999999985e-310 < n Initial program 46.1%
Simplified55.5%
sqrt-prod64.5%
fma-undefine64.5%
associate-*r*64.5%
+-commutative64.5%
*-commutative64.5%
fma-define64.5%
associate-*r/57.9%
pow257.9%
Applied egg-rr57.9%
*-commutative57.9%
associate-*r/57.9%
Simplified57.9%
Taylor expanded in n around 0 46.0%
unpow257.1%
associate-*r/64.5%
*-commutative64.5%
Applied egg-rr52.3%
Final simplification48.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n -1e-309) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om))))))) (* (sqrt (* 2.0 n)) (sqrt (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= -1e-309) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * (l_m * (l_m / 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 (n <= (-1d-309)) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else
tmp = sqrt((2.0d0 * n)) * sqrt((u * (t - (2.0d0 * (l_m * (l_m / 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 (n <= -1e-309) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= -1e-309: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) else: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= -1e-309) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / 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 (n <= -1e-309) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); else tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, -1e-309], 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[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\end{array}
\end{array}
if n < -1.000000000000002e-309Initial program 40.1%
Simplified43.9%
Taylor expanded in n around 0 39.9%
if -1.000000000000002e-309 < n Initial program 46.5%
Simplified55.1%
sqrt-prod64.0%
fma-undefine64.0%
associate-*r*64.0%
+-commutative64.0%
*-commutative64.0%
fma-define64.0%
associate-*r/57.4%
pow257.4%
Applied egg-rr57.4%
*-commutative57.4%
associate-*r/57.4%
Simplified57.4%
Taylor expanded in n around 0 45.6%
unpow256.7%
associate-*r/64.0%
*-commutative64.0%
Applied egg-rr51.9%
Final simplification46.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n 1.65e+183) (sqrt (* U (* (* 2.0 n) (+ t (/ (* (pow l_m 2.0) -2.0) Om))))) (sqrt (fabs (* 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_) {
double tmp;
if (n <= 1.65e+183) {
tmp = sqrt((U * ((2.0 * n) * (t + ((pow(l_m, 2.0) * -2.0) / Om)))));
} else {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
}
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 (n <= 1.65d+183) then
tmp = sqrt((u * ((2.0d0 * n) * (t + (((l_m ** 2.0d0) * (-2.0d0)) / om)))))
else
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
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 (n <= 1.65e+183) {
tmp = Math.sqrt((U * ((2.0 * n) * (t + ((Math.pow(l_m, 2.0) * -2.0) / Om)))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= 1.65e+183: tmp = math.sqrt((U * ((2.0 * n) * (t + ((math.pow(l_m, 2.0) * -2.0) / Om))))) else: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= 1.65e+183) tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * Float64(t + Float64(Float64((l_m ^ 2.0) * -2.0) / Om))))); else tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (n <= 1.65e+183) tmp = sqrt((U * ((2.0 * n) * (t + (((l_m ^ 2.0) * -2.0) / Om))))); else tmp = sqrt(abs((2.0 * (t * (n * U))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 1.65e+183], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq 1.65 \cdot 10^{+183}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(t + \frac{{l\_m}^{2} \cdot -2}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\end{array}
\end{array}
if n < 1.65000000000000005e183Initial program 41.5%
Simplified47.2%
sqrt-prod27.6%
fma-undefine27.6%
associate-*r*27.7%
+-commutative27.7%
*-commutative27.7%
fma-define27.7%
associate-*r/24.8%
pow224.8%
Applied egg-rr24.8%
*-commutative24.8%
associate-*r/24.8%
Simplified24.8%
Taylor expanded in n around 0 21.5%
pow121.5%
sqrt-unprod39.2%
*-commutative39.2%
cancel-sign-sub-inv39.2%
metadata-eval39.2%
Applied egg-rr39.2%
unpow139.2%
*-commutative39.2%
metadata-eval39.2%
cancel-sign-sub-inv39.2%
associate-*l*39.4%
cancel-sign-sub-inv39.4%
metadata-eval39.4%
associate-*r/39.4%
*-commutative39.4%
*-commutative39.4%
Simplified39.4%
if 1.65000000000000005e183 < n Initial program 62.6%
Simplified75.1%
Taylor expanded in t around inf 28.0%
associate-*r*34.3%
Simplified34.3%
add-sqr-sqrt34.3%
pow1/234.3%
pow1/247.7%
pow-prod-down42.5%
pow242.5%
associate-*l*42.4%
Applied egg-rr42.4%
unpow1/242.4%
unpow242.4%
rem-sqrt-square34.1%
associate-*r*48.8%
Simplified48.8%
Final simplification40.3%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n 5.4e+181) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om))))))) (sqrt (fabs (* 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_) {
double tmp;
if (n <= 5.4e+181) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
}
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 (n <= 5.4d+181) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
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 (n <= 5.4e+181) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= 5.4e+181: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) else: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= 5.4e+181) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); else tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (n <= 5.4e+181) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); else tmp = sqrt(abs((2.0 * (t * (n * U))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 5.4e+181], 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[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq 5.4 \cdot 10^{+181}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\end{array}
\end{array}
if n < 5.40000000000000014e181Initial program 41.5%
Simplified47.2%
Taylor expanded in n around 0 39.4%
if 5.40000000000000014e181 < n Initial program 62.6%
Simplified75.1%
Taylor expanded in t around inf 28.0%
associate-*r*34.3%
Simplified34.3%
add-sqr-sqrt34.3%
pow1/234.3%
pow1/247.7%
pow-prod-down42.5%
pow242.5%
associate-*l*42.4%
Applied egg-rr42.4%
unpow1/242.4%
unpow242.4%
rem-sqrt-square34.1%
associate-*r*48.8%
Simplified48.8%
Final simplification40.2%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= Om -1.6e-26)
(sqrt (fabs (* 2.0 (* t (* n U)))))
(if (<= Om -5.5e-198)
(* (* l_m (/ n Om)) (sqrt (* U (* 2.0 U*))))
(sqrt (fabs (* (* 2.0 U) (* n t)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (Om <= -1.6e-26) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else if (Om <= -5.5e-198) {
tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
} else {
tmp = sqrt(fabs(((2.0 * U) * (n * 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 (om <= (-1.6d-26)) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else if (om <= (-5.5d-198)) then
tmp = (l_m * (n / om)) * sqrt((u * (2.0d0 * u_42)))
else
tmp = sqrt(abs(((2.0d0 * u) * (n * 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 (Om <= -1.6e-26) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else if (Om <= -5.5e-198) {
tmp = (l_m * (n / Om)) * Math.sqrt((U * (2.0 * U_42_)));
} else {
tmp = Math.sqrt(Math.abs(((2.0 * U) * (n * t))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if Om <= -1.6e-26: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) elif Om <= -5.5e-198: tmp = (l_m * (n / Om)) * math.sqrt((U * (2.0 * U_42_))) else: tmp = math.sqrt(math.fabs(((2.0 * U) * (n * t)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (Om <= -1.6e-26) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); elseif (Om <= -5.5e-198) tmp = Float64(Float64(l_m * Float64(n / Om)) * sqrt(Float64(U * Float64(2.0 * U_42_)))); else tmp = sqrt(abs(Float64(Float64(2.0 * U) * Float64(n * 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 (Om <= -1.6e-26) tmp = sqrt(abs((2.0 * (t * (n * U))))); elseif (Om <= -5.5e-198) tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_))); else tmp = sqrt(abs(((2.0 * U) * (n * t)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -1.6e-26], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, -5.5e-198], N[(N[(l$95$m * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[Abs[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.6 \cdot 10^{-26}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{elif}\;Om \leq -5.5 \cdot 10^{-198}:\\
\;\;\;\;\left(l\_m \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot \left(2 \cdot U*\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right|}\\
\end{array}
\end{array}
if Om < -1.6000000000000001e-26Initial program 49.8%
Simplified61.3%
Taylor expanded in t around inf 43.7%
associate-*r*46.9%
Simplified46.9%
add-sqr-sqrt46.9%
pow1/246.9%
pow1/247.1%
pow-prod-down31.4%
pow231.4%
associate-*l*31.4%
Applied egg-rr31.4%
unpow1/231.4%
unpow231.4%
rem-sqrt-square44.5%
associate-*r*47.7%
Simplified47.7%
if -1.6000000000000001e-26 < Om < -5.5000000000000001e-198Initial program 39.4%
Simplified39.4%
Taylor expanded in U around 0 37.5%
associate-/l*37.5%
unpow237.5%
unpow237.5%
times-frac39.7%
unpow239.7%
neg-mul-139.7%
distribute-lft-neg-out39.7%
*-commutative39.7%
Simplified39.7%
add-cube-cbrt39.5%
pow339.5%
Applied egg-rr39.5%
Taylor expanded in n around inf 26.2%
associate-/l*26.2%
rem-cube-cbrt26.4%
*-commutative26.4%
Simplified26.4%
if -5.5000000000000001e-198 < Om Initial program 41.0%
Simplified46.3%
Taylor expanded in t around inf 26.3%
add-sqr-sqrt26.3%
pow1/226.3%
pow1/228.5%
pow-prod-down24.0%
pow224.0%
Applied egg-rr24.0%
unpow1/224.0%
associate-*r*21.3%
associate-*r*21.3%
unpow221.3%
rem-sqrt-square28.7%
associate-*l*28.7%
*-commutative28.7%
associate-*r*32.0%
associate-*r*32.0%
*-commutative32.0%
Simplified32.0%
Final simplification35.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 4.1e+43) (pow (* (* 2.0 n) (* U t)) 0.5) (sqrt (* -4.0 (/ (* U (* n (pow l_m 2.0))) 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 <= 4.1e+43) {
tmp = pow(((2.0 * n) * (U * t)), 0.5);
} else {
tmp = sqrt((-4.0 * ((U * (n * pow(l_m, 2.0))) / 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 <= 4.1d+43) then
tmp = ((2.0d0 * n) * (u * t)) ** 0.5d0
else
tmp = sqrt(((-4.0d0) * ((u * (n * (l_m ** 2.0d0))) / 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 <= 4.1e+43) {
tmp = Math.pow(((2.0 * n) * (U * t)), 0.5);
} else {
tmp = Math.sqrt((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 4.1e+43: tmp = math.pow(((2.0 * n) * (U * t)), 0.5) else: tmp = math.sqrt((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 4.1e+43) tmp = Float64(Float64(2.0 * n) * Float64(U * t)) ^ 0.5; else tmp = sqrt(Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / 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 <= 4.1e+43) tmp = ((2.0 * n) * (U * t)) ^ 0.5; else tmp = sqrt((-4.0 * ((U * (n * (l_m ^ 2.0))) / 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, 4.1e+43], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 4.1 \cdot 10^{+43}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}}\\
\end{array}
\end{array}
if l < 4.1e43Initial program 50.4%
Simplified54.4%
Taylor expanded in t around inf 39.8%
pow1/241.5%
Applied egg-rr41.5%
if 4.1e43 < l Initial program 24.8%
Simplified34.3%
Taylor expanded in Om around inf 19.8%
associate-*r/19.8%
Simplified19.8%
Taylor expanded in t around 0 24.2%
Final simplification36.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n 3.8e-308) (sqrt (fabs (* (* 2.0 U) (* n t)))) (* (sqrt (* 2.0 n)) (sqrt (* U t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= 3.8e-308) {
tmp = sqrt(fabs(((2.0 * U) * (n * t))));
} else {
tmp = sqrt((2.0 * n)) * sqrt((U * 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 (n <= 3.8d-308) then
tmp = sqrt(abs(((2.0d0 * u) * (n * t))))
else
tmp = sqrt((2.0d0 * n)) * sqrt((u * 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 (n <= 3.8e-308) {
tmp = Math.sqrt(Math.abs(((2.0 * U) * (n * t))));
} else {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= 3.8e-308: tmp = math.sqrt(math.fabs(((2.0 * U) * (n * t)))) else: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= 3.8e-308) tmp = sqrt(abs(Float64(Float64(2.0 * U) * Float64(n * t)))); else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * 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 (n <= 3.8e-308) tmp = sqrt(abs(((2.0 * U) * (n * t)))); else tmp = sqrt((2.0 * n)) * sqrt((U * t)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 3.8e-308], N[Sqrt[N[Abs[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq 3.8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\end{array}
\end{array}
if n < 3.79999999999999975e-308Initial program 40.6%
Simplified43.6%
Taylor expanded in t around inf 26.4%
add-sqr-sqrt26.4%
pow1/226.4%
pow1/227.2%
pow-prod-down24.6%
pow224.6%
Applied egg-rr24.6%
unpow1/224.6%
associate-*r*23.2%
associate-*r*23.2%
unpow223.2%
rem-sqrt-square27.5%
associate-*l*27.5%
*-commutative27.5%
associate-*r*31.4%
associate-*r*31.4%
*-commutative31.4%
Simplified31.4%
if 3.79999999999999975e-308 < n Initial program 46.1%
Simplified55.5%
sqrt-prod64.5%
fma-undefine64.5%
associate-*r*64.5%
+-commutative64.5%
*-commutative64.5%
fma-define64.5%
associate-*r/57.9%
pow257.9%
Applied egg-rr57.9%
*-commutative57.9%
associate-*r/57.9%
Simplified57.9%
Taylor expanded in t around inf 40.1%
Final simplification35.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 5.5e+43) (pow (* (* 2.0 n) (* U t)) 0.5) (* (* l_m (/ n Om)) (sqrt (* U (* 2.0 U*))))))
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+43) {
tmp = pow(((2.0 * n) * (U * t)), 0.5);
} else {
tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
}
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+43) then
tmp = ((2.0d0 * n) * (u * t)) ** 0.5d0
else
tmp = (l_m * (n / om)) * sqrt((u * (2.0d0 * u_42)))
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+43) {
tmp = Math.pow(((2.0 * n) * (U * t)), 0.5);
} else {
tmp = (l_m * (n / Om)) * Math.sqrt((U * (2.0 * U_42_)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 5.5e+43: tmp = math.pow(((2.0 * n) * (U * t)), 0.5) else: tmp = (l_m * (n / Om)) * math.sqrt((U * (2.0 * U_42_))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 5.5e+43) tmp = Float64(Float64(2.0 * n) * Float64(U * t)) ^ 0.5; else tmp = Float64(Float64(l_m * Float64(n / Om)) * sqrt(Float64(U * Float64(2.0 * U_42_)))); 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+43) tmp = ((2.0 * n) * (U * t)) ^ 0.5; else tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_))); 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+43], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5.5 \cdot 10^{+43}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot \left(2 \cdot U*\right)}\\
\end{array}
\end{array}
if l < 5.49999999999999989e43Initial program 50.4%
Simplified54.4%
Taylor expanded in t around inf 39.8%
pow1/241.5%
Applied egg-rr41.5%
if 5.49999999999999989e43 < l Initial program 24.8%
Simplified37.3%
Taylor expanded in U around 0 23.1%
associate-/l*27.1%
unpow227.1%
unpow227.1%
times-frac37.5%
unpow237.5%
neg-mul-137.5%
distribute-lft-neg-out37.5%
*-commutative37.5%
Simplified37.5%
add-cube-cbrt37.2%
pow337.3%
Applied egg-rr37.3%
Taylor expanded in n around inf 18.2%
associate-/l*18.2%
rem-cube-cbrt18.4%
*-commutative18.4%
Simplified18.4%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U* 6.8e+39) (pow (* 2.0 (* U (* n t))) 0.5) (pow (* 2.0 (* t (* n U))) 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 (U_42_ <= 6.8e+39) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = pow((2.0 * (t * (n * U))), 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 (u_42 <= 6.8d+39) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = (2.0d0 * (t * (n * u))) ** 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 (U_42_ <= 6.8e+39) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U_42_ <= 6.8e+39: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.pow((2.0 * (t * (n * U))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U_42_ <= 6.8e+39) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 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 (U_42_ <= 6.8e+39) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = (2.0 * (t * (n * U))) ^ 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[U$42$, 6.8e+39], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 6.8 \cdot 10^{+39}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if U* < 6.7999999999999998e39Initial program 40.8%
Simplified48.6%
Taylor expanded in t around inf 32.5%
associate-*r*30.3%
Simplified30.3%
pow1/230.8%
associate-*l*34.1%
Applied egg-rr34.1%
if 6.7999999999999998e39 < U* Initial program 52.6%
Simplified53.7%
Taylor expanded in t around inf 21.5%
pow1/226.8%
associate-*r*34.6%
*-commutative34.6%
Applied egg-rr34.6%
Final simplification34.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (pow (* 2.0 (* U (* n t))) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return pow((2.0 * (U * (n * t))), 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 = (2.0d0 * (u * (n * t))) ** 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((2.0 * (U * (n * t))), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow((2.0 * (U * (n * t))), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = (2.0 * (U * (n * t))) ^ 0.5; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}
\end{array}
Initial program 43.4%
Simplified49.7%
Taylor expanded in t around inf 30.1%
associate-*r*29.7%
Simplified29.7%
pow1/231.7%
associate-*l*32.5%
Applied egg-rr32.5%
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(Float64(2.0 * 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[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}
\end{array}
Initial program 43.4%
Simplified49.7%
Taylor expanded in t around inf 30.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n 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 * (U * (n * 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 * (u * (n * 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 * (U * (n * t))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 43.4%
Simplified49.7%
Taylor expanded in t around inf 30.1%
herbie shell --seed 2024139
(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*))))))