
(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 19 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 (pow (/ l_m Om) 2.0))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* (* n t_1) (- U* U)))))))
(if (<= t_2 0.0)
(*
(sqrt 2.0)
(*
(sqrt (* U (- t (fma 2.0 (/ (pow l_m 2.0) Om) (* t_1 (* n (- U U*)))))))
(sqrt n)))
(if (<= t_2 4e+152)
t_2
(*
(sqrt (* U (* n (- (/ n (/ (pow Om 2.0) (- U* U))) (/ 2.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 = pow((l_m / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * t_1) * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(2.0) * (sqrt((U * (t - fma(2.0, (pow(l_m, 2.0) / Om), (t_1 * (n * (U - U_42_))))))) * sqrt(n));
} else if (t_2 <= 4e+152) {
tmp = t_2;
} else {
tmp = sqrt((U * (n * ((n / (pow(Om, 2.0) / (U_42_ - U))) - (2.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 / Om) ^ 2.0 t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * t_1) * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(U * Float64(t - fma(2.0, Float64((l_m ^ 2.0) / Om), Float64(t_1 * Float64(n * Float64(U - U_42_))))))) * sqrt(n))); elseif (t_2 <= 4e+152) tmp = t_2; else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(n / Float64((Om ^ 2.0) / Float64(U_42_ - U))) - Float64(2.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[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $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] + N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] + N[(t$95$1 * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+152], t$95$2, N[(N[Sqrt[N[(U * N[(n * N[(N[(n / N[(N[Power[Om, 2.0], $MachinePrecision] / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $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(\frac{l_m}{Om}\right)}^{2}\\
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) + \left(n \cdot t_1\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{{l_m}^{2}}{Om}, t_1 \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)} \cdot \sqrt{n}\right)\\
\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+152}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} - \frac{2}{Om}\right)\right)} \cdot \left(l_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 8.5%
Simplified31.5%
associate-*l*31.5%
sqrt-prod31.3%
fma-udef31.3%
associate-*l/31.3%
associate-*r/31.3%
associate--l-31.3%
Applied egg-rr31.3%
*-commutative31.3%
sqrt-prod46.6%
*-commutative46.6%
associate-*r*52.4%
Applied egg-rr52.4%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.0000000000000002e152Initial program 97.3%
if 4.0000000000000002e152 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 23.7%
Simplified29.3%
Taylor expanded in l around inf 23.2%
associate-/l*24.4%
associate-*r/24.4%
metadata-eval24.4%
Simplified24.4%
Final simplification61.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))))
(if (<= t_1 INFINITY)
t_1
(sqrt
(*
(* U -2.0)
(*
(* n (pow l_m 2.0))
(+ (/ 2.0 Om) (/ n (/ (- (pow Om 2.0)) U*))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om))));
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = sqrt(((U * -2.0) * ((n * pow(l_m, 2.0)) * ((2.0 / Om) + (n / (-pow(Om, 2.0) / U_42_))))));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om))));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = Math.sqrt(((U * -2.0) * ((n * Math.pow(l_m, 2.0)) * ((2.0 / Om) + (n / (-Math.pow(Om, 2.0) / U_42_))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) elif t_1 <= math.inf: tmp = t_1 else: tmp = math.sqrt(((U * -2.0) * ((n * math.pow(l_m, 2.0)) * ((2.0 / Om) + (n / (-math.pow(Om, 2.0) / U_42_)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om))))); elseif (t_1 <= Inf) tmp = t_1; else tmp = sqrt(Float64(Float64(U * -2.0) * Float64(Float64(n * (l_m ^ 2.0)) * Float64(Float64(2.0 / Om) + Float64(n / Float64(Float64(-(Om ^ 2.0)) / U_42_)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))); elseif (t_1 <= Inf) tmp = t_1; else tmp = sqrt(((U * -2.0) * ((n * (l_m ^ 2.0)) * ((2.0 / Om) + (n / (-(Om ^ 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$_] := Block[{t$95$1 = 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] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[Sqrt[N[(N[(U * -2.0), $MachinePrecision] * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] + N[(n / N[((-N[Power[Om, 2.0], $MachinePrecision]) / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \frac{2 \cdot {l_m}^{2}}{Om}\right)}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left(\left(n \cdot {l_m}^{2}\right) \cdot \left(\frac{2}{Om} + \frac{n}{\frac{-{Om}^{2}}{U*}}\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 8.5%
Simplified31.5%
sqrt-prod46.8%
fma-udef46.8%
associate-*l/46.8%
associate-*r/46.8%
associate--l-46.8%
associate--l-46.8%
Applied egg-rr46.8%
*-commutative46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in n around 0 47.0%
associate-*r/47.0%
Simplified47.0%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 74.3%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in l around inf 35.4%
associate-*r*35.4%
associate-*r*35.4%
*-commutative35.4%
associate-*r/35.4%
metadata-eval35.4%
associate-/l*38.3%
Simplified38.3%
Taylor expanded in U around 0 38.4%
associate-*r/38.4%
mul-1-neg38.4%
Simplified38.4%
Final simplification66.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))))
(if (<= t_1 4e+152)
t_1
(*
(sqrt (* U (* n (- (/ n (/ (pow Om 2.0) (- U* U))) (/ 2.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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om))));
} else if (t_1 <= 4e+152) {
tmp = t_1;
} else {
tmp = sqrt((U * (n * ((n / (pow(Om, 2.0) / (U_42_ - U))) - (2.0 / Om))))) * (l_m * sqrt(2.0));
}
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 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) + ((n * ((l_m / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 0.0d0) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * (t - ((2.0d0 * (l_m ** 2.0d0)) / om))))
else if (t_1 <= 4d+152) then
tmp = t_1
else
tmp = sqrt((u * (n * ((n / ((om ** 2.0d0) / (u_42 - u))) - (2.0d0 / om))))) * (l_m * sqrt(2.0d0))
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 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om))));
} else if (t_1 <= 4e+152) {
tmp = t_1;
} else {
tmp = Math.sqrt((U * (n * ((n / (Math.pow(Om, 2.0) / (U_42_ - U))) - (2.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 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) elif t_1 <= 4e+152: tmp = t_1 else: tmp = math.sqrt((U * (n * ((n / (math.pow(Om, 2.0) / (U_42_ - U))) - (2.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 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om))))); elseif (t_1 <= 4e+152) tmp = t_1; else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(n / Float64((Om ^ 2.0) / Float64(U_42_ - U))) - Float64(2.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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))); elseif (t_1 <= 4e+152) tmp = t_1; else tmp = sqrt((U * (n * ((n / ((Om ^ 2.0) / (U_42_ - U))) - (2.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[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] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+152], t$95$1, N[(N[Sqrt[N[(U * N[(n * N[(N[(n / N[(N[Power[Om, 2.0], $MachinePrecision] / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $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 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \frac{2 \cdot {l_m}^{2}}{Om}\right)}\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} - \frac{2}{Om}\right)\right)} \cdot \left(l_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 8.5%
Simplified31.5%
sqrt-prod46.8%
fma-udef46.8%
associate-*l/46.8%
associate-*r/46.8%
associate--l-46.8%
associate--l-46.8%
Applied egg-rr46.8%
*-commutative46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in n around 0 47.0%
associate-*r/47.0%
Simplified47.0%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.0000000000000002e152Initial program 97.3%
if 4.0000000000000002e152 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 23.7%
Simplified29.3%
Taylor expanded in l around inf 23.2%
associate-/l*24.4%
associate-*r/24.4%
metadata-eval24.4%
Simplified24.4%
Final simplification61.2%
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)))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U t_1)))
(if (<= t_3 INFINITY) t_3 (cbrt (pow (* t_2 t_1) 1.5))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = t - ((2.0 * pow(l_m, 2.0)) / Om);
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * t_1));
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = cbrt(pow((t_2 * t_1), 1.5));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = t - ((2.0 * Math.pow(l_m, 2.0)) / Om);
double t_2 = (2.0 * n) * U;
double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t_1));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = Math.cbrt(Math.pow((t_2 * t_1), 1.5));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t_1))); elseif (t_3 <= Inf) tmp = t_3; else tmp = cbrt((Float64(t_2 * t_1) ^ 1.5)); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$3, N[Power[N[Power[N[(t$95$2 * t$95$1), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := t - \frac{2 \cdot {l_m}^{2}}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t_1}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(t_2 \cdot t_1\right)}^{1.5}}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 8.5%
Simplified31.5%
sqrt-prod46.8%
fma-udef46.8%
associate-*l/46.8%
associate-*r/46.8%
associate--l-46.8%
associate--l-46.8%
Applied egg-rr46.8%
*-commutative46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in n around 0 47.0%
associate-*r/47.0%
Simplified47.0%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 74.3%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in n around 0 10.1%
add-cbrt-cube7.3%
pow1/36.9%
Applied egg-rr37.8%
unpow1/338.2%
metadata-eval38.2%
cancel-sign-sub-inv38.2%
associate-*r*38.2%
associate-*r*38.2%
associate-*r/38.2%
Simplified38.2%
Final simplification66.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U t)))
(if (<= t_1 INFINITY)
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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
} else if (t_1 <= ((double) INFINITY)) {
tmp = 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 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = 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 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) elif t_1 <= math.inf: tmp = 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 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(2.0 * Float64(Float64(n * 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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * t)); elseif (t_1 <= Inf) tmp = 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[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] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * 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 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \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 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 8.5%
Simplified31.5%
sqrt-prod46.8%
fma-udef46.8%
associate-*l/46.8%
associate-*r/46.8%
associate--l-46.8%
associate--l-46.8%
Applied egg-rr46.8%
*-commutative46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in l around 0 38.4%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 74.3%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in n around 0 10.1%
pow1/241.4%
associate-*r*38.2%
*-commutative38.2%
cancel-sign-sub-inv38.2%
metadata-eval38.2%
Applied egg-rr38.2%
Final simplification64.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))))
(if (<= t_1 INFINITY)
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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om))));
} else if (t_1 <= ((double) INFINITY)) {
tmp = 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 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om))));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = 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 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) elif t_1 <= math.inf: tmp = 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 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om))))); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(2.0 * Float64(Float64(n * 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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))); elseif (t_1 <= Inf) tmp = 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[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] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * 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 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \frac{2 \cdot {l_m}^{2}}{Om}\right)}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \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 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 8.5%
Simplified31.5%
sqrt-prod46.8%
fma-udef46.8%
associate-*l/46.8%
associate-*r/46.8%
associate--l-46.8%
associate--l-46.8%
Applied egg-rr46.8%
*-commutative46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in n around 0 47.0%
associate-*r/47.0%
Simplified47.0%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 74.3%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in n around 0 10.1%
pow1/241.4%
associate-*r*38.2%
*-commutative38.2%
cancel-sign-sub-inv38.2%
metadata-eval38.2%
Applied egg-rr38.2%
Final simplification66.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (/ (pow l_m 2.0) Om)))
(if (<= n -2.2e-189)
(pow (* 2.0 (* (* n U) (+ t (* t_1 -2.0)))) 0.5)
(if (<= n 5.7e-260)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 t_1))))))
(sqrt
(*
(* 2.0 n)
(*
U
(+
(- t (/ (* 2.0 (* l_m l_m)) Om))
(* n (* (pow (/ l_m Om) 2.0) (- U* U)))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = pow(l_m, 2.0) / Om;
double tmp;
if (n <= -2.2e-189) {
tmp = pow((2.0 * ((n * U) * (t + (t_1 * -2.0)))), 0.5);
} else if (n <= 5.7e-260) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
} else {
tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (pow((l_m / Om), 2.0) * (U_42_ - 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) :: t_1
real(8) :: tmp
t_1 = (l_m ** 2.0d0) / om
if (n <= (-2.2d-189)) then
tmp = (2.0d0 * ((n * u) * (t + (t_1 * (-2.0d0))))) ** 0.5d0
else if (n <= 5.7d-260) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * t_1))))))
else
tmp = sqrt(((2.0d0 * n) * (u * ((t - ((2.0d0 * (l_m * l_m)) / om)) + (n * (((l_m / om) ** 2.0d0) * (u_42 - 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 t_1 = Math.pow(l_m, 2.0) / Om;
double tmp;
if (n <= -2.2e-189) {
tmp = Math.pow((2.0 * ((n * U) * (t + (t_1 * -2.0)))), 0.5);
} else if (n <= 5.7e-260) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (Math.pow((l_m / Om), 2.0) * (U_42_ - U)))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.pow(l_m, 2.0) / Om tmp = 0 if n <= -2.2e-189: tmp = math.pow((2.0 * ((n * U) * (t + (t_1 * -2.0)))), 0.5) elif n <= 5.7e-260: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1)))))) else: tmp = math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (math.pow((l_m / Om), 2.0) * (U_42_ - U))))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64((l_m ^ 2.0) / Om) tmp = 0.0 if (n <= -2.2e-189) tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(t_1 * -2.0)))) ^ 0.5; elseif (n <= 5.7e-260) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * t_1)))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(Float64(2.0 * Float64(l_m * l_m)) / Om)) + Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * Float64(U_42_ - U))))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (l_m ^ 2.0) / Om; tmp = 0.0; if (n <= -2.2e-189) tmp = (2.0 * ((n * U) * (t + (t_1 * -2.0)))) ^ 0.5; elseif (n <= 5.7e-260) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * t_1)))))); else tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (((l_m / Om) ^ 2.0) * (U_42_ - U))))))); 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[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]}, If[LessEqual[n, -2.2e-189], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(t$95$1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[n, 5.7e-260], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(N[(2.0 * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{{l_m}^{2}}{Om}\\
\mathbf{if}\;n \leq -2.2 \cdot 10^{-189}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + t_1 \cdot -2\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;n \leq 5.7 \cdot 10^{-260}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot t_1\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(l_m \cdot l_m\right)}{Om}\right) + n \cdot \left({\left(\frac{l_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\
\end{array}
\end{array}
if n < -2.20000000000000019e-189Initial program 55.4%
Taylor expanded in n around 0 42.7%
pow1/254.2%
associate-*r*58.2%
*-commutative58.2%
cancel-sign-sub-inv58.2%
metadata-eval58.2%
Applied egg-rr58.2%
if -2.20000000000000019e-189 < n < 5.6999999999999998e-260Initial program 50.4%
Taylor expanded in n around 0 66.2%
if 5.6999999999999998e-260 < n Initial program 58.0%
Simplified58.7%
Final simplification59.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (/ (pow l_m 2.0) Om))
(t_2 (pow (* 2.0 (* (* n U) (+ t (* t_1 -2.0)))) 0.5)))
(if (<= n -2.3e-189)
t_2
(if (<= n 8.2e-271)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 t_1))))))
(if (<= n 8e-105) (* (sqrt (* 2.0 n)) (sqrt (* U t))) t_2)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = pow(l_m, 2.0) / Om;
double t_2 = pow((2.0 * ((n * U) * (t + (t_1 * -2.0)))), 0.5);
double tmp;
if (n <= -2.3e-189) {
tmp = t_2;
} else if (n <= 8.2e-271) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
} else if (n <= 8e-105) {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (l_m ** 2.0d0) / om
t_2 = (2.0d0 * ((n * u) * (t + (t_1 * (-2.0d0))))) ** 0.5d0
if (n <= (-2.3d-189)) then
tmp = t_2
else if (n <= 8.2d-271) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * t_1))))))
else if (n <= 8d-105) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
else
tmp = t_2
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 = Math.pow(l_m, 2.0) / Om;
double t_2 = Math.pow((2.0 * ((n * U) * (t + (t_1 * -2.0)))), 0.5);
double tmp;
if (n <= -2.3e-189) {
tmp = t_2;
} else if (n <= 8.2e-271) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
} else if (n <= 8e-105) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
} else {
tmp = t_2;
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.pow(l_m, 2.0) / Om t_2 = math.pow((2.0 * ((n * U) * (t + (t_1 * -2.0)))), 0.5) tmp = 0 if n <= -2.3e-189: tmp = t_2 elif n <= 8.2e-271: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1)))))) elif n <= 8e-105: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) else: tmp = t_2 return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64((l_m ^ 2.0) / Om) t_2 = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(t_1 * -2.0)))) ^ 0.5 tmp = 0.0 if (n <= -2.3e-189) tmp = t_2; elseif (n <= 8.2e-271) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * t_1)))))); elseif (n <= 8e-105) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); else tmp = t_2; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (l_m ^ 2.0) / Om; t_2 = (2.0 * ((n * U) * (t + (t_1 * -2.0)))) ^ 0.5; tmp = 0.0; if (n <= -2.3e-189) tmp = t_2; elseif (n <= 8.2e-271) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * t_1)))))); elseif (n <= 8e-105) tmp = sqrt((2.0 * n)) * sqrt((U * t)); else tmp = t_2; 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[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(t$95$1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[n, -2.3e-189], t$95$2, If[LessEqual[n, 8.2e-271], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 8e-105], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{{l_m}^{2}}{Om}\\
t_2 := {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + t_1 \cdot -2\right)\right)\right)}^{0.5}\\
\mathbf{if}\;n \leq -2.3 \cdot 10^{-189}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;n \leq 8.2 \cdot 10^{-271}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot t_1\right)\right)\right)}\\
\mathbf{elif}\;n \leq 8 \cdot 10^{-105}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if n < -2.2999999999999998e-189 or 7.99999999999999972e-105 < n Initial program 58.6%
Taylor expanded in n around 0 43.6%
pow1/253.9%
associate-*r*58.2%
*-commutative58.2%
cancel-sign-sub-inv58.2%
metadata-eval58.2%
Applied egg-rr58.2%
if -2.2999999999999998e-189 < n < 8.2000000000000005e-271Initial program 48.6%
Taylor expanded in n around 0 69.0%
if 8.2000000000000005e-271 < n < 7.99999999999999972e-105Initial program 50.4%
Simplified58.8%
sqrt-prod71.5%
fma-udef71.5%
associate-*l/69.2%
associate-*r/69.2%
associate--l-69.2%
associate--l-69.2%
Applied egg-rr69.2%
*-commutative69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in l around 0 60.5%
Final simplification59.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 8.8e+36) (sqrt (fabs (* (* (* 2.0 n) U) t))) (pow (* -4.0 (* (* n (pow l_m 2.0)) (/ U Om))) 0.5)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 8.8e+36) {
tmp = sqrt(fabs((((2.0 * n) * U) * t)));
} else {
tmp = pow((-4.0 * ((n * pow(l_m, 2.0)) * (U / Om))), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 8.8d+36) then
tmp = sqrt(abs((((2.0d0 * n) * u) * t)))
else
tmp = ((-4.0d0) * ((n * (l_m ** 2.0d0)) * (u / om))) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 8.8e+36) {
tmp = Math.sqrt(Math.abs((((2.0 * n) * U) * t)));
} else {
tmp = Math.pow((-4.0 * ((n * Math.pow(l_m, 2.0)) * (U / Om))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 8.8e+36: tmp = math.sqrt(math.fabs((((2.0 * n) * U) * t))) else: tmp = math.pow((-4.0 * ((n * math.pow(l_m, 2.0)) * (U / Om))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 8.8e+36) tmp = sqrt(abs(Float64(Float64(Float64(2.0 * n) * U) * t))); else tmp = Float64(-4.0 * Float64(Float64(n * (l_m ^ 2.0)) * Float64(U / Om))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 8.8e+36) tmp = sqrt(abs((((2.0 * n) * U) * t))); else tmp = (-4.0 * ((n * (l_m ^ 2.0)) * (U / Om))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 8.8e+36], N[Sqrt[N[Abs[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(U / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 8.8 \cdot 10^{+36}:\\
\;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \left(\left(n \cdot {l_m}^{2}\right) \cdot \frac{U}{Om}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 8.80000000000000002e36Initial program 58.7%
Simplified59.9%
Taylor expanded in l around 0 44.5%
expm1-log1p-u43.2%
expm1-udef25.7%
associate-*r*28.1%
*-commutative28.1%
Applied egg-rr28.1%
expm1-def45.1%
expm1-log1p46.6%
associate-*r*46.6%
associate-*r*46.6%
Simplified46.6%
add-sqr-sqrt46.6%
pow1/246.6%
pow1/249.0%
pow-prod-down37.5%
pow237.5%
*-commutative37.5%
*-commutative37.5%
Applied egg-rr37.5%
unpow1/237.5%
unpow237.5%
rem-sqrt-square49.6%
*-commutative49.6%
Simplified49.6%
if 8.80000000000000002e36 < l Initial program 42.1%
Taylor expanded in n around 0 34.7%
Taylor expanded in t around 0 25.4%
associate-/l*25.5%
*-commutative25.5%
Simplified25.5%
pow1/244.6%
associate-*r*44.6%
metadata-eval44.6%
associate-/r/44.3%
Applied egg-rr44.3%
Final simplification48.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 8.5e+36) (sqrt (fabs (* (* (* 2.0 n) U) t))) (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 <= 8.5e+36) {
tmp = sqrt(fabs((((2.0 * n) * U) * t)));
} 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 <= 8.5d+36) then
tmp = sqrt(abs((((2.0d0 * n) * u) * t)))
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 <= 8.5e+36) {
tmp = Math.sqrt(Math.abs((((2.0 * n) * U) * t)));
} 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 <= 8.5e+36: tmp = math.sqrt(math.fabs((((2.0 * n) * U) * t))) 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 <= 8.5e+36) tmp = sqrt(abs(Float64(Float64(Float64(2.0 * n) * U) * t))); 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 <= 8.5e+36) tmp = sqrt(abs((((2.0 * n) * U) * t))); 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, 8.5e+36], N[Sqrt[N[Abs[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $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 8.5 \cdot 10^{+36}:\\
\;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l_m}^{2}\right)}{Om}}\\
\end{array}
\end{array}
if l < 8.50000000000000014e36Initial program 58.7%
Simplified59.9%
Taylor expanded in l around 0 44.5%
expm1-log1p-u43.2%
expm1-udef25.7%
associate-*r*28.1%
*-commutative28.1%
Applied egg-rr28.1%
expm1-def45.1%
expm1-log1p46.6%
associate-*r*46.6%
associate-*r*46.6%
Simplified46.6%
add-sqr-sqrt46.6%
pow1/246.6%
pow1/249.0%
pow-prod-down37.5%
pow237.5%
*-commutative37.5%
*-commutative37.5%
Applied egg-rr37.5%
unpow1/237.5%
unpow237.5%
rem-sqrt-square49.6%
*-commutative49.6%
Simplified49.6%
if 8.50000000000000014e36 < l Initial program 42.1%
Taylor expanded in n around 0 34.7%
add-cbrt-cube32.1%
pow1/330.7%
Applied egg-rr47.4%
unpow1/348.6%
metadata-eval48.6%
cancel-sign-sub-inv48.6%
associate-*r*48.6%
associate-*r*48.6%
associate-*r/48.6%
Simplified48.6%
pow1/347.4%
pow-pow48.9%
metadata-eval48.9%
pow1/232.1%
associate-*l*34.6%
associate-/l*34.6%
Applied egg-rr34.6%
Taylor expanded in t around 0 25.4%
Final simplification45.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 5.2e-78) (sqrt (fabs (* (* (* 2.0 n) U) t))) (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_) {
double tmp;
if (l_m <= 5.2e-78) {
tmp = sqrt(fabs((((2.0 * n) * U) * t)));
} else {
tmp = pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 5.2d-78) then
tmp = sqrt(abs((((2.0d0 * n) * u) * t)))
else
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5.2e-78) {
tmp = Math.sqrt(Math.abs((((2.0 * n) * U) * t)));
} else {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 5.2e-78: tmp = math.sqrt(math.fabs((((2.0 * n) * U) * t))) else: tmp = math.pow((2.0 * (U * (n * t))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 5.2e-78) tmp = sqrt(abs(Float64(Float64(Float64(2.0 * n) * U) * t))); else tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 5.2e-78) tmp = sqrt(abs((((2.0 * n) * U) * t))); else tmp = (2.0 * (U * (n * t))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 5.2e-78], N[Sqrt[N[Abs[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 5.2 \cdot 10^{-78}:\\
\;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 5.2000000000000002e-78Initial program 57.9%
Simplified59.3%
Taylor expanded in l around 0 42.6%
expm1-log1p-u41.5%
expm1-udef24.4%
associate-*r*27.1%
*-commutative27.1%
Applied egg-rr27.1%
expm1-def44.0%
expm1-log1p45.5%
associate-*r*45.5%
associate-*r*45.5%
Simplified45.5%
add-sqr-sqrt45.5%
pow1/245.5%
pow1/247.7%
pow-prod-down35.8%
pow235.8%
*-commutative35.8%
*-commutative35.8%
Applied egg-rr35.8%
unpow1/235.8%
unpow235.8%
rem-sqrt-square48.3%
*-commutative48.3%
Simplified48.3%
if 5.2000000000000002e-78 < l Initial program 50.1%
Taylor expanded in n around 0 46.5%
pow1/259.3%
associate-*r*53.2%
*-commutative53.2%
cancel-sign-sub-inv53.2%
metadata-eval53.2%
Applied egg-rr53.2%
Taylor expanded in t around inf 31.7%
Final simplification44.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U 1.95e-236) (sqrt (fabs (* (* (* 2.0 n) U) t))) (* (sqrt (* 2.0 U)) (sqrt (* 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 (U <= 1.95e-236) {
tmp = sqrt(fabs((((2.0 * n) * U) * t)));
} else {
tmp = sqrt((2.0 * U)) * sqrt((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 (u <= 1.95d-236) then
tmp = sqrt(abs((((2.0d0 * n) * u) * t)))
else
tmp = sqrt((2.0d0 * u)) * sqrt((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 (U <= 1.95e-236) {
tmp = Math.sqrt(Math.abs((((2.0 * n) * U) * t)));
} else {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= 1.95e-236: tmp = math.sqrt(math.fabs((((2.0 * n) * U) * t))) else: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= 1.95e-236) tmp = sqrt(abs(Float64(Float64(Float64(2.0 * n) * U) * t))); else tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(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 (U <= 1.95e-236) tmp = sqrt(abs((((2.0 * n) * U) * t))); else tmp = sqrt((2.0 * U)) * sqrt((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[U, 1.95e-236], N[Sqrt[N[Abs[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.95 \cdot 10^{-236}:\\
\;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\end{array}
\end{array}
if U < 1.95e-236Initial program 56.5%
Simplified57.3%
Taylor expanded in l around 0 35.6%
expm1-log1p-u34.6%
expm1-udef21.3%
associate-*r*25.9%
*-commutative25.9%
Applied egg-rr25.9%
expm1-def39.8%
expm1-log1p41.1%
associate-*r*41.1%
associate-*r*41.1%
Simplified41.1%
add-sqr-sqrt41.1%
pow1/241.1%
pow1/243.8%
pow-prod-down34.0%
pow234.0%
*-commutative34.0%
*-commutative34.0%
Applied egg-rr34.0%
unpow1/234.0%
unpow234.0%
rem-sqrt-square44.5%
*-commutative44.5%
Simplified44.5%
if 1.95e-236 < U Initial program 55.1%
Simplified54.9%
Taylor expanded in l around 0 44.0%
pow1/247.0%
associate-*r*47.0%
unpow-prod-down54.2%
pow1/252.2%
Applied egg-rr52.2%
unpow1/252.2%
*-commutative52.2%
Simplified52.2%
Final simplification47.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.06e-80) (sqrt (* (* 2.0 n) (* U t))) (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_) {
double tmp;
if (l_m <= 1.06e-80) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 1.06d-80) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 1.06e-80) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.06e-80: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.pow((2.0 * (U * (n * t))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.06e-80) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 1.06e-80) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = (2.0 * (U * (n * t))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 1.06e-80], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 1.06 \cdot 10^{-80}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.0600000000000001e-80Initial program 58.0%
Taylor expanded in n around 0 47.4%
add-cbrt-cube39.3%
pow1/337.3%
Applied egg-rr44.2%
unpow1/346.2%
metadata-eval46.2%
cancel-sign-sub-inv46.2%
associate-*r*46.2%
associate-*r*46.2%
associate-*r/46.2%
Simplified46.2%
pow1/344.2%
pow-pow55.9%
metadata-eval55.9%
pow1/250.3%
associate-*l*51.2%
associate-/l*51.2%
Applied egg-rr51.2%
Taylor expanded in t around inf 44.8%
if 1.0600000000000001e-80 < l Initial program 50.1%
Taylor expanded in n around 0 46.6%
pow1/259.0%
associate-*r*53.1%
*-commutative53.1%
cancel-sign-sub-inv53.1%
metadata-eval53.1%
Applied egg-rr53.1%
Taylor expanded in t around inf 32.2%
Final simplification41.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 8e-81) (pow (* 2.0 (* t (* n U))) 0.5) (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_) {
double tmp;
if (l_m <= 8e-81) {
tmp = pow((2.0 * (t * (n * U))), 0.5);
} else {
tmp = pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 8d-81) then
tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
else
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 8e-81) {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
} else {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 8e-81: tmp = math.pow((2.0 * (t * (n * U))), 0.5) else: tmp = math.pow((2.0 * (U * (n * t))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 8e-81) tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5; else tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 8e-81) tmp = (2.0 * (t * (n * U))) ^ 0.5; else tmp = (2.0 * (U * (n * t))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 8e-81], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 8 \cdot 10^{-81}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 7.9999999999999997e-81Initial program 58.0%
Simplified59.4%
Taylor expanded in l around 0 42.5%
pow1/245.2%
associate-*r*47.6%
*-commutative47.6%
Applied egg-rr47.6%
if 7.9999999999999997e-81 < l Initial program 50.1%
Taylor expanded in n around 0 46.6%
pow1/259.0%
associate-*r*53.1%
*-commutative53.1%
cancel-sign-sub-inv53.1%
metadata-eval53.1%
Applied egg-rr53.1%
Taylor expanded in t around inf 32.2%
Final simplification43.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.65e-80) (pow (* (* (* 2.0 n) U) t) 0.5) (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_) {
double tmp;
if (l_m <= 1.65e-80) {
tmp = pow((((2.0 * n) * U) * t), 0.5);
} else {
tmp = pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 1.65d-80) then
tmp = (((2.0d0 * n) * u) * t) ** 0.5d0
else
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 1.65e-80) {
tmp = Math.pow((((2.0 * n) * U) * t), 0.5);
} else {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.65e-80: tmp = math.pow((((2.0 * n) * U) * t), 0.5) else: tmp = math.pow((2.0 * (U * (n * t))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.65e-80) tmp = Float64(Float64(Float64(2.0 * n) * U) * t) ^ 0.5; else tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 1.65e-80) tmp = (((2.0 * n) * U) * t) ^ 0.5; else tmp = (2.0 * (U * (n * t))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 1.65e-80], N[Power[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 1.65 \cdot 10^{-80}:\\
\;\;\;\;{\left(\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.65e-80Initial program 58.0%
Simplified59.4%
Taylor expanded in l around 0 42.5%
expm1-log1p-u41.4%
expm1-udef24.7%
associate-*r*27.4%
*-commutative27.4%
Applied egg-rr27.4%
expm1-def43.9%
expm1-log1p45.4%
associate-*r*45.4%
associate-*r*45.4%
Simplified45.4%
pow1/247.6%
*-commutative47.6%
*-commutative47.6%
Applied egg-rr47.6%
if 1.65e-80 < l Initial program 50.1%
Taylor expanded in n around 0 46.6%
pow1/259.0%
associate-*r*53.1%
*-commutative53.1%
cancel-sign-sub-inv53.1%
metadata-eval53.1%
Applied egg-rr53.1%
Taylor expanded in t around inf 32.2%
Final simplification43.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.1e-80) (sqrt (* 2.0 (* t (* n U)))) (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_) {
double tmp;
if (l_m <= 1.1e-80) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt((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 (l_m <= 1.1d-80) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt((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 (l_m <= 1.1e-80) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt((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 l_m <= 1.1e-80: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt((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 (l_m <= 1.1e-80) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(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 (l_m <= 1.1e-80) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt((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[l$95$m, 1.1e-80], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 1.1 \cdot 10^{-80}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 1.10000000000000005e-80Initial program 58.0%
Simplified59.4%
Taylor expanded in l around 0 45.4%
if 1.10000000000000005e-80 < l Initial program 50.1%
Simplified47.7%
Taylor expanded in l around 0 29.1%
Final simplification41.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.8e-80) (sqrt (* (* 2.0 n) (* U t))) (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_) {
double tmp;
if (l_m <= 1.8e-80) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = sqrt((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 (l_m <= 1.8d-80) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = sqrt((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 (l_m <= 1.8e-80) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.sqrt((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 l_m <= 1.8e-80: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.sqrt((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 (l_m <= 1.8e-80) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = sqrt(Float64(2.0 * Float64(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 (l_m <= 1.8e-80) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = sqrt((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[l$95$m, 1.8e-80], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 1.8 \cdot 10^{-80}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 1.8e-80Initial program 58.0%
Taylor expanded in n around 0 47.4%
add-cbrt-cube39.3%
pow1/337.3%
Applied egg-rr44.2%
unpow1/346.2%
metadata-eval46.2%
cancel-sign-sub-inv46.2%
associate-*r*46.2%
associate-*r*46.2%
associate-*r/46.2%
Simplified46.2%
pow1/344.2%
pow-pow55.9%
metadata-eval55.9%
pow1/250.3%
associate-*l*51.2%
associate-/l*51.2%
Applied egg-rr51.2%
Taylor expanded in t around inf 44.8%
if 1.8e-80 < l Initial program 50.1%
Simplified47.7%
Taylor expanded in l around 0 29.1%
Final simplification40.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.5e-80) (sqrt (* (* 2.0 n) (* U t))) (sqrt (* U (* (* 2.0 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 (l_m <= 1.5e-80) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = sqrt((U * ((2.0 * 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 (l_m <= 1.5d-80) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = sqrt((u * ((2.0d0 * 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 (l_m <= 1.5e-80) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.sqrt((U * ((2.0 * n) * t)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.5e-80: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.sqrt((U * ((2.0 * n) * t))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.5e-80) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = sqrt(Float64(U * Float64(Float64(2.0 * 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 (l_m <= 1.5e-80) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = sqrt((U * ((2.0 * 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[l$95$m, 1.5e-80], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 1.5 \cdot 10^{-80}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot t\right)}\\
\end{array}
\end{array}
if l < 1.50000000000000004e-80Initial program 58.0%
Taylor expanded in n around 0 47.4%
add-cbrt-cube39.3%
pow1/337.3%
Applied egg-rr44.2%
unpow1/346.2%
metadata-eval46.2%
cancel-sign-sub-inv46.2%
associate-*r*46.2%
associate-*r*46.2%
associate-*r/46.2%
Simplified46.2%
pow1/344.2%
pow-pow55.9%
metadata-eval55.9%
pow1/250.3%
associate-*l*51.2%
associate-/l*51.2%
Applied egg-rr51.2%
Taylor expanded in t around inf 44.8%
if 1.50000000000000004e-80 < l Initial program 50.1%
Simplified47.7%
Taylor expanded in l around 0 29.1%
expm1-log1p-u28.2%
expm1-udef17.8%
associate-*r*19.3%
*-commutative19.3%
Applied egg-rr19.3%
expm1-def26.9%
expm1-log1p27.8%
associate-*r*27.8%
associate-*r*27.8%
Simplified27.8%
Taylor expanded in n around 0 29.1%
associate-*r*29.1%
Simplified29.1%
associate-*r*27.8%
*-commutative27.8%
associate-*r*27.8%
*-commutative27.8%
expm1-log1p-u26.9%
expm1-udef19.3%
*-commutative19.3%
Applied egg-rr19.3%
expm1-def26.9%
expm1-log1p27.8%
associate-*r*29.4%
*-commutative29.4%
Simplified29.4%
Final simplification40.8%
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 55.9%
Simplified56.3%
Taylor expanded in l around 0 39.0%
Final simplification39.0%
herbie shell --seed 2023337
(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*))))))