
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (sqrt (* (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1) t_2))))
(if (<= t_3 5e-155)
(* (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))) (sqrt (* 2.0 n)))
(if (<= t_3 4e+153)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
(* l_m (sqrt 2.0))
(sqrt (/ (- (* U (/ (* (pow n 2.0) (- U* U)) Om)) t_2) Om)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * t_2));
double tmp;
if (t_3 <= 5e-155) {
tmp = sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om)))) * sqrt((2.0 * n));
} else if (t_3 <= 4e+153) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((((U * ((pow(n, 2.0) * (U_42_ - U)) / Om)) - t_2) / 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (n * ((l_m / om) ** 2.0d0)) * (u_42 - u)
t_2 = (2.0d0 * n) * u
t_3 = sqrt((((t - (2.0d0 * ((l_m * l_m) / om))) + t_1) * t_2))
if (t_3 <= 5d-155) then
tmp = sqrt((u * (t - ((2.0d0 * (l_m ** 2.0d0)) / om)))) * sqrt((2.0d0 * n))
else if (t_3 <= 4d+153) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (t_1 - (2.0d0 * (l_m * (l_m / om)))))))
else
tmp = (l_m * sqrt(2.0d0)) * sqrt((((u * (((n ** 2.0d0) * (u_42 - u)) / om)) - t_2) / 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 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = Math.sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * t_2));
double tmp;
if (t_3 <= 5e-155) {
tmp = Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om)))) * Math.sqrt((2.0 * n));
} else if (t_3 <= 4e+153) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((((U * ((Math.pow(n, 2.0) * (U_42_ - U)) / Om)) - t_2) / Om));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = (2.0 * n) * U t_3 = math.sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * t_2)) tmp = 0 if t_3 <= 5e-155: tmp = math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) * math.sqrt((2.0 * n)) elif t_3 <= 4e+153: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((((U * ((math.pow(n, 2.0) * (U_42_ - U)) / Om)) - t_2) / Om)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1) * t_2)) tmp = 0.0 if (t_3 <= 5e-155) tmp = Float64(sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om)))) * sqrt(Float64(2.0 * n))); elseif (t_3 <= 4e+153) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(Float64(U * Float64(Float64((n ^ 2.0) * Float64(U_42_ - U)) / Om)) - t_2) / Om))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = (2.0 * n) * U; t_3 = sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * t_2)); tmp = 0.0; if (t_3 <= 5e-155) tmp = sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))) * sqrt((2.0 * n)); elseif (t_3 <= 4e+153) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = (l_m * sqrt(2.0)) * sqrt((((U * (((n ^ 2.0) * (U_42_ - U)) / Om)) - t_2) / Om)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 5e-155], N[(N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+153], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(N[(U * N[(N[(N[Power[n, 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{\left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right) \cdot t\_2}\\
\mathbf{if}\;t\_3 \leq 5 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{U \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{U \cdot \frac{{n}^{2} \cdot \left(U* - U\right)}{Om} - t\_2}{Om}}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.9999999999999999e-155Initial program 17.4%
Simplified40.7%
Taylor expanded in Om around inf 40.7%
unpow240.7%
associate-*r/40.7%
*-commutative40.7%
Applied egg-rr40.7%
sqrt-prod64.9%
cancel-sign-sub-inv64.9%
metadata-eval64.9%
associate-*l/64.9%
unpow264.9%
Applied egg-rr64.9%
*-commutative64.9%
metadata-eval64.9%
cancel-sign-sub-inv64.9%
associate-*r/64.9%
Simplified64.9%
if 4.9999999999999999e-155 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4e153Initial program 96.2%
Simplified96.2%
if 4e153 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 16.9%
Simplified28.3%
Taylor expanded in l around inf 25.2%
*-commutative25.2%
associate-*r*25.0%
associate-/l*25.8%
associate-*r/25.8%
metadata-eval25.8%
Simplified25.8%
Taylor expanded in Om around -inf 25.2%
mul-1-neg25.2%
distribute-neg-frac225.2%
+-commutative25.2%
*-commutative25.2%
associate-*r*25.2%
mul-1-neg25.2%
unsub-neg25.2%
*-commutative25.2%
*-commutative25.2%
associate-/l*25.9%
Simplified25.9%
Final simplification57.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2
(sqrt (* (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1) (* (* 2.0 n) U)))))
(if (<= t_2 5e-155)
(* (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))) (sqrt (* 2.0 n)))
(if (<= t_2 4e+153)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
(* l_m (sqrt 2.0))
(sqrt (* n (* U (- (* (* n (- U* U)) (pow Om -2.0)) (/ 2.0 Om))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U)));
double tmp;
if (t_2 <= 5e-155) {
tmp = sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om)))) * sqrt((2.0 * n));
} else if (t_2 <= 4e+153) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((n * (U * (((n * (U_42_ - U)) * 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) :: t_2
real(8) :: tmp
t_1 = (n * ((l_m / om) ** 2.0d0)) * (u_42 - u)
t_2 = sqrt((((t - (2.0d0 * ((l_m * l_m) / om))) + t_1) * ((2.0d0 * n) * u)))
if (t_2 <= 5d-155) then
tmp = sqrt((u * (t - ((2.0d0 * (l_m ** 2.0d0)) / om)))) * sqrt((2.0d0 * n))
else if (t_2 <= 4d+153) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (t_1 - (2.0d0 * (l_m * (l_m / om)))))))
else
tmp = (l_m * sqrt(2.0d0)) * sqrt((n * (u * (((n * (u_42 - u)) * (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 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = Math.sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U)));
double tmp;
if (t_2 <= 5e-155) {
tmp = Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om)))) * Math.sqrt((2.0 * n));
} else if (t_2 <= 4e+153) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((n * (U * (((n * (U_42_ - U)) * Math.pow(Om, -2.0)) - (2.0 / Om)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = math.sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U))) tmp = 0 if t_2 <= 5e-155: tmp = math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) * math.sqrt((2.0 * n)) elif t_2 <= 4e+153: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((n * (U * (((n * (U_42_ - U)) * math.pow(Om, -2.0)) - (2.0 / Om))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1) * Float64(Float64(2.0 * n) * U))) tmp = 0.0 if (t_2 <= 5e-155) tmp = Float64(sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om)))) * sqrt(Float64(2.0 * n))); elseif (t_2 <= 4e+153) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(n * Float64(U * Float64(Float64(Float64(n * Float64(U_42_ - U)) * (Om ^ -2.0)) - Float64(2.0 / Om)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U))); tmp = 0.0; if (t_2 <= 5e-155) tmp = sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))) * sqrt((2.0 * n)); elseif (t_2 <= 4e+153) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = (l_m * sqrt(2.0)) * sqrt((n * (U * (((n * (U_42_ - U)) * (Om ^ -2.0)) - (2.0 / Om))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 5e-155], N[(N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+153], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n * N[(U * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $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 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\mathbf{if}\;t\_2 \leq 5 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{U \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.9999999999999999e-155Initial program 17.4%
Simplified40.7%
Taylor expanded in Om around inf 40.7%
unpow240.7%
associate-*r/40.7%
*-commutative40.7%
Applied egg-rr40.7%
sqrt-prod64.9%
cancel-sign-sub-inv64.9%
metadata-eval64.9%
associate-*l/64.9%
unpow264.9%
Applied egg-rr64.9%
*-commutative64.9%
metadata-eval64.9%
cancel-sign-sub-inv64.9%
associate-*r/64.9%
Simplified64.9%
if 4.9999999999999999e-155 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4e153Initial program 96.2%
Simplified96.2%
if 4e153 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 16.9%
Simplified28.3%
Taylor expanded in l around inf 25.2%
*-commutative25.2%
associate-*r*25.0%
associate-/l*25.8%
associate-*r/25.8%
metadata-eval25.8%
Simplified25.8%
*-un-lft-identity25.8%
*-commutative25.8%
div-inv25.8%
pow-flip25.8%
metadata-eval25.8%
Applied egg-rr25.8%
*-lft-identity25.8%
associate-*l*23.4%
associate-*r*24.8%
Simplified24.8%
Final simplification56.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2
(sqrt (* (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1) (* (* 2.0 n) U)))))
(if (<= t_2 5e-155)
(* (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))) (sqrt (* 2.0 n)))
(if (<= t_2 4e+153)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
(* l_m (sqrt 2.0))
(sqrt (* (* n U) (- (* n (/ (- U* U) (pow Om 2.0))) (/ 2.0 Om)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U)));
double tmp;
if (t_2 <= 5e-155) {
tmp = sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om)))) * sqrt((2.0 * n));
} else if (t_2 <= 4e+153) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((n * ((U_42_ - U) / 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) :: t_2
real(8) :: tmp
t_1 = (n * ((l_m / om) ** 2.0d0)) * (u_42 - u)
t_2 = sqrt((((t - (2.0d0 * ((l_m * l_m) / om))) + t_1) * ((2.0d0 * n) * u)))
if (t_2 <= 5d-155) then
tmp = sqrt((u * (t - ((2.0d0 * (l_m ** 2.0d0)) / om)))) * sqrt((2.0d0 * n))
else if (t_2 <= 4d+153) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (t_1 - (2.0d0 * (l_m * (l_m / om)))))))
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((n * u) * ((n * ((u_42 - u) / (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 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = Math.sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U)));
double tmp;
if (t_2 <= 5e-155) {
tmp = Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om)))) * Math.sqrt((2.0 * n));
} else if (t_2 <= 4e+153) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * ((n * ((U_42_ - U) / Math.pow(Om, 2.0))) - (2.0 / Om))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = math.sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U))) tmp = 0 if t_2 <= 5e-155: tmp = math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) * math.sqrt((2.0 * n)) elif t_2 <= 4e+153: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * ((n * ((U_42_ - U) / math.pow(Om, 2.0))) - (2.0 / Om)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1) * Float64(Float64(2.0 * n) * U))) tmp = 0.0 if (t_2 <= 5e-155) tmp = Float64(sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om)))) * sqrt(Float64(2.0 * n))); elseif (t_2 <= 4e+153) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(n * Float64(Float64(U_42_ - U) / (Om ^ 2.0))) - Float64(2.0 / Om))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U))); tmp = 0.0; if (t_2 <= 5e-155) tmp = sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))) * sqrt((2.0 * n)); elseif (t_2 <= 4e+153) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((n * ((U_42_ - U) / (Om ^ 2.0))) - (2.0 / Om)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 5e-155], N[(N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+153], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(n * N[(N[(U$42$ - U), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\mathbf{if}\;t\_2 \leq 5 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{U \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(n \cdot \frac{U* - U}{{Om}^{2}} - \frac{2}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.9999999999999999e-155Initial program 17.4%
Simplified40.7%
Taylor expanded in Om around inf 40.7%
unpow240.7%
associate-*r/40.7%
*-commutative40.7%
Applied egg-rr40.7%
sqrt-prod64.9%
cancel-sign-sub-inv64.9%
metadata-eval64.9%
associate-*l/64.9%
unpow264.9%
Applied egg-rr64.9%
*-commutative64.9%
metadata-eval64.9%
cancel-sign-sub-inv64.9%
associate-*r/64.9%
Simplified64.9%
if 4.9999999999999999e-155 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4e153Initial program 96.2%
Simplified96.2%
if 4e153 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 16.9%
Simplified28.3%
Taylor expanded in l around inf 25.2%
*-commutative25.2%
associate-*r*25.0%
associate-/l*25.8%
associate-*r/25.8%
metadata-eval25.8%
Simplified25.8%
Final simplification57.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2
(sqrt (* (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1) (* (* 2.0 n) U)))))
(if (<= t_2 5e-155)
(* (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))) (sqrt (* 2.0 n)))
(if (<= t_2 4e+153)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
(* l_m (sqrt 2.0))
(sqrt (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 2.0 Om)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U)));
double tmp;
if (t_2 <= 5e-155) {
tmp = sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om)))) * sqrt((2.0 * n));
} else if (t_2 <= 4e+153) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * (((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) :: t_2
real(8) :: tmp
t_1 = (n * ((l_m / om) ** 2.0d0)) * (u_42 - u)
t_2 = sqrt((((t - (2.0d0 * ((l_m * l_m) / om))) + t_1) * ((2.0d0 * n) * u)))
if (t_2 <= 5d-155) then
tmp = sqrt((u * (t - ((2.0d0 * (l_m ** 2.0d0)) / om)))) * sqrt((2.0d0 * n))
else if (t_2 <= 4d+153) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (t_1 - (2.0d0 * (l_m * (l_m / om)))))))
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((n * u) * (((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 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = Math.sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U)));
double tmp;
if (t_2 <= 5e-155) {
tmp = Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om)))) * Math.sqrt((2.0 * n));
} else if (t_2 <= 4e+153) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = math.sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U))) tmp = 0 if t_2 <= 5e-155: tmp = math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) * math.sqrt((2.0 * n)) elif t_2 <= 4e+153: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1) * Float64(Float64(2.0 * n) * U))) tmp = 0.0 if (t_2 <= 5e-155) tmp = Float64(sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om)))) * sqrt(Float64(2.0 * n))); elseif (t_2 <= 4e+153) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = sqrt((((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U))); tmp = 0.0; if (t_2 <= 5e-155) tmp = sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))) * sqrt((2.0 * n)); elseif (t_2 <= 4e+153) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * (((n * U_42_) / (Om ^ 2.0)) - (2.0 / Om)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 5e-155], N[(N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+153], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\mathbf{if}\;t\_2 \leq 5 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{U \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.9999999999999999e-155Initial program 17.4%
Simplified40.7%
Taylor expanded in Om around inf 40.7%
unpow240.7%
associate-*r/40.7%
*-commutative40.7%
Applied egg-rr40.7%
sqrt-prod64.9%
cancel-sign-sub-inv64.9%
metadata-eval64.9%
associate-*l/64.9%
unpow264.9%
Applied egg-rr64.9%
*-commutative64.9%
metadata-eval64.9%
cancel-sign-sub-inv64.9%
associate-*r/64.9%
Simplified64.9%
if 4.9999999999999999e-155 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4e153Initial program 96.2%
Simplified96.2%
if 4e153 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 16.9%
Simplified28.3%
Taylor expanded in l around inf 25.2%
*-commutative25.2%
associate-*r*25.0%
associate-/l*25.8%
associate-*r/25.8%
metadata-eval25.8%
Simplified25.8%
Taylor expanded in U* around inf 24.9%
Final simplification56.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1) (* (* 2.0 n) U)))
(t_3
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 2e-309)
(* (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))) (sqrt (* 2.0 n)))
(if (<= t_2 INFINITY)
t_3
(pow (/ (* -4.0 (* n (* U (pow l_m 2.0)))) Om) 0.5))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U);
double t_3 = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= 2e-309) {
tmp = sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om)))) * sqrt((2.0 * n));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = pow(((-4.0 * (n * (U * pow(l_m, 2.0)))) / Om), 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 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U);
double t_3 = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= 2e-309) {
tmp = Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om)))) * Math.sqrt((2.0 * n));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = Math.pow(((-4.0 * (n * (U * Math.pow(l_m, 2.0)))) / Om), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U) t_3 = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= 2e-309: tmp = math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) * math.sqrt((2.0 * n)) elif t_2 <= math.inf: tmp = t_3 else: tmp = math.pow(((-4.0 * (n * (U * math.pow(l_m, 2.0)))) / Om), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1) * Float64(Float64(2.0 * n) * U)) t_3 = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= 2e-309) tmp = Float64(sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om)))) * sqrt(Float64(2.0 * n))); elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(Float64(-4.0 * Float64(n * Float64(U * (l_m ^ 2.0)))) / Om) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U); t_3 = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= 2e-309) tmp = sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))) * sqrt((2.0 * n)); elseif (t_2 <= Inf) tmp = t_3; else tmp = ((-4.0 * (n * (U * (l_m ^ 2.0)))) / Om) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, 2e-309], N[(N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[Power[N[(N[(-4.0 * N[(n * N[(U * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)\\
t_3 := \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{U \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{-4 \cdot \left(n \cdot \left(U \cdot {l\_m}^{2}\right)\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < -inf.0 or 1.9999999999999988e-309 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 65.0%
Simplified73.9%
if -inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 1.9999999999999988e-309Initial program 16.7%
Simplified39.0%
Taylor expanded in Om around inf 39.0%
unpow239.0%
associate-*r/39.0%
*-commutative39.0%
Applied egg-rr39.0%
sqrt-prod62.2%
cancel-sign-sub-inv62.2%
metadata-eval62.2%
associate-*l/62.2%
unpow262.2%
Applied egg-rr62.2%
*-commutative62.2%
metadata-eval62.2%
cancel-sign-sub-inv62.2%
associate-*r/62.2%
Simplified62.2%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified7.2%
Taylor expanded in Om around inf 6.3%
Taylor expanded in t around 0 7.6%
pow1/236.1%
associate-*r/36.1%
associate-*r*36.1%
Applied egg-rr36.1%
Final simplification65.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1) (* (* 2.0 n) U))))
(if (<= t_2 2e-309)
(* (sqrt (* 2.0 n)) (sqrt (* U t)))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(pow (/ (* -4.0 (* n (* U (pow l_m 2.0)))) Om) 0.5)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U);
double tmp;
if (t_2 <= 2e-309) {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = pow(((-4.0 * (n * (U * pow(l_m, 2.0)))) / Om), 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 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U);
double tmp;
if (t_2 <= 2e-309) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.pow(((-4.0 * (n * (U * Math.pow(l_m, 2.0)))) / Om), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U) tmp = 0 if t_2 <= 2e-309: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.pow(((-4.0 * (n * (U * math.pow(l_m, 2.0)))) / Om), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1) * Float64(Float64(2.0 * n) * U)) tmp = 0.0 if (t_2 <= 2e-309) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(-4.0 * Float64(n * Float64(U * (l_m ^ 2.0)))) / Om) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) * ((2.0 * n) * U); tmp = 0.0; if (t_2 <= 2e-309) tmp = sqrt((2.0 * n)) * sqrt((U * t)); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = ((-4.0 * (n * (U * (l_m ^ 2.0)))) / Om) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-309], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(-4.0 * N[(n * N[(U * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{-4 \cdot \left(n \cdot \left(U \cdot {l\_m}^{2}\right)\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 1.9999999999999988e-309Initial program 13.8%
Simplified39.4%
Taylor expanded in l around 0 36.0%
pow1/236.0%
associate-*r*36.1%
unpow-prod-down52.0%
pow1/252.0%
pow1/252.0%
Applied egg-rr52.0%
if 1.9999999999999988e-309 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 66.8%
Simplified73.2%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified7.2%
Taylor expanded in Om around inf 6.3%
Taylor expanded in t around 0 7.6%
pow1/236.1%
associate-*r/36.1%
associate-*r*36.1%
Applied egg-rr36.1%
Final simplification64.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 2e-190)
(sqrt (* 2.0 (* t (* n U))))
(if (<= l_m 2.7e+96)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(if (<= l_m 9.4e+198)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))
(if (or (<= l_m 1.42e+281) (not (<= l_m 4.4e+300)))
(pow (/ (* -4.0 (* n (* U (pow l_m 2.0)))) Om) 0.5)
(* (* 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 tmp;
if (l_m <= 2e-190) {
tmp = sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 2.7e+96) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else if (l_m <= 9.4e+198) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else if ((l_m <= 1.42e+281) || !(l_m <= 4.4e+300)) {
tmp = pow(((-4.0 * (n * (U * pow(l_m, 2.0)))) / Om), 0.5);
} 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) :: tmp
if (l_m <= 2d-190) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else if (l_m <= 2.7d+96) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else if (l_m <= 9.4d+198) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l_m * (l_m / om)))))))
else if ((l_m <= 1.42d+281) .or. (.not. (l_m <= 4.4d+300))) then
tmp = (((-4.0d0) * (n * (u * (l_m ** 2.0d0)))) / om) ** 0.5d0
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 tmp;
if (l_m <= 2e-190) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 2.7e+96) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else if (l_m <= 9.4e+198) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else if ((l_m <= 1.42e+281) || !(l_m <= 4.4e+300)) {
tmp = Math.pow(((-4.0 * (n * (U * Math.pow(l_m, 2.0)))) / Om), 0.5);
} 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_): tmp = 0 if l_m <= 2e-190: tmp = math.sqrt((2.0 * (t * (n * U)))) elif l_m <= 2.7e+96: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) elif l_m <= 9.4e+198: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))) elif (l_m <= 1.42e+281) or not (l_m <= 4.4e+300): tmp = math.pow(((-4.0 * (n * (U * math.pow(l_m, 2.0)))) / Om), 0.5) 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_) tmp = 0.0 if (l_m <= 2e-190) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); elseif (l_m <= 2.7e+96) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); elseif (l_m <= 9.4e+198) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); elseif ((l_m <= 1.42e+281) || !(l_m <= 4.4e+300)) tmp = Float64(Float64(-4.0 * Float64(n * Float64(U * (l_m ^ 2.0)))) / Om) ^ 0.5; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * -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 <= 2e-190) tmp = sqrt((2.0 * (t * (n * U)))); elseif (l_m <= 2.7e+96) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); elseif (l_m <= 9.4e+198) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))); elseif ((l_m <= 1.42e+281) || ~((l_m <= 4.4e+300))) tmp = ((-4.0 * (n * (U * (l_m ^ 2.0)))) / Om) ^ 0.5; 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$_] := If[LessEqual[l$95$m, 2e-190], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 2.7e+96], 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, 9.4e+198], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l$95$m, 1.42e+281], N[Not[LessEqual[l$95$m, 4.4e+300]], $MachinePrecision]], N[Power[N[(N[(-4.0 * N[(n * N[(U * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2 \cdot 10^{-190}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{elif}\;l\_m \leq 2.7 \cdot 10^{+96}:\\
\;\;\;\;\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 9.4 \cdot 10^{+198}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{elif}\;l\_m \leq 1.42 \cdot 10^{+281} \lor \neg \left(l\_m \leq 4.4 \cdot 10^{+300}\right):\\
\;\;\;\;{\left(\frac{-4 \cdot \left(n \cdot \left(U \cdot {l\_m}^{2}\right)\right)}{Om}\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot -2\right)}{Om}}\\
\end{array}
\end{array}
if l < 2e-190Initial program 52.4%
Simplified52.2%
Taylor expanded in l around 0 38.1%
add-cbrt-cube14.9%
pow1/315.8%
pow315.8%
Applied egg-rr15.8%
pow-pow38.1%
metadata-eval38.1%
pow138.1%
associate-*r*43.5%
Applied egg-rr43.5%
if 2e-190 < l < 2.70000000000000022e96Initial program 65.6%
Simplified60.8%
Taylor expanded in n around 0 58.7%
if 2.70000000000000022e96 < l < 9.4000000000000004e198Initial program 26.7%
Simplified47.0%
Taylor expanded in Om around inf 27.2%
unpow227.2%
associate-*r/47.6%
*-commutative47.6%
Applied egg-rr47.6%
if 9.4000000000000004e198 < l < 1.42000000000000001e281 or 4.4000000000000002e300 < l Initial program 6.9%
Simplified17.1%
Taylor expanded in Om around inf 7.2%
Taylor expanded in t around 0 7.2%
pow1/238.9%
associate-*r/38.9%
associate-*r*38.9%
Applied egg-rr38.9%
if 1.42000000000000001e281 < l < 4.4000000000000002e300Initial program 18.3%
Simplified18.8%
Taylor expanded in l around inf 50.3%
*-commutative50.3%
associate-*r*66.2%
associate-/l*66.2%
associate-*r/66.2%
metadata-eval66.2%
Simplified66.2%
Taylor expanded in n around 0 66.2%
associate-*r/66.2%
associate-*r*66.2%
Simplified66.2%
Final simplification47.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 1.32e-95)
(sqrt (* 2.0 (* t (* n U))))
(if (<= l_m 2e+199)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))
(if (or (<= l_m 1.4e+281) (not (<= l_m 1e+298)))
(pow (/ (* -4.0 (* n (* U (pow l_m 2.0)))) Om) 0.5)
(* (* 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 tmp;
if (l_m <= 1.32e-95) {
tmp = sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 2e+199) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else if ((l_m <= 1.4e+281) || !(l_m <= 1e+298)) {
tmp = pow(((-4.0 * (n * (U * pow(l_m, 2.0)))) / Om), 0.5);
} 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) :: tmp
if (l_m <= 1.32d-95) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else if (l_m <= 2d+199) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l_m * (l_m / om)))))))
else if ((l_m <= 1.4d+281) .or. (.not. (l_m <= 1d+298))) then
tmp = (((-4.0d0) * (n * (u * (l_m ** 2.0d0)))) / om) ** 0.5d0
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 tmp;
if (l_m <= 1.32e-95) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 2e+199) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else if ((l_m <= 1.4e+281) || !(l_m <= 1e+298)) {
tmp = Math.pow(((-4.0 * (n * (U * Math.pow(l_m, 2.0)))) / Om), 0.5);
} 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_): tmp = 0 if l_m <= 1.32e-95: tmp = math.sqrt((2.0 * (t * (n * U)))) elif l_m <= 2e+199: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))) elif (l_m <= 1.4e+281) or not (l_m <= 1e+298): tmp = math.pow(((-4.0 * (n * (U * math.pow(l_m, 2.0)))) / Om), 0.5) 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_) tmp = 0.0 if (l_m <= 1.32e-95) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); elseif (l_m <= 2e+199) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); elseif ((l_m <= 1.4e+281) || !(l_m <= 1e+298)) tmp = Float64(Float64(-4.0 * Float64(n * Float64(U * (l_m ^ 2.0)))) / Om) ^ 0.5; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * -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 <= 1.32e-95) tmp = sqrt((2.0 * (t * (n * U)))); elseif (l_m <= 2e+199) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))); elseif ((l_m <= 1.4e+281) || ~((l_m <= 1e+298))) tmp = ((-4.0 * (n * (U * (l_m ^ 2.0)))) / Om) ^ 0.5; 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$_] := If[LessEqual[l$95$m, 1.32e-95], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 2e+199], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l$95$m, 1.4e+281], N[Not[LessEqual[l$95$m, 1e+298]], $MachinePrecision]], N[Power[N[(N[(-4.0 * N[(n * N[(U * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.32 \cdot 10^{-95}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{elif}\;l\_m \leq 2 \cdot 10^{+199}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{elif}\;l\_m \leq 1.4 \cdot 10^{+281} \lor \neg \left(l\_m \leq 10^{+298}\right):\\
\;\;\;\;{\left(\frac{-4 \cdot \left(n \cdot \left(U \cdot {l\_m}^{2}\right)\right)}{Om}\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot -2\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.31999999999999996e-95Initial program 54.7%
Simplified53.3%
Taylor expanded in l around 0 41.4%
add-cbrt-cube15.9%
pow1/316.6%
pow316.6%
Applied egg-rr16.6%
pow-pow41.4%
metadata-eval41.4%
pow141.4%
associate-*r*45.6%
Applied egg-rr45.6%
if 1.31999999999999996e-95 < l < 2.00000000000000019e199Initial program 48.1%
Simplified54.8%
Taylor expanded in Om around inf 40.2%
unpow240.2%
associate-*r/48.4%
*-commutative48.4%
Applied egg-rr48.4%
if 2.00000000000000019e199 < l < 1.4e281 or 9.9999999999999996e297 < l Initial program 6.9%
Simplified17.1%
Taylor expanded in Om around inf 7.2%
Taylor expanded in t around 0 7.2%
pow1/238.9%
associate-*r/38.9%
associate-*r*38.9%
Applied egg-rr38.9%
if 1.4e281 < l < 9.9999999999999996e297Initial program 18.3%
Simplified18.8%
Taylor expanded in l around inf 50.3%
*-commutative50.3%
associate-*r*66.2%
associate-/l*66.2%
associate-*r/66.2%
metadata-eval66.2%
Simplified66.2%
Taylor expanded in n around 0 66.2%
associate-*r/66.2%
associate-*r*66.2%
Simplified66.2%
Final simplification46.2%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 3e-95)
(sqrt (* 2.0 (* t (* n U))))
(if (<= l_m 3.5e+199)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))
(if (<= l_m 2.45e+266)
(* l_m (* (sqrt (* U U*)) (* n (/ (sqrt 2.0) Om))))
(* (* 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 tmp;
if (l_m <= 3e-95) {
tmp = sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 3.5e+199) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else if (l_m <= 2.45e+266) {
tmp = l_m * (sqrt((U * U_42_)) * (n * (sqrt(2.0) / Om)));
} 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) :: tmp
if (l_m <= 3d-95) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else if (l_m <= 3.5d+199) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l_m * (l_m / om)))))))
else if (l_m <= 2.45d+266) then
tmp = l_m * (sqrt((u * u_42)) * (n * (sqrt(2.0d0) / om)))
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 tmp;
if (l_m <= 3e-95) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 3.5e+199) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else if (l_m <= 2.45e+266) {
tmp = l_m * (Math.sqrt((U * U_42_)) * (n * (Math.sqrt(2.0) / Om)));
} 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_): tmp = 0 if l_m <= 3e-95: tmp = math.sqrt((2.0 * (t * (n * U)))) elif l_m <= 3.5e+199: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))) elif l_m <= 2.45e+266: tmp = l_m * (math.sqrt((U * U_42_)) * (n * (math.sqrt(2.0) / Om))) 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_) tmp = 0.0 if (l_m <= 3e-95) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); elseif (l_m <= 3.5e+199) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); elseif (l_m <= 2.45e+266) tmp = Float64(l_m * Float64(sqrt(Float64(U * U_42_)) * Float64(n * Float64(sqrt(2.0) / Om)))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * -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 <= 3e-95) tmp = sqrt((2.0 * (t * (n * U)))); elseif (l_m <= 3.5e+199) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))); elseif (l_m <= 2.45e+266) tmp = l_m * (sqrt((U * U_42_)) * (n * (sqrt(2.0) / Om))); 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$_] := If[LessEqual[l$95$m, 3e-95], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 3.5e+199], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 2.45e+266], N[(l$95$m * N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 3 \cdot 10^{-95}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{elif}\;l\_m \leq 3.5 \cdot 10^{+199}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{elif}\;l\_m \leq 2.45 \cdot 10^{+266}:\\
\;\;\;\;l\_m \cdot \left(\sqrt{U \cdot U*} \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot -2\right)}{Om}}\\
\end{array}
\end{array}
if l < 3e-95Initial program 54.7%
Simplified53.3%
Taylor expanded in l around 0 41.4%
add-cbrt-cube15.9%
pow1/316.6%
pow316.6%
Applied egg-rr16.6%
pow-pow41.4%
metadata-eval41.4%
pow141.4%
associate-*r*45.6%
Applied egg-rr45.6%
if 3e-95 < l < 3.49999999999999981e199Initial program 48.1%
Simplified54.8%
Taylor expanded in Om around inf 40.2%
unpow240.2%
associate-*r/48.4%
*-commutative48.4%
Applied egg-rr48.4%
if 3.49999999999999981e199 < l < 2.4500000000000001e266Initial program 9.0%
Simplified22.4%
fma-undefine22.4%
associate-*r*22.4%
add-cube-cbrt22.4%
pow322.4%
fma-define22.4%
associate-*r/9.0%
pow29.0%
associate-*r*9.0%
Applied egg-rr9.0%
unpow29.0%
associate-*r/9.0%
*-commutative9.0%
Applied egg-rr22.4%
Taylor expanded in U* around inf 47.4%
associate-/l*47.4%
associate-*r/47.3%
associate-*r*47.3%
Simplified47.3%
if 2.4500000000000001e266 < l Initial program 10.3%
Simplified10.9%
Taylor expanded in l around inf 46.1%
*-commutative46.1%
associate-*r*54.8%
associate-/l*54.8%
associate-*r/54.8%
metadata-eval54.8%
Simplified54.8%
Taylor expanded in n around 0 36.8%
associate-*r/36.8%
associate-*r*36.8%
Simplified36.8%
Final simplification46.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* l_m (sqrt 2.0))))
(if (<= l_m 2.1e-95)
(sqrt (* 2.0 (* t (* n U))))
(if (<= l_m 7e+199)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))
(if (<= l_m 7.6e+267)
(* t_1 (* (/ n Om) (sqrt (* U U*))))
(* t_1 (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 = l_m * sqrt(2.0);
double tmp;
if (l_m <= 2.1e-95) {
tmp = sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 7e+199) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else if (l_m <= 7.6e+267) {
tmp = t_1 * ((n / Om) * sqrt((U * U_42_)));
} else {
tmp = t_1 * 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 = l_m * sqrt(2.0d0)
if (l_m <= 2.1d-95) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else if (l_m <= 7d+199) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l_m * (l_m / om)))))))
else if (l_m <= 7.6d+267) then
tmp = t_1 * ((n / om) * sqrt((u * u_42)))
else
tmp = t_1 * 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 = l_m * Math.sqrt(2.0);
double tmp;
if (l_m <= 2.1e-95) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 7e+199) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else if (l_m <= 7.6e+267) {
tmp = t_1 * ((n / Om) * Math.sqrt((U * U_42_)));
} else {
tmp = t_1 * 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 = l_m * math.sqrt(2.0) tmp = 0 if l_m <= 2.1e-95: tmp = math.sqrt((2.0 * (t * (n * U)))) elif l_m <= 7e+199: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))) elif l_m <= 7.6e+267: tmp = t_1 * ((n / Om) * math.sqrt((U * U_42_))) else: tmp = t_1 * 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(l_m * sqrt(2.0)) tmp = 0.0 if (l_m <= 2.1e-95) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); elseif (l_m <= 7e+199) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); elseif (l_m <= 7.6e+267) tmp = Float64(t_1 * Float64(Float64(n / Om) * sqrt(Float64(U * U_42_)))); else tmp = Float64(t_1 * sqrt(Float64(Float64(n * Float64(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 = l_m * sqrt(2.0); tmp = 0.0; if (l_m <= 2.1e-95) tmp = sqrt((2.0 * (t * (n * U)))); elseif (l_m <= 7e+199) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))); elseif (l_m <= 7.6e+267) tmp = t_1 * ((n / Om) * sqrt((U * U_42_))); else tmp = t_1 * 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[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l$95$m, 2.1e-95], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 7e+199], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 7.6e+267], N[(t$95$1 * N[(N[(n / Om), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(N[(n * N[(U * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := l\_m \cdot \sqrt{2}\\
\mathbf{if}\;l\_m \leq 2.1 \cdot 10^{-95}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{elif}\;l\_m \leq 7 \cdot 10^{+199}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{elif}\;l\_m \leq 7.6 \cdot 10^{+267}:\\
\;\;\;\;t\_1 \cdot \left(\frac{n}{Om} \cdot \sqrt{U \cdot U*}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{\frac{n \cdot \left(U \cdot -2\right)}{Om}}\\
\end{array}
\end{array}
if l < 2.1e-95Initial program 54.7%
Simplified53.3%
Taylor expanded in l around 0 41.4%
add-cbrt-cube15.9%
pow1/316.6%
pow316.6%
Applied egg-rr16.6%
pow-pow41.4%
metadata-eval41.4%
pow141.4%
associate-*r*45.6%
Applied egg-rr45.6%
if 2.1e-95 < l < 6.99999999999999962e199Initial program 48.1%
Simplified54.8%
Taylor expanded in Om around inf 40.2%
unpow240.2%
associate-*r/48.4%
*-commutative48.4%
Applied egg-rr48.4%
if 6.99999999999999962e199 < l < 7.60000000000000035e267Initial program 9.0%
Simplified22.4%
Taylor expanded in l around inf 67.8%
*-commutative67.8%
associate-*r*73.9%
associate-/l*73.9%
associate-*r/73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in U* around inf 47.5%
if 7.60000000000000035e267 < l Initial program 10.3%
Simplified10.9%
Taylor expanded in l around inf 46.1%
*-commutative46.1%
associate-*r*54.8%
associate-/l*54.8%
associate-*r/54.8%
metadata-eval54.8%
Simplified54.8%
Taylor expanded in n around 0 36.8%
associate-*r/36.8%
associate-*r*36.8%
Simplified36.8%
Final simplification46.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 9.5e-95)
(sqrt (* 2.0 (* t (* n U))))
(if (<= l_m 7.2e+199)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))
(* l_m (* (sqrt (* U U*)) (* n (/ (sqrt 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 <= 9.5e-95) {
tmp = sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 7.2e+199) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = l_m * (sqrt((U * U_42_)) * (n * (sqrt(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 <= 9.5d-95) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else if (l_m <= 7.2d+199) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l_m * (l_m / om)))))))
else
tmp = l_m * (sqrt((u * u_42)) * (n * (sqrt(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 <= 9.5e-95) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 7.2e+199) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = l_m * (Math.sqrt((U * U_42_)) * (n * (Math.sqrt(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 <= 9.5e-95: tmp = math.sqrt((2.0 * (t * (n * U)))) elif l_m <= 7.2e+199: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))) else: tmp = l_m * (math.sqrt((U * U_42_)) * (n * (math.sqrt(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 <= 9.5e-95) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); elseif (l_m <= 7.2e+199) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(l_m * Float64(sqrt(Float64(U * U_42_)) * Float64(n * Float64(sqrt(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 <= 9.5e-95) tmp = sqrt((2.0 * (t * (n * U)))); elseif (l_m <= 7.2e+199) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))); else tmp = l_m * (sqrt((U * U_42_)) * (n * (sqrt(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, 9.5e-95], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 7.2e+199], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 9.5 \cdot 10^{-95}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{elif}\;l\_m \leq 7.2 \cdot 10^{+199}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left(\sqrt{U \cdot U*} \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\\
\end{array}
\end{array}
if l < 9.49999999999999998e-95Initial program 54.7%
Simplified53.3%
Taylor expanded in l around 0 41.4%
add-cbrt-cube15.9%
pow1/316.6%
pow316.6%
Applied egg-rr16.6%
pow-pow41.4%
metadata-eval41.4%
pow141.4%
associate-*r*45.6%
Applied egg-rr45.6%
if 9.49999999999999998e-95 < l < 7.20000000000000002e199Initial program 48.1%
Simplified54.8%
Taylor expanded in Om around inf 40.2%
unpow240.2%
associate-*r/48.4%
*-commutative48.4%
Applied egg-rr48.4%
if 7.20000000000000002e199 < l Initial program 9.6%
Simplified17.2%
fma-undefine17.2%
associate-*r*17.4%
add-cube-cbrt17.4%
pow317.4%
fma-define17.4%
associate-*r/9.6%
pow29.6%
associate-*r*9.4%
Applied egg-rr9.4%
unpow210.2%
associate-*r/10.3%
*-commutative10.3%
Applied egg-rr17.2%
Taylor expanded in U* around inf 31.8%
associate-/l*31.8%
associate-*r/31.7%
associate-*r*31.7%
Simplified31.7%
Final simplification44.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 4.15e-95) (sqrt (* 2.0 (* t (* n U)))) (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l_m (/ l_m Om)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 4.15e-95) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 4.15d-95) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l_m * (l_m / om)))))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 4.15e-95) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om)))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 4.15e-95: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 4.15e-95) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 4.15e-95) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l_m * (l_m / Om))))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 4.15e-95], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 4.15 \cdot 10^{-95}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 4.14999999999999996e-95Initial program 54.7%
Simplified53.3%
Taylor expanded in l around 0 41.4%
add-cbrt-cube15.9%
pow1/316.6%
pow316.6%
Applied egg-rr16.6%
pow-pow41.4%
metadata-eval41.4%
pow141.4%
associate-*r*45.6%
Applied egg-rr45.6%
if 4.14999999999999996e-95 < l Initial program 36.4%
Simplified43.5%
Taylor expanded in Om around inf 31.1%
unpow231.1%
associate-*r/36.9%
*-commutative36.9%
Applied egg-rr36.9%
Final simplification42.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.35e-147) (sqrt (* 2.0 (* t (* n U)))) (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.35e-147) {
tmp = sqrt((2.0 * (t * (n * U))));
} 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.35d-147) then
tmp = sqrt((2.0d0 * (t * (n * u))))
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.35e-147) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} 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.35e-147: tmp = math.sqrt((2.0 * (t * (n * U)))) 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.35e-147) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = Float64(Float64(2.0 * 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.35e-147) tmp = sqrt((2.0 * (t * (n * U)))); 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.35e-147], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.35 \cdot 10^{-147}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.35e-147Initial program 53.9%
Simplified52.5%
Taylor expanded in l around 0 39.0%
add-cbrt-cube15.6%
pow1/316.4%
pow316.4%
Applied egg-rr16.4%
pow-pow39.0%
metadata-eval39.0%
pow139.0%
associate-*r*44.2%
Applied egg-rr44.2%
if 1.35e-147 < l Initial program 40.0%
Simplified46.2%
Taylor expanded in l around 0 29.3%
pow1/232.3%
associate-*r*32.3%
Applied egg-rr32.3%
Final simplification39.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 4.4e-167) (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 <= 4.4e-167) {
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 <= 4.4d-167) 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 <= 4.4e-167) {
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 <= 4.4e-167: 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 <= 4.4e-167) tmp = sqrt(Float64(2.0 * Float64(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 <= 4.4e-167) 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, 4.4e-167], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $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 4.4 \cdot 10^{-167}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 4.3999999999999999e-167Initial program 52.4%
Simplified52.2%
Taylor expanded in l around 0 38.4%
if 4.3999999999999999e-167 < l Initial program 42.9%
Simplified46.9%
Taylor expanded in l around 0 31.7%
Final simplification35.7%
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 48.5%
Simplified50.1%
Taylor expanded in l around 0 35.2%
Final simplification35.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* t (* n U)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((2.0 * (t * (n * U))));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (t * (n * u))))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt((2.0 * (t * (n * U))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (t * (n * U))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(t * Float64(n * U)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (t * (n * U)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}
\end{array}
Initial program 48.5%
Simplified50.1%
Taylor expanded in l around 0 35.2%
add-cbrt-cube16.0%
pow1/317.6%
pow317.6%
Applied egg-rr17.6%
pow-pow35.2%
metadata-eval35.2%
pow135.2%
associate-*r*37.6%
Applied egg-rr37.6%
Final simplification37.6%
herbie shell --seed 2024059
(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*))))))