
(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 17 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 (* l_m (sqrt 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_2 5e-145)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(if (<= t_2 2e+144)
t_2
(if (<= t_2 INFINITY)
(*
(sqrt
(fabs (* (* n U) (fma n (* (pow Om -2.0) (- U* U)) (/ -2.0 Om)))))
t_1)
(*
t_1
(sqrt (* U (* n (- (/ (* n U*) (pow Om 2.0)) (/ 2.0 Om)))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = l_m * sqrt(2.0);
double t_2 = 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_2 <= 5e-145) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else if (t_2 <= 2e+144) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(fabs(((n * U) * fma(n, (pow(Om, -2.0) * (U_42_ - U)), (-2.0 / Om))))) * t_1;
} else {
tmp = t_1 * sqrt((U * (n * (((n * U_42_) / 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(l_m * sqrt(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 * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 5e-145) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); elseif (t_2 <= 2e+144) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(sqrt(abs(Float64(Float64(n * U) * fma(n, Float64((Om ^ -2.0) * Float64(U_42_ - U)), Float64(-2.0 / Om))))) * t_1); else tmp = Float64(t_1 * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om)))))); 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[Sqrt[2.0], $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] + 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$2, 5e-145], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 2e+144], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[Sqrt[N[Abs[N[(N[(n * U), $MachinePrecision] * N[(n * N[(N[Power[Om, -2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := l_m \cdot \sqrt{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 {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+144}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {Om}^{-2} \cdot \left(U* - U\right), \frac{-2}{Om}\right)\right|} \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\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*))))) < 4.9999999999999998e-145Initial program 12.6%
Simplified38.8%
Taylor expanded in n around 0 44.7%
if 4.9999999999999998e-145 < (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*))))) < 2.00000000000000005e144Initial program 98.8%
if 2.00000000000000005e144 < (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 31.4%
Simplified39.9%
Taylor expanded in l around inf 19.1%
associate-*r/19.1%
metadata-eval19.1%
Simplified19.1%
add-sqr-sqrt19.1%
pow1/219.1%
pow1/219.3%
pow-prod-down17.5%
Applied egg-rr18.6%
unpow1/218.6%
unpow218.6%
rem-sqrt-square21.6%
associate-*l*23.8%
metadata-eval23.8%
associate-*r/23.8%
fma-neg23.8%
associate-*r/23.8%
metadata-eval23.8%
distribute-neg-frac23.8%
metadata-eval23.8%
Simplified23.8%
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%
Simplified7.1%
Taylor expanded in l around inf 31.2%
associate-*r/31.2%
metadata-eval31.2%
Simplified31.2%
Taylor expanded in U* around inf 31.2%
Final simplification52.3%
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 5e-145)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(if (<= t_1 2e+144)
t_1
(*
(* l_m (sqrt 2.0))
(sqrt (* U (* n (- (/ (* n U*) (pow Om 2.0)) (/ 2.0 Om))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = 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 <= 5e-145) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else if (t_1 <= 2e+144) {
tmp = t_1;
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) - (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) :: 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 <= 5d-145) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else if (t_1 <= 2d+144) then
tmp = t_1
else
tmp = (l_m * sqrt(2.0d0)) * sqrt((u * (n * (((n * u_42) / (om ** 2.0d0)) - (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 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 <= 5e-145) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else if (t_1 <= 2e+144) {
tmp = t_1;
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = 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 <= 5e-145: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) elif t_1 <= 2e+144: tmp = t_1 else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = 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 <= 5e-145) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); elseif (t_1 <= 2e+144) tmp = t_1; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = 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 <= 5e-145) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); elseif (t_1 <= 2e+144) tmp = t_1; else tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) - (2.0 / Om))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[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, 5e-145], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 2e+144], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \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 5 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if (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.9999999999999998e-145Initial program 12.6%
Simplified38.8%
Taylor expanded in n around 0 44.7%
if 4.9999999999999998e-145 < (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*))))) < 2.00000000000000005e144Initial program 98.8%
if 2.00000000000000005e144 < (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 21.9%
Simplified30.0%
Taylor expanded in l around inf 22.8%
associate-*r/22.8%
metadata-eval22.8%
Simplified22.8%
Taylor expanded in U* around inf 23.0%
Final simplification50.6%
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 5e-145)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(if (<= t_1 2e+144)
t_1
(*
(* l_m (sqrt 2.0))
(sqrt (* (* n U) (- (/ U* (/ (pow Om 2.0) n)) (/ 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 = 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 <= 5e-145) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else if (t_1 <= 2e+144) {
tmp = t_1;
} else {
tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ / (pow(Om, 2.0) / n)) - (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) :: 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 <= 5d-145) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else if (t_1 <= 2d+144) then
tmp = t_1
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((n * u) * ((u_42 / ((om ** 2.0d0) / n)) - (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 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 <= 5e-145) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else if (t_1 <= 2e+144) {
tmp = t_1;
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * ((U_42_ / (Math.pow(Om, 2.0) / n)) - (2.0 / Om))));
}
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 <= 5e-145: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) elif t_1 <= 2e+144: tmp = t_1 else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * ((U_42_ / (math.pow(Om, 2.0) / n)) - (2.0 / Om)))) 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 <= 5e-145) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); elseif (t_1 <= 2e+144) tmp = t_1; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(U_42_ / Float64((Om ^ 2.0) / n)) - 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 = 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 <= 5e-145) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); elseif (t_1 <= 2e+144) tmp = t_1; else tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ / ((Om ^ 2.0) / n)) - (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[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, 5e-145], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 2e+144], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(U$42$ / N[(N[Power[Om, 2.0], $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $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 5 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{U*}{\frac{{Om}^{2}}{n}} - \frac{2}{Om}\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*))))) < 4.9999999999999998e-145Initial program 12.6%
Simplified38.8%
Taylor expanded in n around 0 44.7%
if 4.9999999999999998e-145 < (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*))))) < 2.00000000000000005e144Initial program 98.8%
if 2.00000000000000005e144 < (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 21.9%
Simplified30.0%
Taylor expanded in l around inf 22.8%
associate-*r/22.8%
metadata-eval22.8%
Simplified22.8%
Taylor expanded in U around 0 23.0%
associate-*r*23.7%
*-commutative23.7%
associate-/l*23.2%
associate-*r/23.2%
metadata-eval23.2%
Simplified23.2%
Final simplification50.7%
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
(*
(* (* 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 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_2 5e+288)
(sqrt t_2)
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 n)
(* U (+ (- t (/ (* 2.0 (* l_m l_m)) Om)) (* n (* t_1 (- U* U)))))))
(pow (* 2.0 (* -2.0 (/ U (/ Om (* n (pow l_m 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 = pow((l_m / Om), 2.0);
double t_2 = ((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 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_2 <= 5e+288) {
tmp = sqrt(t_2);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (t_1 * (U_42_ - U)))))));
} else {
tmp = pow((2.0 * (-2.0 * (U / (Om / (n * pow(l_m, 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.pow((l_m / Om), 2.0);
double t_2 = ((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 = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_2 <= 5e+288) {
tmp = Math.sqrt(t_2);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (t_1 * (U_42_ - U)))))));
} else {
tmp = Math.pow((2.0 * (-2.0 * (U / (Om / (n * Math.pow(l_m, 2.0)))))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.pow((l_m / Om), 2.0) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * t_1) * (U_42_ - U))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_2 <= 5e+288: tmp = math.sqrt(t_2) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (t_1 * (U_42_ - U))))))) else: tmp = math.pow((2.0 * (-2.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))), 0.5) 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 = 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 = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_2 <= 5e+288) tmp = sqrt(t_2); elseif (t_2 <= Inf) 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(t_1 * Float64(U_42_ - U))))))); else tmp = Float64(2.0 * Float64(-2.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 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 = (l_m / Om) ^ 2.0; t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * t_1) * (U_42_ - U))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_2 <= 5e+288) tmp = sqrt(t_2); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (t_1 * (U_42_ - U))))))); else tmp = (2.0 * (-2.0 * (U / (Om / (n * (l_m ^ 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[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 5e+288], N[Sqrt[t$95$2], $MachinePrecision], If[LessEqual[t$95$2, Infinity], 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[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(-2.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := {\left(\frac{l_m}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot t_1\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+288}:\\
\;\;\;\;\sqrt{t_2}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\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(t_1 \cdot \left(U* - U\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 0.0Initial program 5.4%
Simplified39.3%
Taylor expanded in Om around inf 41.7%
if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5.0000000000000003e288Initial program 98.9%
if 5.0000000000000003e288 < (*.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 31.4%
Simplified37.9%
if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) Initial program 0.0%
Simplified5.6%
Taylor expanded in n around 0 1.6%
pow1/239.1%
associate-*r*35.6%
*-commutative35.6%
cancel-sign-sub-inv35.6%
metadata-eval35.6%
Applied egg-rr35.6%
Taylor expanded in t around 0 42.2%
associate-/l*42.3%
*-commutative42.3%
Simplified42.3%
Final simplification59.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 2.1e-31)
(sqrt
(*
(* 2.0 n)
(*
U
(+
(- t (/ (* 2.0 (* l_m l_m)) Om))
(* n (* (pow (/ l_m Om) 2.0) (- U* U)))))))
(if (<= l_m 2.45e+218)
(pow (* 2.0 (* (* n U) (+ t (* (/ (pow l_m 2.0) Om) -2.0)))) 0.5)
(* (* l_m (sqrt 2.0)) (pow (/ (* (* n U) -2.0) Om) 0.5)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2.1e-31) {
tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (pow((l_m / Om), 2.0) * (U_42_ - U)))))));
} else if (l_m <= 2.45e+218) {
tmp = pow((2.0 * ((n * U) * (t + ((pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
} else {
tmp = (l_m * sqrt(2.0)) * pow((((n * U) * -2.0) / Om), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 2.1d-31) then
tmp = sqrt(((2.0d0 * n) * (u * ((t - ((2.0d0 * (l_m * l_m)) / om)) + (n * (((l_m / om) ** 2.0d0) * (u_42 - u)))))))
else if (l_m <= 2.45d+218) then
tmp = (2.0d0 * ((n * u) * (t + (((l_m ** 2.0d0) / om) * (-2.0d0))))) ** 0.5d0
else
tmp = (l_m * sqrt(2.0d0)) * ((((n * u) * (-2.0d0)) / om) ** 0.5d0)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2.1e-31) {
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)))))));
} else if (l_m <= 2.45e+218) {
tmp = Math.pow((2.0 * ((n * U) * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.pow((((n * U) * -2.0) / Om), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 2.1e-31: 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))))))) elif l_m <= 2.45e+218: tmp = math.pow((2.0 * ((n * U) * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5) else: tmp = (l_m * math.sqrt(2.0)) * math.pow((((n * U) * -2.0) / Om), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 2.1e-31) 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))))))); elseif (l_m <= 2.45e+218) tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; else tmp = Float64(Float64(l_m * sqrt(2.0)) * (Float64(Float64(Float64(n * U) * -2.0) / Om) ^ 0.5)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 2.1e-31) tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (((l_m / Om) ^ 2.0) * (U_42_ - U))))))); elseif (l_m <= 2.45e+218) tmp = (2.0 * ((n * U) * (t + (((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; else tmp = (l_m * sqrt(2.0)) * ((((n * U) * -2.0) / Om) ^ 0.5); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2.1e-31], 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], If[LessEqual[l$95$m, 2.45e+218], 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], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 2.1 \cdot 10^{-31}:\\
\;\;\;\;\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)}\\
\mathbf{elif}\;l_m \leq 2.45 \cdot 10^{+218}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \frac{{l_m}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 2.09999999999999991e-31Initial program 50.3%
Simplified52.6%
if 2.09999999999999991e-31 < l < 2.4499999999999999e218Initial program 41.9%
Simplified46.4%
Taylor expanded in n around 0 41.5%
pow1/257.9%
associate-*r*47.8%
*-commutative47.8%
cancel-sign-sub-inv47.8%
metadata-eval47.8%
Applied egg-rr47.8%
if 2.4499999999999999e218 < l Initial program 23.3%
Simplified27.1%
Taylor expanded in l around inf 70.1%
associate-*r/70.1%
metadata-eval70.1%
Simplified70.1%
add-sqr-sqrt70.1%
pow270.1%
associate-*r*75.1%
*-commutative75.1%
div-inv75.1%
pow-flip75.1%
metadata-eval75.1%
Applied egg-rr75.1%
Taylor expanded in Om around inf 25.4%
Taylor expanded in n around 0 17.0%
Simplified46.2%
Final simplification51.2%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 3.8e-39)
(pow (* 2.0 (* n (* U t))) 0.5)
(if (<= l_m 1.6e+145)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(if (<= l_m 2.3e+218)
(pow (* 2.0 (* -2.0 (/ U (/ Om (* n (pow l_m 2.0)))))) 0.5)
(* (* l_m (sqrt 2.0)) (pow (/ (* (* n U) -2.0) Om) 0.5))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 3.8e-39) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else if (l_m <= 1.6e+145) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else if (l_m <= 2.3e+218) {
tmp = pow((2.0 * (-2.0 * (U / (Om / (n * pow(l_m, 2.0)))))), 0.5);
} else {
tmp = (l_m * sqrt(2.0)) * pow((((n * U) * -2.0) / Om), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 3.8d-39) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else if (l_m <= 1.6d+145) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else if (l_m <= 2.3d+218) then
tmp = (2.0d0 * ((-2.0d0) * (u / (om / (n * (l_m ** 2.0d0)))))) ** 0.5d0
else
tmp = (l_m * sqrt(2.0d0)) * ((((n * u) * (-2.0d0)) / om) ** 0.5d0)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 3.8e-39) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else if (l_m <= 1.6e+145) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else if (l_m <= 2.3e+218) {
tmp = Math.pow((2.0 * (-2.0 * (U / (Om / (n * Math.pow(l_m, 2.0)))))), 0.5);
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.pow((((n * U) * -2.0) / Om), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 3.8e-39: tmp = math.pow((2.0 * (n * (U * t))), 0.5) elif l_m <= 1.6e+145: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) elif l_m <= 2.3e+218: tmp = math.pow((2.0 * (-2.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))), 0.5) else: tmp = (l_m * math.sqrt(2.0)) * math.pow((((n * U) * -2.0) / Om), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 3.8e-39) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; elseif (l_m <= 1.6e+145) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); elseif (l_m <= 2.3e+218) tmp = Float64(2.0 * Float64(-2.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))) ^ 0.5; else tmp = Float64(Float64(l_m * sqrt(2.0)) * (Float64(Float64(Float64(n * U) * -2.0) / Om) ^ 0.5)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 3.8e-39) tmp = (2.0 * (n * (U * t))) ^ 0.5; elseif (l_m <= 1.6e+145) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); elseif (l_m <= 2.3e+218) tmp = (2.0 * (-2.0 * (U / (Om / (n * (l_m ^ 2.0)))))) ^ 0.5; else tmp = (l_m * sqrt(2.0)) * ((((n * U) * -2.0) / Om) ^ 0.5); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 3.8e-39], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l$95$m, 1.6e+145], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 2.3e+218], N[Power[N[(2.0 * N[(-2.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 3.8 \cdot 10^{-39}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;l_m \leq 1.6 \cdot 10^{+145}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;l_m \leq 2.3 \cdot 10^{+218}:\\
\;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 3.8000000000000002e-39Initial program 50.0%
Simplified54.5%
Taylor expanded in l around 0 40.9%
associate-*r*39.6%
*-commutative39.6%
Simplified39.6%
pow1/242.8%
associate-*l*44.1%
Applied egg-rr44.1%
if 3.8000000000000002e-39 < l < 1.60000000000000004e145Initial program 48.0%
Simplified50.8%
Taylor expanded in n around 0 47.4%
if 1.60000000000000004e145 < l < 2.3000000000000001e218Initial program 28.3%
Simplified37.5%
Taylor expanded in n around 0 28.5%
pow1/265.2%
associate-*r*55.5%
*-commutative55.5%
cancel-sign-sub-inv55.5%
metadata-eval55.5%
Applied egg-rr55.5%
Taylor expanded in t around 0 65.2%
associate-/l*65.2%
*-commutative65.2%
Simplified65.2%
if 2.3000000000000001e218 < l Initial program 23.3%
Simplified27.1%
Taylor expanded in l around inf 70.1%
associate-*r/70.1%
metadata-eval70.1%
Simplified70.1%
add-sqr-sqrt70.1%
pow270.1%
associate-*r*75.1%
*-commutative75.1%
div-inv75.1%
pow-flip75.1%
metadata-eval75.1%
Applied egg-rr75.1%
Taylor expanded in Om around inf 25.4%
Taylor expanded in n around 0 17.0%
Simplified46.2%
Final simplification45.7%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (pow (* 2.0 (* U (* n t))) 0.5)))
(if (<= l_m 1.15e+51)
t_1
(if (<= l_m 1.65e+149)
(sqrt (* 2.0 (* U (* -2.0 (/ (pow l_m 2.0) (/ Om n))))))
(if (<= l_m 3.4e+179)
t_1
(* (* l_m (sqrt 2.0)) (pow (/ (* (* n U) -2.0) Om) 0.5)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = pow((2.0 * (U * (n * t))), 0.5);
double tmp;
if (l_m <= 1.15e+51) {
tmp = t_1;
} else if (l_m <= 1.65e+149) {
tmp = sqrt((2.0 * (U * (-2.0 * (pow(l_m, 2.0) / (Om / n))))));
} else if (l_m <= 3.4e+179) {
tmp = t_1;
} else {
tmp = (l_m * sqrt(2.0)) * pow((((n * U) * -2.0) / Om), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = (2.0d0 * (u * (n * t))) ** 0.5d0
if (l_m <= 1.15d+51) then
tmp = t_1
else if (l_m <= 1.65d+149) then
tmp = sqrt((2.0d0 * (u * ((-2.0d0) * ((l_m ** 2.0d0) / (om / n))))))
else if (l_m <= 3.4d+179) then
tmp = t_1
else
tmp = (l_m * sqrt(2.0d0)) * ((((n * u) * (-2.0d0)) / om) ** 0.5d0)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.pow((2.0 * (U * (n * t))), 0.5);
double tmp;
if (l_m <= 1.15e+51) {
tmp = t_1;
} else if (l_m <= 1.65e+149) {
tmp = Math.sqrt((2.0 * (U * (-2.0 * (Math.pow(l_m, 2.0) / (Om / n))))));
} else if (l_m <= 3.4e+179) {
tmp = t_1;
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.pow((((n * U) * -2.0) / Om), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.pow((2.0 * (U * (n * t))), 0.5) tmp = 0 if l_m <= 1.15e+51: tmp = t_1 elif l_m <= 1.65e+149: tmp = math.sqrt((2.0 * (U * (-2.0 * (math.pow(l_m, 2.0) / (Om / n)))))) elif l_m <= 3.4e+179: tmp = t_1 else: tmp = (l_m * math.sqrt(2.0)) * math.pow((((n * U) * -2.0) / Om), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5 tmp = 0.0 if (l_m <= 1.15e+51) tmp = t_1; elseif (l_m <= 1.65e+149) tmp = sqrt(Float64(2.0 * Float64(U * Float64(-2.0 * Float64((l_m ^ 2.0) / Float64(Om / n)))))); elseif (l_m <= 3.4e+179) tmp = t_1; else tmp = Float64(Float64(l_m * sqrt(2.0)) * (Float64(Float64(Float64(n * U) * -2.0) / Om) ^ 0.5)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (2.0 * (U * (n * t))) ^ 0.5; tmp = 0.0; if (l_m <= 1.15e+51) tmp = t_1; elseif (l_m <= 1.65e+149) tmp = sqrt((2.0 * (U * (-2.0 * ((l_m ^ 2.0) / (Om / n)))))); elseif (l_m <= 3.4e+179) tmp = t_1; else tmp = (l_m * sqrt(2.0)) * ((((n * U) * -2.0) / Om) ^ 0.5); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l$95$m, 1.15e+51], t$95$1, If[LessEqual[l$95$m, 1.65e+149], N[Sqrt[N[(2.0 * N[(U * N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 3.4e+179], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{if}\;l_m \leq 1.15 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;l_m \leq 1.65 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{{l_m}^{2}}{\frac{Om}{n}}\right)\right)}\\
\mathbf{elif}\;l_m \leq 3.4 \cdot 10^{+179}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.15000000000000003e51 or 1.65e149 < l < 3.39999999999999996e179Initial program 50.0%
Simplified54.5%
Taylor expanded in l around 0 39.4%
pow1/243.7%
Applied egg-rr43.7%
if 1.15000000000000003e51 < l < 1.65e149Initial program 42.9%
Simplified55.5%
Taylor expanded in n around 0 55.4%
Taylor expanded in t around 0 34.2%
associate-/l*34.2%
Simplified34.2%
if 3.39999999999999996e179 < l Initial program 20.2%
Simplified23.4%
Taylor expanded in l around inf 67.6%
associate-*r/67.6%
metadata-eval67.6%
Simplified67.6%
add-sqr-sqrt67.6%
pow267.6%
associate-*r*68.0%
*-commutative68.0%
div-inv68.0%
pow-flip68.0%
metadata-eval68.0%
Applied egg-rr68.0%
Taylor expanded in Om around inf 21.7%
Taylor expanded in n around 0 14.5%
Simplified43.5%
Final simplification43.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (pow (* 2.0 (* U (* n t))) 0.5)))
(if (<= l_m 1.3e+51)
t_1
(if (<= l_m 1.4e+149)
(sqrt (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)))
(if (<= l_m 6.5e+195)
t_1
(* (* l_m (sqrt 2.0)) (sqrt (* -2.0 (/ U (/ Om n))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = pow((2.0 * (U * (n * t))), 0.5);
double tmp;
if (l_m <= 1.3e+51) {
tmp = t_1;
} else if (l_m <= 1.4e+149) {
tmp = sqrt((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)));
} else if (l_m <= 6.5e+195) {
tmp = t_1;
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = (2.0d0 * (u * (n * t))) ** 0.5d0
if (l_m <= 1.3d+51) then
tmp = t_1
else if (l_m <= 1.4d+149) then
tmp = sqrt(((-4.0d0) * ((u * (n * (l_m ** 2.0d0))) / om)))
else if (l_m <= 6.5d+195) then
tmp = t_1
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((-2.0d0) * (u / (om / n))))
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((2.0 * (U * (n * t))), 0.5);
double tmp;
if (l_m <= 1.3e+51) {
tmp = t_1;
} else if (l_m <= 1.4e+149) {
tmp = Math.sqrt((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)));
} else if (l_m <= 6.5e+195) {
tmp = t_1;
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((-2.0 * (U / (Om / n))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.pow((2.0 * (U * (n * t))), 0.5) tmp = 0 if l_m <= 1.3e+51: tmp = t_1 elif l_m <= 1.4e+149: tmp = math.sqrt((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om))) elif l_m <= 6.5e+195: tmp = t_1 else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((-2.0 * (U / (Om / n)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5 tmp = 0.0 if (l_m <= 1.3e+51) tmp = t_1; elseif (l_m <= 1.4e+149) tmp = sqrt(Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om))); elseif (l_m <= 6.5e+195) tmp = t_1; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(U / Float64(Om / n))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (2.0 * (U * (n * t))) ^ 0.5; tmp = 0.0; if (l_m <= 1.3e+51) tmp = t_1; elseif (l_m <= 1.4e+149) tmp = sqrt((-4.0 * ((U * (n * (l_m ^ 2.0))) / Om))); elseif (l_m <= 6.5e+195) tmp = t_1; else tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n)))); 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[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l$95$m, 1.3e+51], t$95$1, If[LessEqual[l$95$m, 1.4e+149], N[Sqrt[N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 6.5e+195], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(U / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{if}\;l_m \leq 1.3 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;l_m \leq 1.4 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l_m}^{2}\right)}{Om}}\\
\mathbf{elif}\;l_m \leq 6.5 \cdot 10^{+195}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\\
\end{array}
\end{array}
if l < 1.3000000000000001e51 or 1.4e149 < l < 6.5000000000000003e195Initial program 49.8%
Simplified54.2%
Taylor expanded in l around 0 39.2%
pow1/243.5%
Applied egg-rr43.5%
if 1.3000000000000001e51 < l < 1.4e149Initial program 42.9%
Simplified55.5%
add-cube-cbrt55.5%
pow355.5%
Applied egg-rr55.5%
Taylor expanded in l around inf 34.1%
if 6.5000000000000003e195 < l Initial program 21.0%
Simplified24.3%
Taylor expanded in l around inf 66.4%
associate-*r/66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in n around 0 33.6%
*-commutative33.6%
associate-/l*25.5%
Simplified25.5%
Final simplification41.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (pow (* 2.0 (* U (* n t))) 0.5)))
(if (<= l_m 1.3e+51)
t_1
(if (<= l_m 1.65e+149)
(sqrt (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)))
(if (<= l_m 9e+194)
t_1
(* (* l_m (sqrt 2.0)) (sqrt (/ (* (* n U) -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 = pow((2.0 * (U * (n * t))), 0.5);
double tmp;
if (l_m <= 1.3e+51) {
tmp = t_1;
} else if (l_m <= 1.65e+149) {
tmp = sqrt((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)));
} else if (l_m <= 9e+194) {
tmp = t_1;
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((((n * U) * -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) :: t_1
real(8) :: tmp
t_1 = (2.0d0 * (u * (n * t))) ** 0.5d0
if (l_m <= 1.3d+51) then
tmp = t_1
else if (l_m <= 1.65d+149) then
tmp = sqrt(((-4.0d0) * ((u * (n * (l_m ** 2.0d0))) / om)))
else if (l_m <= 9d+194) then
tmp = t_1
else
tmp = (l_m * sqrt(2.0d0)) * sqrt((((n * u) * (-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 t_1 = Math.pow((2.0 * (U * (n * t))), 0.5);
double tmp;
if (l_m <= 1.3e+51) {
tmp = t_1;
} else if (l_m <= 1.65e+149) {
tmp = Math.sqrt((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)));
} else if (l_m <= 9e+194) {
tmp = t_1;
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((((n * U) * -2.0) / Om));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.pow((2.0 * (U * (n * t))), 0.5) tmp = 0 if l_m <= 1.3e+51: tmp = t_1 elif l_m <= 1.65e+149: tmp = math.sqrt((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om))) elif l_m <= 9e+194: tmp = t_1 else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((((n * U) * -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(U * Float64(n * t))) ^ 0.5 tmp = 0.0 if (l_m <= 1.3e+51) tmp = t_1; elseif (l_m <= 1.65e+149) tmp = sqrt(Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om))); elseif (l_m <= 9e+194) tmp = t_1; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(Float64(n * U) * -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 * (U * (n * t))) ^ 0.5; tmp = 0.0; if (l_m <= 1.3e+51) tmp = t_1; elseif (l_m <= 1.65e+149) tmp = sqrt((-4.0 * ((U * (n * (l_m ^ 2.0))) / Om))); elseif (l_m <= 9e+194) tmp = t_1; else tmp = (l_m * sqrt(2.0)) * sqrt((((n * U) * -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[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l$95$m, 1.3e+51], t$95$1, If[LessEqual[l$95$m, 1.65e+149], N[Sqrt[N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 9e+194], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{if}\;l_m \leq 1.3 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;l_m \leq 1.65 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l_m}^{2}\right)}{Om}}\\
\mathbf{elif}\;l_m \leq 9 \cdot 10^{+194}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\left(n \cdot U\right) \cdot -2}{Om}}\\
\end{array}
\end{array}
if l < 1.3000000000000001e51 or 1.65e149 < l < 8.9999999999999997e194Initial program 49.8%
Simplified54.2%
Taylor expanded in l around 0 39.2%
pow1/243.5%
Applied egg-rr43.5%
if 1.3000000000000001e51 < l < 1.65e149Initial program 42.9%
Simplified55.5%
add-cube-cbrt55.5%
pow355.5%
Applied egg-rr55.5%
Taylor expanded in l around inf 34.1%
if 8.9999999999999997e194 < l Initial program 21.0%
Simplified24.3%
Taylor expanded in l around inf 66.4%
associate-*r/66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in n around 0 33.6%
associate-*r/33.7%
*-commutative33.7%
Simplified33.7%
Final simplification41.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (pow (* 2.0 (* U (* n t))) 0.5)))
(if (<= l_m 9.5e+50)
t_1
(if (<= l_m 1.15e+149)
(sqrt (* 2.0 (* U (* -2.0 (/ (pow l_m 2.0) (/ Om n))))))
(if (<= l_m 6.5e+195)
t_1
(* (* l_m (sqrt 2.0)) (sqrt (/ (* (* n U) -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 = pow((2.0 * (U * (n * t))), 0.5);
double tmp;
if (l_m <= 9.5e+50) {
tmp = t_1;
} else if (l_m <= 1.15e+149) {
tmp = sqrt((2.0 * (U * (-2.0 * (pow(l_m, 2.0) / (Om / n))))));
} else if (l_m <= 6.5e+195) {
tmp = t_1;
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((((n * U) * -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) :: t_1
real(8) :: tmp
t_1 = (2.0d0 * (u * (n * t))) ** 0.5d0
if (l_m <= 9.5d+50) then
tmp = t_1
else if (l_m <= 1.15d+149) then
tmp = sqrt((2.0d0 * (u * ((-2.0d0) * ((l_m ** 2.0d0) / (om / n))))))
else if (l_m <= 6.5d+195) then
tmp = t_1
else
tmp = (l_m * sqrt(2.0d0)) * sqrt((((n * u) * (-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 t_1 = Math.pow((2.0 * (U * (n * t))), 0.5);
double tmp;
if (l_m <= 9.5e+50) {
tmp = t_1;
} else if (l_m <= 1.15e+149) {
tmp = Math.sqrt((2.0 * (U * (-2.0 * (Math.pow(l_m, 2.0) / (Om / n))))));
} else if (l_m <= 6.5e+195) {
tmp = t_1;
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((((n * U) * -2.0) / Om));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.pow((2.0 * (U * (n * t))), 0.5) tmp = 0 if l_m <= 9.5e+50: tmp = t_1 elif l_m <= 1.15e+149: tmp = math.sqrt((2.0 * (U * (-2.0 * (math.pow(l_m, 2.0) / (Om / n)))))) elif l_m <= 6.5e+195: tmp = t_1 else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((((n * U) * -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(U * Float64(n * t))) ^ 0.5 tmp = 0.0 if (l_m <= 9.5e+50) tmp = t_1; elseif (l_m <= 1.15e+149) tmp = sqrt(Float64(2.0 * Float64(U * Float64(-2.0 * Float64((l_m ^ 2.0) / Float64(Om / n)))))); elseif (l_m <= 6.5e+195) tmp = t_1; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(Float64(n * U) * -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 * (U * (n * t))) ^ 0.5; tmp = 0.0; if (l_m <= 9.5e+50) tmp = t_1; elseif (l_m <= 1.15e+149) tmp = sqrt((2.0 * (U * (-2.0 * ((l_m ^ 2.0) / (Om / n)))))); elseif (l_m <= 6.5e+195) tmp = t_1; else tmp = (l_m * sqrt(2.0)) * sqrt((((n * U) * -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[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l$95$m, 9.5e+50], t$95$1, If[LessEqual[l$95$m, 1.15e+149], N[Sqrt[N[(2.0 * N[(U * N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 6.5e+195], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{if}\;l_m \leq 9.5 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;l_m \leq 1.15 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{{l_m}^{2}}{\frac{Om}{n}}\right)\right)}\\
\mathbf{elif}\;l_m \leq 6.5 \cdot 10^{+195}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\left(n \cdot U\right) \cdot -2}{Om}}\\
\end{array}
\end{array}
if l < 9.4999999999999993e50 or 1.1499999999999999e149 < l < 6.5000000000000003e195Initial program 49.8%
Simplified54.2%
Taylor expanded in l around 0 39.2%
pow1/243.5%
Applied egg-rr43.5%
if 9.4999999999999993e50 < l < 1.1499999999999999e149Initial program 42.9%
Simplified55.5%
Taylor expanded in n around 0 55.4%
Taylor expanded in t around 0 34.2%
associate-/l*34.2%
Simplified34.2%
if 6.5000000000000003e195 < l Initial program 21.0%
Simplified24.3%
Taylor expanded in l around inf 66.4%
associate-*r/66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in n around 0 33.6%
associate-*r/33.7%
*-commutative33.7%
Simplified33.7%
Final simplification41.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 0.62)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l_m 1.75e+219)
(pow (* 2.0 (* -2.0 (/ U (/ Om (* n (pow l_m 2.0)))))) 0.5)
(* (* l_m (sqrt 2.0)) (pow (/ (* (* n U) -2.0) Om) 0.5)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 0.62) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l_m <= 1.75e+219) {
tmp = pow((2.0 * (-2.0 * (U / (Om / (n * pow(l_m, 2.0)))))), 0.5);
} else {
tmp = (l_m * sqrt(2.0)) * pow((((n * U) * -2.0) / Om), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 0.62d0) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l_m <= 1.75d+219) then
tmp = (2.0d0 * ((-2.0d0) * (u / (om / (n * (l_m ** 2.0d0)))))) ** 0.5d0
else
tmp = (l_m * sqrt(2.0d0)) * ((((n * u) * (-2.0d0)) / om) ** 0.5d0)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 0.62) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l_m <= 1.75e+219) {
tmp = Math.pow((2.0 * (-2.0 * (U / (Om / (n * Math.pow(l_m, 2.0)))))), 0.5);
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.pow((((n * U) * -2.0) / Om), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 0.62: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l_m <= 1.75e+219: tmp = math.pow((2.0 * (-2.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))), 0.5) else: tmp = (l_m * math.sqrt(2.0)) * math.pow((((n * U) * -2.0) / Om), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 0.62) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l_m <= 1.75e+219) tmp = Float64(2.0 * Float64(-2.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))) ^ 0.5; else tmp = Float64(Float64(l_m * sqrt(2.0)) * (Float64(Float64(Float64(n * U) * -2.0) / Om) ^ 0.5)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 0.62) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l_m <= 1.75e+219) tmp = (2.0 * (-2.0 * (U / (Om / (n * (l_m ^ 2.0)))))) ^ 0.5; else tmp = (l_m * sqrt(2.0)) * ((((n * U) * -2.0) / Om) ^ 0.5); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 0.62], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l$95$m, 1.75e+219], N[Power[N[(2.0 * N[(-2.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 0.62:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;l_m \leq 1.75 \cdot 10^{+219}:\\
\;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 0.619999999999999996Initial program 51.0%
Simplified55.4%
Taylor expanded in l around 0 41.3%
pow1/244.9%
Applied egg-rr44.9%
if 0.619999999999999996 < l < 1.7500000000000001e219Initial program 36.9%
Simplified44.4%
Taylor expanded in n around 0 39.0%
pow1/257.5%
associate-*r*44.6%
*-commutative44.6%
cancel-sign-sub-inv44.6%
metadata-eval44.6%
Applied egg-rr44.6%
Taylor expanded in t around 0 42.3%
associate-/l*45.7%
*-commutative45.7%
Simplified45.7%
if 1.7500000000000001e219 < l Initial program 23.3%
Simplified27.1%
Taylor expanded in l around inf 70.1%
associate-*r/70.1%
metadata-eval70.1%
Simplified70.1%
add-sqr-sqrt70.1%
pow270.1%
associate-*r*75.1%
*-commutative75.1%
div-inv75.1%
pow-flip75.1%
metadata-eval75.1%
Applied egg-rr75.1%
Taylor expanded in Om around inf 25.4%
Taylor expanded in n around 0 17.0%
Simplified46.2%
Final simplification45.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (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_) {
return pow((2.0 * ((n * U) * (t + ((pow(l_m, 2.0) / Om) * -2.0)))), 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 * ((n * u) * (t + (((l_m ** 2.0d0) / om) * (-2.0d0))))) ** 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 * ((n * U) * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow((2.0 * ((n * U) * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = (2.0 * ((n * U) * (t + (((l_m ^ 2.0) / Om) * -2.0)))) ^ 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[(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|
\\
{\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}
Initial program 46.4%
Simplified52.3%
Taylor expanded in n around 0 43.9%
pow1/252.1%
associate-*r*48.9%
*-commutative48.9%
cancel-sign-sub-inv48.9%
metadata-eval48.9%
Applied egg-rr48.9%
Final simplification48.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= Om -1.85e-117)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= Om 3.8e-61)
(sqrt (* -4.0 (/ U (/ Om (* n (pow l_m 2.0))))))
(pow (* 2.0 (* n (* U t))) 0.5))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (Om <= -1.85e-117) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (Om <= 3.8e-61) {
tmp = sqrt((-4.0 * (U / (Om / (n * pow(l_m, 2.0))))));
} else {
tmp = pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (om <= (-1.85d-117)) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (om <= 3.8d-61) then
tmp = sqrt(((-4.0d0) * (u / (om / (n * (l_m ** 2.0d0))))))
else
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (Om <= -1.85e-117) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (Om <= 3.8e-61) {
tmp = Math.sqrt((-4.0 * (U / (Om / (n * Math.pow(l_m, 2.0))))));
} else {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if Om <= -1.85e-117: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif Om <= 3.8e-61: tmp = math.sqrt((-4.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))) else: tmp = math.pow((2.0 * (n * (U * t))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (Om <= -1.85e-117) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (Om <= 3.8e-61) tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))); else tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (Om <= -1.85e-117) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (Om <= 3.8e-61) tmp = sqrt((-4.0 * (U / (Om / (n * (l_m ^ 2.0)))))); else tmp = (2.0 * (n * (U * t))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -1.85e-117], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[Om, 3.8e-61], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.85 \cdot 10^{-117}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;Om \leq 3.8 \cdot 10^{-61}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if Om < -1.8500000000000001e-117Initial program 49.6%
Simplified52.2%
Taylor expanded in l around 0 42.3%
pow1/244.1%
Applied egg-rr44.1%
if -1.8500000000000001e-117 < Om < 3.7999999999999998e-61Initial program 33.7%
Simplified36.8%
add-cube-cbrt36.8%
pow336.8%
Applied egg-rr36.8%
Taylor expanded in l around inf 23.3%
associate-/l*28.8%
Simplified28.8%
if 3.7999999999999998e-61 < Om Initial program 51.8%
Simplified58.6%
Taylor expanded in l around 0 46.8%
associate-*r*48.7%
*-commutative48.7%
Simplified48.7%
pow1/249.9%
associate-*l*50.9%
Applied egg-rr50.9%
Final simplification42.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n -1.36e-93) (pow (pow (* 2.0 (* t (* n U))) 0.25) 2.0) (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 (n <= -1.36e-93) {
tmp = pow(pow((2.0 * (t * (n * U))), 0.25), 2.0);
} 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 (n <= (-1.36d-93)) then
tmp = ((2.0d0 * (t * (n * u))) ** 0.25d0) ** 2.0d0
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 (n <= -1.36e-93) {
tmp = Math.pow(Math.pow((2.0 * (t * (n * U))), 0.25), 2.0);
} 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 n <= -1.36e-93: tmp = math.pow(math.pow((2.0 * (t * (n * U))), 0.25), 2.0) 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 (n <= -1.36e-93) tmp = (Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.25) ^ 2.0; 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 (n <= -1.36e-93) tmp = ((2.0 * (t * (n * U))) ^ 0.25) ^ 2.0; 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[n, -1.36e-93], N[Power[N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], 2.0], $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}\;n \leq -1.36 \cdot 10^{-93}:\\
\;\;\;\;{\left({\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.25}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if n < -1.3599999999999999e-93Initial program 52.9%
Simplified55.5%
Applied egg-rr53.9%
Taylor expanded in l around 0 38.3%
associate-*r*42.9%
Simplified42.9%
if -1.3599999999999999e-93 < n Initial program 42.9%
Simplified46.3%
Taylor expanded in l around 0 35.8%
pow1/239.4%
Applied egg-rr39.4%
Final simplification40.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U 1.25e-267) (sqrt (* 2.0 (* U (* n t)))) (sqrt (* 2.0 (* t (* n U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 1.25e-267) {
tmp = sqrt((2.0 * (U * (n * t))));
} else {
tmp = sqrt((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 (u <= 1.25d-267) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else
tmp = sqrt((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 (U <= 1.25e-267) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else {
tmp = Math.sqrt((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 U <= 1.25e-267: tmp = math.sqrt((2.0 * (U * (n * t)))) else: tmp = math.sqrt((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 (U <= 1.25e-267) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); else tmp = sqrt(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 (U <= 1.25e-267) tmp = sqrt((2.0 * (U * (n * t)))); else tmp = sqrt((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[U, 1.25e-267], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.25 \cdot 10^{-267}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\end{array}
\end{array}
if U < 1.25e-267Initial program 47.8%
Simplified51.2%
Taylor expanded in l around 0 41.4%
if 1.25e-267 < U Initial program 44.7%
Simplified49.6%
Taylor expanded in l around 0 26.7%
associate-*r*30.9%
*-commutative30.9%
Simplified30.9%
Final simplification36.6%
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 46.4%
Simplified50.5%
Taylor expanded in l around 0 34.7%
pow1/239.0%
Applied egg-rr39.0%
Final simplification39.0%
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 46.4%
Simplified50.5%
Taylor expanded in l around 0 34.7%
Final simplification34.7%
herbie shell --seed 2023331
(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*))))))