
(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}
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(* (pow (* 2.0 U) 0.5) (sqrt (* n (+ t (* -2.0 (/ (pow l 2.0) Om))))))
(if (<= t_1 1e+153)
t_1
(if (<= t_1 INFINITY)
(*
(sqrt (* 2.0 (fabs (* n U))))
(sqrt
(fabs
(+ t (* -2.0 (* (/ l (cbrt Om)) (* l (pow (cbrt Om) -2.0))))))))
(sqrt
(*
-2.0
(*
(* U (pow l 2.0))
(/ (+ (* 2.0 n) (/ (* (- U U*) (pow n 2.0)) Om)) Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = pow((2.0 * U), 0.5) * sqrt((n * (t + (-2.0 * (pow(l, 2.0) / Om)))));
} else if (t_1 <= 1e+153) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = sqrt((2.0 * fabs((n * U)))) * sqrt(fabs((t + (-2.0 * ((l / cbrt(Om)) * (l * pow(cbrt(Om), -2.0)))))));
} else {
tmp = sqrt((-2.0 * ((U * pow(l, 2.0)) * (((2.0 * n) + (((U - U_42_) * pow(n, 2.0)) / Om)) / Om))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.pow((2.0 * U), 0.5) * Math.sqrt((n * (t + (-2.0 * (Math.pow(l, 2.0) / Om)))));
} else if (t_1 <= 1e+153) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((2.0 * Math.abs((n * U)))) * Math.sqrt(Math.abs((t + (-2.0 * ((l / Math.cbrt(Om)) * (l * Math.pow(Math.cbrt(Om), -2.0)))))));
} else {
tmp = Math.sqrt((-2.0 * ((U * Math.pow(l, 2.0)) * (((2.0 * n) + (((U - U_42_) * Math.pow(n, 2.0)) / Om)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = 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_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64((Float64(2.0 * U) ^ 0.5) * sqrt(Float64(n * Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om)))))); elseif (t_1 <= 1e+153) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(sqrt(Float64(2.0 * abs(Float64(n * U)))) * sqrt(abs(Float64(t + Float64(-2.0 * Float64(Float64(l / cbrt(Om)) * Float64(l * (cbrt(Om) ^ -2.0)))))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(U * (l ^ 2.0)) * Float64(Float64(Float64(2.0 * n) + Float64(Float64(Float64(U - U_42_) * (n ^ 2.0)) / Om)) / Om)))); end return tmp end
code[n_, U_, t_, l_, 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 * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Power[N[(2.0 * U), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(n * N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+153], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[Sqrt[N[(2.0 * N[Abs[N[(n * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[N[(t + N[(-2.0 * N[(N[(l / N[Power[Om, 1/3], $MachinePrecision]), $MachinePrecision] * N[(l * N[Power[N[Power[Om, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * n), $MachinePrecision] + N[(N[(N[(U - U$42$), $MachinePrecision] * N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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)}\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;{\left(2 \cdot U\right)}^{0.5} \cdot \sqrt{n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)}\\
\mathbf{elif}\;t\_1 \leq 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\sqrt{2 \cdot \left|n \cdot U\right|} \cdot \sqrt{\left|t + -2 \cdot \left(\frac{\ell}{\sqrt[3]{Om}} \cdot \left(\ell \cdot {\left(\sqrt[3]{Om}\right)}^{-2}\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(U \cdot {\ell}^{2}\right) \cdot \frac{2 \cdot n + \frac{\left(U - U*\right) \cdot {n}^{2}}{Om}}{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*))))) < 0.0Initial program 11.5%
Simplified28.1%
Taylor expanded in n around 0 31.3%
pow1/231.3%
associate-*r*31.3%
unpow-prod-down50.6%
pow1/250.6%
unpow250.6%
add-cube-cbrt50.6%
unpow250.6%
frac-times50.6%
cancel-sign-sub-inv50.6%
metadata-eval50.6%
frac-times50.6%
unpow250.6%
unpow250.6%
add-cube-cbrt50.6%
Applied egg-rr50.6%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 1e153Initial program 97.4%
if 1e153 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 30.4%
Simplified42.4%
Taylor expanded in n around 0 26.5%
add-sqr-sqrt26.5%
pow1/226.5%
pow1/226.7%
pow-prod-down30.3%
Applied egg-rr30.3%
unpow1/230.3%
unpow230.3%
rem-sqrt-square27.0%
associate-*r*27.0%
metadata-eval27.0%
cancel-sign-sub-inv27.0%
associate-*r/27.0%
Simplified27.0%
pow1/227.0%
fabs-mul27.0%
unpow-prod-down41.7%
associate-*r*41.7%
associate-/l*41.7%
Applied egg-rr41.7%
unpow1/241.7%
associate-*r*41.7%
fabs-mul41.7%
metadata-eval41.7%
*-commutative41.7%
unpow1/241.7%
sub-neg41.7%
*-commutative41.7%
distribute-rgt-neg-in41.7%
metadata-eval41.7%
Simplified41.7%
unpow241.7%
add-cube-cbrt41.7%
unpow241.7%
frac-times54.7%
*-commutative54.7%
div-inv54.7%
pow-flip54.7%
metadata-eval54.7%
Applied egg-rr54.7%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified3.9%
Taylor expanded in l around inf 40.0%
associate-*r*45.6%
associate-*r/45.6%
metadata-eval45.6%
associate-/l*42.8%
Simplified42.8%
Taylor expanded in Om around inf 45.0%
Final simplification69.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(* (pow (* 2.0 U) 0.5) (sqrt (* n (+ t (* -2.0 (/ (pow l 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt
(* (* 2.0 (* n U)) (- t (+ (* 2.0 (* l (/ l Om))) (* t_1 (- U U*))))))
(sqrt
(*
-2.0
(*
(* U (pow l 2.0))
(/ (+ (* 2.0 n) (/ (* (- U U*) (pow n 2.0)) Om)) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = pow((2.0 * U), 0.5) * sqrt((n * (t + (-2.0 * (pow(l, 2.0) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = sqrt((-2.0 * ((U * pow(l, 2.0)) * (((2.0 * n) + (((U - U_42_) * pow(n, 2.0)) / Om)) / Om))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * Math.pow((l / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.pow((2.0 * U), 0.5) * Math.sqrt((n * (t + (-2.0 * (Math.pow(l, 2.0) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = Math.sqrt((-2.0 * ((U * Math.pow(l, 2.0)) * (((2.0 * n) + (((U - U_42_) * Math.pow(n, 2.0)) / Om)) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.pow((2.0 * U), 0.5) * math.sqrt((n * (t + (-2.0 * (math.pow(l, 2.0) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_)))))) else: tmp = math.sqrt((-2.0 * ((U * math.pow(l, 2.0)) * (((2.0 * n) + (((U - U_42_) * math.pow(n, 2.0)) / Om)) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64((Float64(2.0 * U) ^ 0.5) * sqrt(Float64(n * Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * Float64(l * Float64(l / Om))) + Float64(t_1 * Float64(U - U_42_)))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(U * (l ^ 2.0)) * Float64(Float64(Float64(2.0 * n) + Float64(Float64(Float64(U - U_42_) * (n ^ 2.0)) / Om)) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = ((2.0 * U) ^ 0.5) * sqrt((n * (t + (-2.0 * ((l ^ 2.0) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_)))))); else tmp = sqrt((-2.0 * ((U * (l ^ 2.0)) * (((2.0 * n) + (((U - U_42_) * (n ^ 2.0)) / Om)) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Power[N[(2.0 * U), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(n * N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * n), $MachinePrecision] + N[(N[(N[(U - U$42$), $MachinePrecision] * N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;{\left(2 \cdot U\right)}^{0.5} \cdot \sqrt{n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + t\_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(U \cdot {\ell}^{2}\right) \cdot \frac{2 \cdot n + \frac{\left(U - U*\right) \cdot {n}^{2}}{Om}}{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*))))) < 0.0Initial program 11.5%
Simplified28.1%
Taylor expanded in n around 0 31.3%
pow1/231.3%
associate-*r*31.3%
unpow-prod-down50.6%
pow1/250.6%
unpow250.6%
add-cube-cbrt50.6%
unpow250.6%
frac-times50.6%
cancel-sign-sub-inv50.6%
metadata-eval50.6%
frac-times50.6%
unpow250.6%
unpow250.6%
add-cube-cbrt50.6%
Applied egg-rr50.6%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.0%
Simplified71.6%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified3.9%
Taylor expanded in l around inf 40.0%
associate-*r*45.6%
associate-*r/45.6%
metadata-eval45.6%
associate-/l*42.8%
Simplified42.8%
Taylor expanded in Om around inf 45.0%
Final simplification65.3%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(* (pow (* 2.0 U) 0.5) (sqrt (* n (+ t (* -2.0 (/ (pow l 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt
(* (* 2.0 (* n U)) (- t (+ (* 2.0 (* l (/ l Om))) (* t_1 (- U U*))))))
(sqrt
(*
-2.0
(*
(* U (* l l))
(* n (+ (/ 2.0 Om) (* n (/ (- U U*) (pow Om 2.0))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = pow((2.0 * U), 0.5) * sqrt((n * (t + (-2.0 * (pow(l, 2.0) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / pow(Om, 2.0))))))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * Math.pow((l / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.pow((2.0 * U), 0.5) * Math.sqrt((n * (t + (-2.0 * (Math.pow(l, 2.0) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = Math.sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / Math.pow(Om, 2.0))))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.pow((2.0 * U), 0.5) * math.sqrt((n * (t + (-2.0 * (math.pow(l, 2.0) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_)))))) else: tmp = math.sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / math.pow(Om, 2.0)))))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64((Float64(2.0 * U) ^ 0.5) * sqrt(Float64(n * Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * Float64(l * Float64(l / Om))) + Float64(t_1 * Float64(U - U_42_)))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64(l * l)) * Float64(n * Float64(Float64(2.0 / Om) + Float64(n * Float64(Float64(U - U_42_) / (Om ^ 2.0)))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = ((2.0 * U) ^ 0.5) * sqrt((n * (t + (-2.0 * ((l ^ 2.0) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_)))))); else tmp = sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / (Om ^ 2.0)))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Power[N[(2.0 * U), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(n * N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(n * N[(N[(2.0 / Om), $MachinePrecision] + N[(n * N[(N[(U - U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;{\left(2 \cdot U\right)}^{0.5} \cdot \sqrt{n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + t\_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(U \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(n \cdot \left(\frac{2}{Om} + n \cdot \frac{U - U*}{{Om}^{2}}\right)\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*))))) < 0.0Initial program 11.5%
Simplified28.1%
Taylor expanded in n around 0 31.3%
pow1/231.3%
associate-*r*31.3%
unpow-prod-down50.6%
pow1/250.6%
unpow250.6%
add-cube-cbrt50.6%
unpow250.6%
frac-times50.6%
cancel-sign-sub-inv50.6%
metadata-eval50.6%
frac-times50.6%
unpow250.6%
unpow250.6%
add-cube-cbrt50.6%
Applied egg-rr50.6%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.0%
Simplified71.6%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified3.9%
Taylor expanded in l around inf 40.0%
associate-*r*45.6%
associate-*r/45.6%
metadata-eval45.6%
associate-/l*42.8%
Simplified42.8%
unpow242.8%
Applied egg-rr42.8%
Final simplification65.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n (- t (/ (* 2.0 (pow l 2.0)) Om)))))
(if (<= t_2 INFINITY)
(sqrt
(* (* 2.0 (* n U)) (- t (+ (* 2.0 (* l (/ l Om))) (* t_1 (- U U*))))))
(sqrt
(*
-2.0
(*
(* U (* l l))
(* n (+ (/ 2.0 Om) (* n (/ (- U U*) (pow Om 2.0))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * (t - ((2.0 * pow(l, 2.0)) / Om))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / pow(Om, 2.0))))))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * Math.pow((l / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * (t - ((2.0 * Math.pow(l, 2.0)) / Om))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = Math.sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / Math.pow(Om, 2.0))))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * (t - ((2.0 * math.pow(l, 2.0)) / Om)))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_)))))) else: tmp = math.sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / math.pow(Om, 2.0)))))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * Float64(t - Float64(Float64(2.0 * (l ^ 2.0)) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * Float64(l * Float64(l / Om))) + Float64(t_1 * Float64(U - U_42_)))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64(l * l)) * Float64(n * Float64(Float64(2.0 / Om) + Float64(n * Float64(Float64(U - U_42_) / (Om ^ 2.0)))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * (t - ((2.0 * (l ^ 2.0)) / Om)))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_)))))); else tmp = sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / (Om ^ 2.0)))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * N[(t - N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(n * N[(N[(2.0 / Om), $MachinePrecision] + N[(n * N[(N[(U - U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \left(t - \frac{2 \cdot {\ell}^{2}}{Om}\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + t\_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(U \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(n \cdot \left(\frac{2}{Om} + n \cdot \frac{U - U*}{{Om}^{2}}\right)\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*))))) < 0.0Initial program 11.5%
Simplified28.1%
Taylor expanded in n around 0 31.3%
pow1/231.3%
associate-*r*31.3%
unpow-prod-down50.6%
pow1/250.6%
unpow250.6%
add-cube-cbrt50.6%
unpow250.6%
frac-times50.6%
cancel-sign-sub-inv50.6%
metadata-eval50.6%
frac-times50.6%
unpow250.6%
unpow250.6%
add-cube-cbrt50.6%
Applied egg-rr50.6%
unpow1/250.5%
metadata-eval50.5%
cancel-sign-sub-inv50.5%
associate-*r/50.5%
Simplified50.5%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.0%
Simplified71.6%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified3.9%
Taylor expanded in l around inf 40.0%
associate-*r*45.6%
associate-*r/45.6%
metadata-eval45.6%
associate-/l*42.8%
Simplified42.8%
unpow242.8%
Applied egg-rr42.8%
Final simplification65.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= t_2 INFINITY)
(sqrt
(* (* 2.0 (* n U)) (- t (+ (* 2.0 (* l (/ l Om))) (* t_1 (- U U*))))))
(sqrt
(*
-2.0
(*
(* U (* l l))
(* n (+ (/ 2.0 Om) (* n (/ (- U U*) (pow Om 2.0))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / pow(Om, 2.0))))))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * Math.pow((l / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_))))));
} else {
tmp = Math.sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / Math.pow(Om, 2.0))))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_)))))) else: tmp = math.sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / math.pow(Om, 2.0)))))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * Float64(l * Float64(l / Om))) + Float64(t_1 * Float64(U - U_42_)))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64(l * l)) * Float64(n * Float64(Float64(2.0 / Om) + Float64(n * Float64(Float64(U - U_42_) / (Om ^ 2.0)))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l * (l / Om))) + (t_1 * (U - U_42_)))))); else tmp = sqrt((-2.0 * ((U * (l * l)) * (n * ((2.0 / Om) + (n * ((U - U_42_) / (Om ^ 2.0)))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(n * N[(N[(2.0 / Om), $MachinePrecision] + N[(n * N[(N[(U - U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + t\_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(U \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(n \cdot \left(\frac{2}{Om} + n \cdot \frac{U - U*}{{Om}^{2}}\right)\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*))))) < 0.0Initial program 11.5%
Simplified28.1%
Taylor expanded in t around inf 31.3%
pow1/231.3%
associate-*r*31.3%
unpow-prod-down39.7%
pow1/239.7%
Applied egg-rr39.7%
unpow1/239.7%
Simplified39.7%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.0%
Simplified71.6%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified3.9%
Taylor expanded in l around inf 40.0%
associate-*r*45.6%
associate-*r/45.6%
metadata-eval45.6%
associate-/l*42.8%
Simplified42.8%
unpow242.8%
Applied egg-rr42.8%
Final simplification63.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.7e+95) (sqrt (* (* (* 2.0 n) U) (- t (/ (* 2.0 (pow l 2.0)) Om)))) (pow (* -4.0 (* U (/ (* n (pow l 2.0)) Om))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.7e+95) {
tmp = sqrt((((2.0 * n) * U) * (t - ((2.0 * pow(l, 2.0)) / Om))));
} else {
tmp = pow((-4.0 * (U * ((n * pow(l, 2.0)) / Om))), 0.5);
}
return tmp;
}
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
real(8) :: tmp
if (l <= 2.7d+95) then
tmp = sqrt((((2.0d0 * n) * u) * (t - ((2.0d0 * (l ** 2.0d0)) / om))))
else
tmp = ((-4.0d0) * (u * ((n * (l ** 2.0d0)) / om))) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.7e+95) {
tmp = Math.sqrt((((2.0 * n) * U) * (t - ((2.0 * Math.pow(l, 2.0)) / Om))));
} else {
tmp = Math.pow((-4.0 * (U * ((n * Math.pow(l, 2.0)) / Om))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.7e+95: tmp = math.sqrt((((2.0 * n) * U) * (t - ((2.0 * math.pow(l, 2.0)) / Om)))) else: tmp = math.pow((-4.0 * (U * ((n * math.pow(l, 2.0)) / Om))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.7e+95) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(Float64(2.0 * (l ^ 2.0)) / Om)))); else tmp = Float64(-4.0 * Float64(U * Float64(Float64(n * (l ^ 2.0)) / Om))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.7e+95) tmp = sqrt((((2.0 * n) * U) * (t - ((2.0 * (l ^ 2.0)) / Om)))); else tmp = (-4.0 * (U * ((n * (l ^ 2.0)) / Om))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.7e+95], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(U * N[(N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.7 \cdot 10^{+95}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2}}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \left(U \cdot \frac{n \cdot {\ell}^{2}}{Om}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 2.7e95Initial program 56.6%
add-cube-cbrt56.6%
times-frac57.4%
pow257.4%
Applied egg-rr57.4%
Taylor expanded in Om around inf 51.9%
metadata-eval51.9%
cancel-sign-sub-inv51.9%
associate-*r/51.9%
Simplified51.9%
if 2.7e95 < l Initial program 18.4%
Simplified40.6%
Taylor expanded in n around 0 18.8%
Taylor expanded in t around 0 23.2%
pow1/232.5%
associate-/l*32.6%
*-commutative32.6%
Applied egg-rr32.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.3e+94) (sqrt (* (* 2.0 (* n U)) (- t (/ (* 2.0 (pow l 2.0)) Om)))) (pow (* -4.0 (* U (/ (* n (pow l 2.0)) Om))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.3e+94) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * pow(l, 2.0)) / Om))));
} else {
tmp = pow((-4.0 * (U * ((n * pow(l, 2.0)) / Om))), 0.5);
}
return tmp;
}
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
real(8) :: tmp
if (l <= 2.3d+94) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - ((2.0d0 * (l ** 2.0d0)) / om))))
else
tmp = ((-4.0d0) * (u * ((n * (l ** 2.0d0)) / om))) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.3e+94) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * Math.pow(l, 2.0)) / Om))));
} else {
tmp = Math.pow((-4.0 * (U * ((n * Math.pow(l, 2.0)) / Om))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.3e+94: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * math.pow(l, 2.0)) / Om)))) else: tmp = math.pow((-4.0 * (U * ((n * math.pow(l, 2.0)) / Om))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.3e+94) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * (l ^ 2.0)) / Om)))); else tmp = Float64(-4.0 * Float64(U * Float64(Float64(n * (l ^ 2.0)) / Om))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.3e+94) tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l ^ 2.0)) / Om)))); else tmp = (-4.0 * (U * ((n * (l ^ 2.0)) / Om))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.3e+94], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(U * N[(N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.3 \cdot 10^{+94}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2}}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \left(U \cdot \frac{n \cdot {\ell}^{2}}{Om}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 2.3e94Initial program 56.6%
Simplified57.5%
Taylor expanded in Om around inf 51.9%
associate-*r/51.9%
Simplified51.9%
if 2.3e94 < l Initial program 18.4%
Simplified40.6%
Taylor expanded in n around 0 18.8%
Taylor expanded in t around 0 23.2%
pow1/232.5%
associate-/l*32.6%
*-commutative32.6%
Applied egg-rr32.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 8e+97) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (* l l) Om))))))) (pow (* -4.0 (* U (/ (* n (pow l 2.0)) Om))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8e+97) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om)))))));
} else {
tmp = pow((-4.0 * (U * ((n * pow(l, 2.0)) / Om))), 0.5);
}
return tmp;
}
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
real(8) :: tmp
if (l <= 8d+97) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l * l) / om)))))))
else
tmp = ((-4.0d0) * (u * ((n * (l ** 2.0d0)) / om))) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8e+97) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om)))))));
} else {
tmp = Math.pow((-4.0 * (U * ((n * Math.pow(l, 2.0)) / Om))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 8e+97: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om))))))) else: tmp = math.pow((-4.0 * (U * ((n * math.pow(l, 2.0)) / Om))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 8e+97) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))))))); else tmp = Float64(-4.0 * Float64(U * Float64(Float64(n * (l ^ 2.0)) / Om))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 8e+97) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om))))))); else tmp = (-4.0 * (U * ((n * (l ^ 2.0)) / Om))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 8e+97], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(U * N[(N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8 \cdot 10^{+97}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \left(U \cdot \frac{n \cdot {\ell}^{2}}{Om}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 8.0000000000000006e97Initial program 56.6%
Simplified54.3%
Taylor expanded in n around 0 50.7%
unpow216.8%
Applied egg-rr50.7%
if 8.0000000000000006e97 < l Initial program 18.4%
Simplified40.6%
Taylor expanded in n around 0 18.8%
Taylor expanded in t around 0 23.2%
pow1/232.5%
associate-/l*32.6%
*-commutative32.6%
Applied egg-rr32.6%
(FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* (+ t (* -2.0 (/ (pow l 2.0) Om))) (* n U))) 0.5))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow((2.0 * ((t + (-2.0 * (pow(l, 2.0) / Om))) * (n * U))), 0.5);
}
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 = (2.0d0 * ((t + ((-2.0d0) * ((l ** 2.0d0) / om))) * (n * u))) ** 0.5d0
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow((2.0 * ((t + (-2.0 * (Math.pow(l, 2.0) / Om))) * (n * U))), 0.5);
}
def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * ((t + (-2.0 * (math.pow(l, 2.0) / Om))) * (n * U))), 0.5)
function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om))) * Float64(n * U))) ^ 0.5 end
function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * ((t + (-2.0 * ((l ^ 2.0) / Om))) * (n * U))) ^ 0.5; end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
\\
{\left(2 \cdot \left(\left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot \left(n \cdot U\right)\right)\right)}^{0.5}
\end{array}
Initial program 50.0%
Simplified51.9%
Taylor expanded in n around 0 45.2%
pow1/248.5%
Applied egg-rr49.3%
Final simplification49.3%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 5.3e+201) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (* l l) Om))))))) (* (sqrt (* n (* 2.0 U))) (sqrt t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 5.3e+201) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om)))))));
} else {
tmp = sqrt((n * (2.0 * U))) * sqrt(t);
}
return tmp;
}
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
real(8) :: tmp
if (t <= 5.3d+201) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l * l) / om)))))))
else
tmp = sqrt((n * (2.0d0 * u))) * sqrt(t)
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 5.3e+201) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om)))))));
} else {
tmp = Math.sqrt((n * (2.0 * U))) * Math.sqrt(t);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 5.3e+201: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om))))))) else: tmp = math.sqrt((n * (2.0 * U))) * math.sqrt(t) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 5.3e+201) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))))))); else tmp = Float64(sqrt(Float64(n * Float64(2.0 * U))) * sqrt(t)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= 5.3e+201) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om))))))); else tmp = sqrt((n * (2.0 * U))) * sqrt(t); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 5.3e+201], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.3 \cdot 10^{+201}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot \left(2 \cdot U\right)} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < 5.30000000000000035e201Initial program 49.4%
Simplified51.5%
Taylor expanded in n around 0 45.3%
unpow220.6%
Applied egg-rr45.3%
if 5.30000000000000035e201 < t Initial program 55.7%
Simplified55.8%
Taylor expanded in t around inf 36.8%
associate-*r*47.9%
Simplified47.9%
pow1/263.2%
associate-*r*63.2%
unpow-prod-down76.9%
pow1/273.1%
associate-*r*73.1%
pow1/273.1%
Applied egg-rr73.1%
Final simplification48.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 3.2e+163) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (* l l) Om))))))) (sqrt (fabs (* 2.0 (* t (* n U)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 3.2e+163) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om)))))));
} else {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
}
return tmp;
}
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
real(8) :: tmp
if (t <= 3.2d+163) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l * l) / om)))))))
else
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 3.2e+163) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om)))))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 3.2e+163: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om))))))) else: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 3.2e+163) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))))))); else tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= 3.2e+163) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om))))))); else tmp = sqrt(abs((2.0 * (t * (n * U))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 3.2e+163], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.2 \cdot 10^{+163}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\end{array}
\end{array}
if t < 3.1999999999999998e163Initial program 49.8%
Simplified51.9%
Taylor expanded in n around 0 45.5%
unpow220.3%
Applied egg-rr45.5%
if 3.1999999999999998e163 < t Initial program 51.9%
Simplified52.0%
Taylor expanded in t around inf 37.1%
associate-*r*45.6%
Simplified45.6%
add-sqr-sqrt45.6%
pow1/245.6%
pow1/257.4%
pow-prod-down49.4%
pow249.4%
associate-*r*49.4%
associate-*r*49.4%
Applied egg-rr49.4%
unpow1/249.4%
unpow249.4%
rem-sqrt-square57.9%
associate-*l*49.6%
associate-*r*49.6%
associate-*r*57.9%
*-commutative57.9%
Simplified57.9%
Final simplification47.1%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (* l l) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om)))))));
}
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 * (u * (n * (t - (2.0d0 * ((l * l) / om)))))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om)))))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om)))))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l * l) / Om))))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)}
\end{array}
Initial program 50.0%
Simplified51.9%
Taylor expanded in n around 0 45.2%
unpow220.2%
Applied egg-rr45.2%
(FPCore (n U t l Om U*) :precision binary64 (if (<= n -3.2e+75) (sqrt (* 2.0 (* t (* n U)))) (sqrt (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -3.2e+75) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
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
real(8) :: tmp
if (n <= (-3.2d+75)) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -3.2e+75) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= -3.2e+75: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -3.2e+75) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -3.2e+75) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -3.2e+75], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -3.2 \cdot 10^{+75}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if n < -3.19999999999999985e75Initial program 59.0%
Simplified55.8%
Taylor expanded in t around inf 34.2%
associate-*r*45.1%
Simplified45.1%
if -3.19999999999999985e75 < n Initial program 48.2%
Simplified51.1%
Taylor expanded in t around inf 36.9%
Final simplification38.3%
(FPCore (n U t l Om U*) :precision binary64 (pow (* (* 2.0 U) (* n t)) 0.5))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow(((2.0 * U) * (n * t)), 0.5);
}
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 = ((2.0d0 * u) * (n * t)) ** 0.5d0
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow(((2.0 * U) * (n * t)), 0.5);
}
def code(n, U, t, l, Om, U_42_): return math.pow(((2.0 * U) * (n * t)), 0.5)
function code(n, U, t, l, Om, U_42_) return Float64(Float64(2.0 * U) * Float64(n * t)) ^ 0.5 end
function tmp = code(n, U, t, l, Om, U_42_) tmp = ((2.0 * U) * (n * t)) ^ 0.5; end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
\\
{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{0.5}
\end{array}
Initial program 50.0%
Simplified51.9%
Taylor expanded in t around inf 36.4%
pow1/238.9%
associate-*r*38.9%
Applied egg-rr38.9%
(FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* n (* U t))) 0.5))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow((2.0 * (n * (U * t))), 0.5);
}
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 = (2.0d0 * (n * (u * t))) ** 0.5d0
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow((2.0 * (n * (U * t))), 0.5);
}
def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * (n * (U * t))), 0.5)
function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5 end
function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * (n * (U * t))) ^ 0.5; end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
\\
{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}
\end{array}
Initial program 50.0%
Simplified51.9%
Taylor expanded in t around inf 36.0%
pow1/238.0%
associate-*l*38.0%
Applied egg-rr38.0%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
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 * (u * (n * t))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 50.0%
Simplified51.9%
Taylor expanded in t around inf 36.4%
herbie shell --seed 2024160
(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*))))))