
(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 14 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
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (+ t (* (/ (pow l_m 2.0) Om) -2.0)))))
(if (<= t_1 2e+150)
t_1
(*
(* l_m (sqrt 2.0))
(sqrt (* (* n U) (- (/ n (/ (pow Om 2.0) (- U* 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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t + ((pow(l_m, 2.0) / Om) * -2.0))));
} else if (t_1 <= 2e+150) {
tmp = t_1;
} else {
tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((n / (pow(Om, 2.0) / (U_42_ - 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 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) + ((n * ((l_m / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 0.0d0) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * (t + (((l_m ** 2.0d0) / om) * (-2.0d0)))))
else if (t_1 <= 2d+150) then
tmp = t_1
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((n * u) * ((n / ((om ** 2.0d0) / (u_42 - 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.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0))));
} else if (t_1 <= 2e+150) {
tmp = t_1;
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * ((n / (Math.pow(Om, 2.0) / (U_42_ - U))) - (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 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))) elif t_1 <= 2e+150: tmp = t_1 else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * ((n / (math.pow(Om, 2.0) / (U_42_ - U))) - (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 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0))))); elseif (t_1 <= 2e+150) tmp = t_1; else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(n / Float64((Om ^ 2.0) / Float64(U_42_ - U))) - 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 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t + (((l_m ^ 2.0) / Om) * -2.0)))); elseif (t_1 <= 2e+150) tmp = t_1; else tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((n / ((Om ^ 2.0) / (U_42_ - 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[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+150], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(n / N[(N[Power[Om, 2.0], $MachinePrecision] / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \frac{{l\_m}^{2}}{Om} \cdot -2\right)}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} - \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*))))) < 0.0Initial program 9.2%
associate-*l/9.2%
Applied egg-rr9.2%
Taylor expanded in n around 0 9.2%
pow1/29.2%
associate-*l*32.1%
unpow-prod-down40.9%
pow1/240.9%
cancel-sign-sub-inv40.9%
metadata-eval40.9%
Applied egg-rr40.9%
unpow1/240.9%
*-commutative40.9%
Simplified40.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999996e150Initial program 97.9%
if 1.99999999999999996e150 < (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 22.6%
Simplified31.8%
add-sqr-sqrt18.0%
pow218.0%
sqrt-prod17.5%
unpow217.5%
sqrt-prod6.7%
add-sqr-sqrt17.5%
Applied egg-rr17.5%
Taylor expanded in l around inf 23.4%
*-commutative23.4%
associate-*r*24.3%
*-commutative24.3%
associate-/l*25.1%
associate-*r/25.1%
metadata-eval25.1%
Simplified25.1%
Final simplification53.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (+ t (* (/ (pow l_m 2.0) Om) -2.0)))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
(*
(* l_m (sqrt 2.0))
(sqrt (* U (* n (+ (/ n (/ (pow Om 2.0) (- U* 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 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t + ((pow(l_m, 2.0) / Om) * -2.0))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * ((n / (pow(Om, 2.0) / (U_42_ - U))) + (-2.0 / Om)))));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((U * (n * ((n / (Math.pow(Om, 2.0) / (U_42_ - U))) + (-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 = (2.0 * n) * U t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((U * (n * ((n / (math.pow(Om, 2.0) / (U_42_ - U))) + (-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 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0))))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(n / Float64((Om ^ 2.0) / Float64(U_42_ - U))) + 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 = (2.0 * n) * U; t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t + (((l_m ^ 2.0) / Om) * -2.0)))); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))); else tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * ((n / ((Om ^ 2.0) / (U_42_ - 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[(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[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(n / N[(N[Power[Om, 2.0], $MachinePrecision] / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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{t\_2 \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \frac{{l\_m}^{2}}{Om} \cdot -2\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} + \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*))))) < 0.0Initial program 9.2%
associate-*l/9.2%
Applied egg-rr9.2%
Taylor expanded in n around 0 9.2%
pow1/29.2%
associate-*l*32.1%
unpow-prod-down40.9%
pow1/240.9%
cancel-sign-sub-inv40.9%
metadata-eval40.9%
Applied egg-rr40.9%
unpow1/240.9%
*-commutative40.9%
Simplified40.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 66.8%
associate-*l/72.4%
Applied egg-rr72.4%
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%
Simplified6.0%
Taylor expanded in l around inf 29.5%
sub-neg29.5%
associate-/l*29.4%
associate-*r/29.4%
metadata-eval29.4%
distribute-neg-frac29.4%
metadata-eval29.4%
Simplified29.4%
Final simplification60.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 (* (* 2.0 n) U))
(t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (+ t (* (/ (pow l_m 2.0) Om) -2.0)))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
(*
(* l_m (sqrt 2.0))
(sqrt (* U (* n (- (/ (* 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 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t + ((pow(l_m, 2.0) / Om) * -2.0))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) - (2.0 / Om)))));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((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 = (2.0 * n) * U t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((U * (n * (((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 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0))))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * 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 = (2.0 * n) * U; t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t + (((l_m ^ 2.0) / Om) * -2.0)))); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))); else tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * 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 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \frac{{l\_m}^{2}}{Om} \cdot -2\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{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*))))) < 0.0Initial program 9.2%
associate-*l/9.2%
Applied egg-rr9.2%
Taylor expanded in n around 0 9.2%
pow1/29.2%
associate-*l*32.1%
unpow-prod-down40.9%
pow1/240.9%
cancel-sign-sub-inv40.9%
metadata-eval40.9%
Applied egg-rr40.9%
unpow1/240.9%
*-commutative40.9%
Simplified40.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 66.8%
associate-*l/72.4%
Applied egg-rr72.4%
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%
Simplified6.0%
Taylor expanded in l around inf 29.5%
associate-*r/29.5%
metadata-eval29.5%
Simplified29.5%
Final simplification60.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= t_1 2e+150)
t_1
(fabs (/ (* n l_m) (/ Om (sqrt (* (- U* U) (* 2.0 U))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (t_1 <= 2e+150) {
tmp = t_1;
} else {
tmp = fabs(((n * l_m) / (Om / sqrt(((U_42_ - U) * (2.0 * U))))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) + ((n * ((l_m / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 0.0d0) then
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
else if (t_1 <= 2d+150) then
tmp = t_1
else
tmp = abs(((n * l_m) / (om / sqrt(((u_42 - u) * (2.0d0 * u))))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (t_1 <= 2e+150) {
tmp = t_1;
} else {
tmp = Math.abs(((n * l_m) / (Om / Math.sqrt(((U_42_ - U) * (2.0 * U))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif t_1 <= 2e+150: tmp = t_1 else: tmp = math.fabs(((n * l_m) / (Om / math.sqrt(((U_42_ - U) * (2.0 * U)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (t_1 <= 2e+150) tmp = t_1; else tmp = abs(Float64(Float64(n * l_m) / Float64(Om / sqrt(Float64(Float64(U_42_ - U) * Float64(2.0 * U)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (t_1 <= 2e+150) tmp = t_1; else tmp = abs(((n * l_m) / (Om / sqrt(((U_42_ - U) * (2.0 * U)))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+150], t$95$1, N[Abs[N[(N[(n * l$95$m), $MachinePrecision] / N[(Om / N[Sqrt[N[(N[(U$42$ - U), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{n \cdot l\_m}{\frac{Om}{\sqrt{\left(U* - U\right) \cdot \left(2 \cdot U\right)}}}\right|\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 9.2%
Simplified9.2%
Taylor expanded in l around 0 29.8%
pow1/229.8%
associate-*r*29.8%
unpow-prod-down38.3%
pow1/238.3%
Applied egg-rr38.3%
unpow1/238.3%
Simplified38.3%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999996e150Initial program 97.9%
if 1.99999999999999996e150 < (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 22.6%
Simplified31.8%
Taylor expanded in n around inf 20.2%
associate-*l/20.2%
associate-*r*20.2%
Applied egg-rr20.2%
associate-*r*20.2%
sqrt-prod12.1%
*-commutative12.1%
associate-*l/12.1%
add-sqr-sqrt12.0%
sqrt-unprod15.5%
pow215.5%
Applied egg-rr31.5%
unpow231.5%
rem-sqrt-square45.0%
associate-/l*42.8%
*-commutative42.8%
associate-*r*42.8%
Simplified42.8%
Final simplification61.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 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (+ t (* (/ (pow l_m 2.0) Om) -2.0)))))
(if (<= t_1 2e+150)
t_1
(fabs (/ (* n l_m) (/ Om (sqrt (* (- U* U) (* 2.0 U))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t + ((pow(l_m, 2.0) / Om) * -2.0))));
} else if (t_1 <= 2e+150) {
tmp = t_1;
} else {
tmp = fabs(((n * l_m) / (Om / sqrt(((U_42_ - U) * (2.0 * U))))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) + ((n * ((l_m / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 0.0d0) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * (t + (((l_m ** 2.0d0) / om) * (-2.0d0)))))
else if (t_1 <= 2d+150) then
tmp = t_1
else
tmp = abs(((n * l_m) / (om / sqrt(((u_42 - u) * (2.0d0 * u))))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0))));
} else if (t_1 <= 2e+150) {
tmp = t_1;
} else {
tmp = Math.abs(((n * l_m) / (Om / Math.sqrt(((U_42_ - U) * (2.0 * U))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))) elif t_1 <= 2e+150: tmp = t_1 else: tmp = math.fabs(((n * l_m) / (Om / math.sqrt(((U_42_ - U) * (2.0 * U)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0))))); elseif (t_1 <= 2e+150) tmp = t_1; else tmp = abs(Float64(Float64(n * l_m) / Float64(Om / sqrt(Float64(Float64(U_42_ - U) * Float64(2.0 * U)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t + (((l_m ^ 2.0) / Om) * -2.0)))); elseif (t_1 <= 2e+150) tmp = t_1; else tmp = abs(((n * l_m) / (Om / sqrt(((U_42_ - U) * (2.0 * U)))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+150], t$95$1, N[Abs[N[(N[(n * l$95$m), $MachinePrecision] / N[(Om / N[Sqrt[N[(N[(U$42$ - U), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \frac{{l\_m}^{2}}{Om} \cdot -2\right)}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{n \cdot l\_m}{\frac{Om}{\sqrt{\left(U* - U\right) \cdot \left(2 \cdot U\right)}}}\right|\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 9.2%
associate-*l/9.2%
Applied egg-rr9.2%
Taylor expanded in n around 0 9.2%
pow1/29.2%
associate-*l*32.1%
unpow-prod-down40.9%
pow1/240.9%
cancel-sign-sub-inv40.9%
metadata-eval40.9%
Applied egg-rr40.9%
unpow1/240.9%
*-commutative40.9%
Simplified40.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999996e150Initial program 97.9%
if 1.99999999999999996e150 < (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 22.6%
Simplified31.8%
Taylor expanded in n around inf 20.2%
associate-*l/20.2%
associate-*r*20.2%
Applied egg-rr20.2%
associate-*r*20.2%
sqrt-prod12.1%
*-commutative12.1%
associate-*l/12.1%
add-sqr-sqrt12.0%
sqrt-unprod15.5%
pow215.5%
Applied egg-rr31.5%
unpow231.5%
rem-sqrt-square45.0%
associate-/l*42.8%
*-commutative42.8%
associate-*r*42.8%
Simplified42.8%
Final simplification61.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U -5e-50)
(sqrt (* (* (* 2.0 n) U) (- t (* 2.0 (* l_m (/ l_m Om))))))
(if (or (<= U -1e-312) (and (not (<= U 2e-147)) (<= U 8.5e+178)))
(sqrt
(*
(* 2.0 n)
(*
U
(-
(* n (* (pow (/ l_m Om) 2.0) (- U* U)))
(- (/ (* 2.0 (* l_m l_m)) Om) t)))))
(* (sqrt (* 2.0 U)) (sqrt (* n t))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -5e-50) {
tmp = sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
} else if ((U <= -1e-312) || (!(U <= 2e-147) && (U <= 8.5e+178))) {
tmp = sqrt(((2.0 * n) * (U * ((n * (pow((l_m / Om), 2.0) * (U_42_ - U))) - (((2.0 * (l_m * l_m)) / Om) - t)))));
} else {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= (-5d-50)) then
tmp = sqrt((((2.0d0 * n) * u) * (t - (2.0d0 * (l_m * (l_m / om))))))
else if ((u <= (-1d-312)) .or. (.not. (u <= 2d-147)) .and. (u <= 8.5d+178)) then
tmp = sqrt(((2.0d0 * n) * (u * ((n * (((l_m / om) ** 2.0d0) * (u_42 - u))) - (((2.0d0 * (l_m * l_m)) / om) - t)))))
else
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -5e-50) {
tmp = Math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
} else if ((U <= -1e-312) || (!(U <= 2e-147) && (U <= 8.5e+178))) {
tmp = Math.sqrt(((2.0 * n) * (U * ((n * (Math.pow((l_m / Om), 2.0) * (U_42_ - U))) - (((2.0 * (l_m * l_m)) / Om) - t)))));
} else {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -5e-50: tmp = math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om)))))) elif (U <= -1e-312) or (not (U <= 2e-147) and (U <= 8.5e+178)): tmp = math.sqrt(((2.0 * n) * (U * ((n * (math.pow((l_m / Om), 2.0) * (U_42_ - U))) - (((2.0 * (l_m * l_m)) / Om) - t))))) else: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -5e-50) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))); elseif ((U <= -1e-312) || (!(U <= 2e-147) && (U <= 8.5e+178))) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * Float64(U_42_ - U))) - Float64(Float64(Float64(2.0 * Float64(l_m * l_m)) / Om) - t))))); else tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= -5e-50) tmp = sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om)))))); elseif ((U <= -1e-312) || (~((U <= 2e-147)) && (U <= 8.5e+178))) tmp = sqrt(((2.0 * n) * (U * ((n * (((l_m / Om) ^ 2.0) * (U_42_ - U))) - (((2.0 * (l_m * l_m)) / Om) - t))))); else tmp = sqrt((2.0 * U)) * sqrt((n * t)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -5e-50], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[U, -1e-312], And[N[Not[LessEqual[U, 2e-147]], $MachinePrecision], LessEqual[U, 8.5e+178]]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(2.0 * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -5 \cdot 10^{-50}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\mathbf{elif}\;U \leq -1 \cdot 10^{-312} \lor \neg \left(U \leq 2 \cdot 10^{-147}\right) \land U \leq 8.5 \cdot 10^{+178}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(n \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right) - \left(\frac{2 \cdot \left(l\_m \cdot l\_m\right)}{Om} - t\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\end{array}
\end{array}
if U < -4.99999999999999968e-50Initial program 44.7%
associate-*l/55.1%
Applied egg-rr55.1%
Taylor expanded in n around 0 42.1%
unpow242.1%
associate-*l/51.0%
Applied egg-rr51.0%
if -4.99999999999999968e-50 < U < -9.9999999999847e-313 or 1.9999999999999999e-147 < U < 8.49999999999999991e178Initial program 48.9%
Simplified52.0%
if -9.9999999999847e-313 < U < 1.9999999999999999e-147 or 8.49999999999999991e178 < U Initial program 42.6%
Simplified44.1%
Taylor expanded in l around 0 44.1%
pow1/244.1%
associate-*r*44.1%
unpow-prod-down68.2%
pow1/268.2%
Applied egg-rr68.2%
unpow1/268.2%
Simplified68.2%
Final simplification55.7%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (or (<= U -1e-312) (and (not (<= U 4.5e-150)) (<= U 5.8e+210)))
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (* l_m (/ l_m Om))))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))
(* (sqrt (* 2.0 U)) (sqrt (* n t)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((U <= -1e-312) || (!(U <= 4.5e-150) && (U <= 5.8e+210))) {
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 {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((u <= (-1d-312)) .or. (.not. (u <= 4.5d-150)) .and. (u <= 5.8d+210)) 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
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((U <= -1e-312) || (!(U <= 4.5e-150) && (U <= 5.8e+210))) {
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 {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (U <= -1e-312) or (not (U <= 4.5e-150) and (U <= 5.8e+210)): 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: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if ((U <= -1e-312) || (!(U <= 4.5e-150) && (U <= 5.8e+210))) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))); else tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if ((U <= -1e-312) || (~((U <= 4.5e-150)) && (U <= 5.8e+210))) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l_m * (l_m / Om)))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U))))); else tmp = sqrt((2.0 * U)) * sqrt((n * t)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[Or[LessEqual[U, -1e-312], And[N[Not[LessEqual[U, 4.5e-150]], $MachinePrecision], LessEqual[U, 5.8e+210]]], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $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], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1 \cdot 10^{-312} \lor \neg \left(U \leq 4.5 \cdot 10^{-150}\right) \land U \leq 5.8 \cdot 10^{+210}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\end{array}
\end{array}
if U < -9.9999999999847e-313 or 4.5000000000000002e-150 < U < 5.79999999999999984e210Initial program 48.8%
associate-*l/54.1%
Applied egg-rr54.1%
if -9.9999999999847e-313 < U < 4.5000000000000002e-150 or 5.79999999999999984e210 < U Initial program 37.6%
Simplified39.4%
Taylor expanded in l around 0 43.1%
pow1/243.1%
associate-*r*43.1%
unpow-prod-down69.1%
pow1/269.1%
Applied egg-rr69.1%
unpow1/269.1%
Simplified69.1%
Final simplification57.2%
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)))))))
(t_2 (fabs (/ (* n l_m) (/ Om (sqrt (* (- U* U) (* 2.0 U))))))))
(if (<= Om -4.5e-97)
t_1
(if (<= Om 5.5e-123)
t_2
(if (<= Om 1.2e-76)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(if (<= Om 11500000000000.0) t_2 t_1))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
double t_2 = fabs(((n * l_m) / (Om / sqrt(((U_42_ - U) * (2.0 * U))))));
double tmp;
if (Om <= -4.5e-97) {
tmp = t_1;
} else if (Om <= 5.5e-123) {
tmp = t_2;
} else if (Om <= 1.2e-76) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else if (Om <= 11500000000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * (t - (2.0d0 * (l_m * (l_m / om))))))
t_2 = abs(((n * l_m) / (om / sqrt(((u_42 - u) * (2.0d0 * u))))))
if (om <= (-4.5d-97)) then
tmp = t_1
else if (om <= 5.5d-123) then
tmp = t_2
else if (om <= 1.2d-76) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else if (om <= 11500000000000.0d0) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
double t_2 = Math.abs(((n * l_m) / (Om / Math.sqrt(((U_42_ - U) * (2.0 * U))))));
double tmp;
if (Om <= -4.5e-97) {
tmp = t_1;
} else if (Om <= 5.5e-123) {
tmp = t_2;
} else if (Om <= 1.2e-76) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else if (Om <= 11500000000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
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)))))) t_2 = math.fabs(((n * l_m) / (Om / math.sqrt(((U_42_ - U) * (2.0 * U)))))) tmp = 0 if Om <= -4.5e-97: tmp = t_1 elif Om <= 5.5e-123: tmp = t_2 elif Om <= 1.2e-76: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) elif Om <= 11500000000000.0: tmp = t_2 else: tmp = t_1 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(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))) t_2 = abs(Float64(Float64(n * l_m) / Float64(Om / sqrt(Float64(Float64(U_42_ - U) * Float64(2.0 * U)))))) tmp = 0.0 if (Om <= -4.5e-97) tmp = t_1; elseif (Om <= 5.5e-123) tmp = t_2; elseif (Om <= 1.2e-76) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); elseif (Om <= 11500000000000.0) tmp = t_2; else tmp = t_1; 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)))))); t_2 = abs(((n * l_m) / (Om / sqrt(((U_42_ - U) * (2.0 * U)))))); tmp = 0.0; if (Om <= -4.5e-97) tmp = t_1; elseif (Om <= 5.5e-123) tmp = t_2; elseif (Om <= 1.2e-76) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); elseif (Om <= 11500000000000.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[(n * l$95$m), $MachinePrecision] / N[(Om / N[Sqrt[N[(N[(U$42$ - U), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -4.5e-97], t$95$1, If[LessEqual[Om, 5.5e-123], t$95$2, If[LessEqual[Om, 1.2e-76], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 11500000000000.0], t$95$2, t$95$1]]]]]]
\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(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
t_2 := \left|\frac{n \cdot l\_m}{\frac{Om}{\sqrt{\left(U* - U\right) \cdot \left(2 \cdot U\right)}}}\right|\\
\mathbf{if}\;Om \leq -4.5 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;Om \leq 5.5 \cdot 10^{-123}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;Om \leq 1.2 \cdot 10^{-76}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;Om \leq 11500000000000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if Om < -4.5000000000000001e-97 or 1.15e13 < Om Initial program 49.8%
associate-*l/56.9%
Applied egg-rr56.9%
Taylor expanded in n around 0 47.3%
unpow247.3%
associate-*l/53.9%
Applied egg-rr53.9%
if -4.5000000000000001e-97 < Om < 5.5e-123 or 1.20000000000000007e-76 < Om < 1.15e13Initial program 37.5%
Simplified36.2%
Taylor expanded in n around inf 24.5%
associate-*l/24.6%
associate-*r*24.6%
Applied egg-rr24.6%
associate-*r*24.6%
sqrt-prod13.3%
*-commutative13.3%
associate-*l/13.3%
add-sqr-sqrt13.1%
sqrt-unprod17.5%
pow217.5%
Applied egg-rr36.9%
unpow236.9%
rem-sqrt-square53.6%
associate-/l*50.3%
*-commutative50.3%
associate-*r*50.3%
Simplified50.3%
if 5.5e-123 < Om < 1.20000000000000007e-76Initial program 55.8%
Simplified72.1%
Taylor expanded in n around 0 65.6%
Final simplification53.4%
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))))))))
(if (<= U -1.8e+64)
t_1
(if (<= U 1e-309)
(pow (* (* 2.0 n) (* U (+ t (* (/ (pow l_m 2.0) Om) -2.0)))) 0.5)
(if (or (<= U 4.5e-148) (not (<= U 1.35e+160)))
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
t_1)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
double tmp;
if (U <= -1.8e+64) {
tmp = t_1;
} else if (U <= 1e-309) {
tmp = pow(((2.0 * n) * (U * (t + ((pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
} else if ((U <= 4.5e-148) || !(U <= 1.35e+160)) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else {
tmp = t_1;
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * (t - (2.0d0 * (l_m * (l_m / om))))))
if (u <= (-1.8d+64)) then
tmp = t_1
else if (u <= 1d-309) then
tmp = ((2.0d0 * n) * (u * (t + (((l_m ** 2.0d0) / om) * (-2.0d0))))) ** 0.5d0
else if ((u <= 4.5d-148) .or. (.not. (u <= 1.35d+160))) then
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
else
tmp = t_1
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
double tmp;
if (U <= -1.8e+64) {
tmp = t_1;
} else if (U <= 1e-309) {
tmp = Math.pow(((2.0 * n) * (U * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
} else if ((U <= 4.5e-148) || !(U <= 1.35e+160)) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else {
tmp = t_1;
}
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)))))) tmp = 0 if U <= -1.8e+64: tmp = t_1 elif U <= 1e-309: tmp = math.pow(((2.0 * n) * (U * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5) elif (U <= 4.5e-148) or not (U <= 1.35e+160): tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) else: tmp = t_1 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(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))) tmp = 0.0 if (U <= -1.8e+64) tmp = t_1; elseif (U <= 1e-309) tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; elseif ((U <= 4.5e-148) || !(U <= 1.35e+160)) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); else tmp = t_1; 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)))))); tmp = 0.0; if (U <= -1.8e+64) tmp = t_1; elseif (U <= 1e-309) tmp = ((2.0 * n) * (U * (t + (((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5; elseif ((U <= 4.5e-148) || ~((U <= 1.35e+160))) tmp = sqrt((2.0 * U)) * sqrt((n * t)); else tmp = t_1; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[U, -1.8e+64], t$95$1, If[LessEqual[U, 1e-309], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[Or[LessEqual[U, 4.5e-148], N[Not[LessEqual[U, 1.35e+160]], $MachinePrecision]], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\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(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\mathbf{if}\;U \leq -1.8 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;U \leq 10^{-309}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;U \leq 4.5 \cdot 10^{-148} \lor \neg \left(U \leq 1.35 \cdot 10^{+160}\right):\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if U < -1.80000000000000007e64 or 4.50000000000000015e-148 < U < 1.35e160Initial program 59.8%
associate-*l/65.1%
Applied egg-rr65.1%
Taylor expanded in n around 0 54.8%
unpow254.8%
associate-*l/60.0%
Applied egg-rr60.0%
if -1.80000000000000007e64 < U < 1.000000000000002e-309Initial program 37.1%
associate-*l/43.0%
Applied egg-rr43.0%
Taylor expanded in n around 0 28.6%
pow1/234.8%
associate-*l*39.4%
cancel-sign-sub-inv39.4%
metadata-eval39.4%
Applied egg-rr39.4%
if 1.000000000000002e-309 < U < 4.50000000000000015e-148 or 1.35e160 < U Initial program 41.4%
Simplified42.9%
Taylor expanded in l around 0 44.4%
pow1/244.4%
associate-*r*44.4%
unpow-prod-down67.8%
pow1/267.8%
Applied egg-rr67.8%
unpow1/267.8%
Simplified67.8%
Final simplification54.0%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (or (<= Om -1.35e-95) (not (<= Om 10000000000000.0))) (sqrt (* (* (* 2.0 n) U) (- t (* 2.0 (* l_m (/ l_m Om)))))) (fabs (/ (* n l_m) (/ Om (sqrt (* (- U* U) (* 2.0 U))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((Om <= -1.35e-95) || !(Om <= 10000000000000.0)) {
tmp = sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = fabs(((n * l_m) / (Om / sqrt(((U_42_ - U) * (2.0 * 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 ((om <= (-1.35d-95)) .or. (.not. (om <= 10000000000000.0d0))) then
tmp = sqrt((((2.0d0 * n) * u) * (t - (2.0d0 * (l_m * (l_m / om))))))
else
tmp = abs(((n * l_m) / (om / sqrt(((u_42 - u) * (2.0d0 * 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 ((Om <= -1.35e-95) || !(Om <= 10000000000000.0)) {
tmp = Math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = Math.abs(((n * l_m) / (Om / Math.sqrt(((U_42_ - U) * (2.0 * U))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (Om <= -1.35e-95) or not (Om <= 10000000000000.0): tmp = math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om)))))) else: tmp = math.fabs(((n * l_m) / (Om / math.sqrt(((U_42_ - U) * (2.0 * U)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if ((Om <= -1.35e-95) || !(Om <= 10000000000000.0)) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))); else tmp = abs(Float64(Float64(n * l_m) / Float64(Om / sqrt(Float64(Float64(U_42_ - U) * Float64(2.0 * 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 ((Om <= -1.35e-95) || ~((Om <= 10000000000000.0))) tmp = sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om)))))); else tmp = abs(((n * l_m) / (Om / sqrt(((U_42_ - U) * (2.0 * U)))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[Or[LessEqual[Om, -1.35e-95], N[Not[LessEqual[Om, 10000000000000.0]], $MachinePrecision]], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(n * l$95$m), $MachinePrecision] / N[(Om / N[Sqrt[N[(N[(U$42$ - U), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.35 \cdot 10^{-95} \lor \neg \left(Om \leq 10000000000000\right):\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{n \cdot l\_m}{\frac{Om}{\sqrt{\left(U* - U\right) \cdot \left(2 \cdot U\right)}}}\right|\\
\end{array}
\end{array}
if Om < -1.35e-95 or 1e13 < Om Initial program 49.8%
associate-*l/56.9%
Applied egg-rr56.9%
Taylor expanded in n around 0 47.3%
unpow247.3%
associate-*l/53.9%
Applied egg-rr53.9%
if -1.35e-95 < Om < 1e13Initial program 40.3%
Simplified39.2%
Taylor expanded in n around inf 22.0%
associate-*l/22.1%
associate-*r*22.1%
Applied egg-rr22.1%
associate-*r*22.1%
sqrt-prod12.4%
*-commutative12.4%
associate-*l/12.4%
add-sqr-sqrt12.3%
sqrt-unprod18.2%
pow218.2%
Applied egg-rr35.8%
unpow235.8%
rem-sqrt-square50.0%
associate-/l*47.1%
*-commutative47.1%
associate-*r*47.2%
Simplified47.2%
Final simplification51.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (or (<= U -1e-312) (and (not (<= U 2.3e-148)) (<= U 1.3e+160))) (sqrt (* (* (* 2.0 n) U) (- t (* 2.0 (* l_m (/ l_m Om)))))) (* (sqrt (* 2.0 U)) (sqrt (* n t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((U <= -1e-312) || (!(U <= 2.3e-148) && (U <= 1.3e+160))) {
tmp = sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((u <= (-1d-312)) .or. (.not. (u <= 2.3d-148)) .and. (u <= 1.3d+160)) then
tmp = sqrt((((2.0d0 * n) * u) * (t - (2.0d0 * (l_m * (l_m / om))))))
else
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((U <= -1e-312) || (!(U <= 2.3e-148) && (U <= 1.3e+160))) {
tmp = Math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (U <= -1e-312) or (not (U <= 2.3e-148) and (U <= 1.3e+160)): tmp = math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om)))))) else: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if ((U <= -1e-312) || (!(U <= 2.3e-148) && (U <= 1.3e+160))) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))); else tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if ((U <= -1e-312) || (~((U <= 2.3e-148)) && (U <= 1.3e+160))) tmp = sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om)))))); else tmp = sqrt((2.0 * U)) * sqrt((n * t)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[Or[LessEqual[U, -1e-312], And[N[Not[LessEqual[U, 2.3e-148]], $MachinePrecision], LessEqual[U, 1.3e+160]]], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1 \cdot 10^{-312} \lor \neg \left(U \leq 2.3 \cdot 10^{-148}\right) \land U \leq 1.3 \cdot 10^{+160}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\end{array}
\end{array}
if U < -9.9999999999847e-313 or 2.29999999999999997e-148 < U < 1.3e160Initial program 48.1%
associate-*l/53.7%
Applied egg-rr53.7%
Taylor expanded in n around 0 41.3%
unpow241.3%
associate-*l/46.4%
Applied egg-rr46.4%
if -9.9999999999847e-313 < U < 2.29999999999999997e-148 or 1.3e160 < U Initial program 41.4%
Simplified42.9%
Taylor expanded in l around 0 44.4%
pow1/244.4%
associate-*r*44.4%
unpow-prod-down67.8%
pow1/267.8%
Applied egg-rr67.8%
unpow1/267.8%
Simplified67.8%
Final simplification51.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (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_) {
return sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * (t - (2.0d0 * (l_m * (l_m / om))))))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om))))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * (t - (2.0 * (l_m * (l_m / Om)))))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}
\end{array}
Initial program 46.4%
associate-*l/51.0%
Applied egg-rr51.0%
Taylor expanded in n around 0 40.2%
unpow240.2%
associate-*l/44.4%
Applied egg-rr44.4%
Final simplification44.4%
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(Float64(2.0 * 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[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{0.5}
\end{array}
Initial program 46.4%
Simplified50.2%
Taylor expanded in l around 0 37.3%
pow1/238.9%
associate-*r*38.9%
Applied egg-rr38.9%
Final simplification38.9%
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.2%
Taylor expanded in l around 0 37.3%
Final simplification37.3%
herbie shell --seed 2024031
(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*))))))