
(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 (pow (/ l Om) 2.0))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U* U))))))
(t_3 (sqrt (* 2.0 (fabs n)))))
(if (<= t_2 0.0)
(* t_3 (sqrt (fabs (* U (+ t (* t_1 (* n U*)))))))
(if (<= t_2 1e+147)
t_2
(* t_3 (* (sqrt (fabs U)) (sqrt (fabs (fma n (* t_1 U*) t)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)))));
double t_3 = sqrt((2.0 * fabs(n)));
double tmp;
if (t_2 <= 0.0) {
tmp = t_3 * sqrt(fabs((U * (t + (t_1 * (n * U_42_))))));
} else if (t_2 <= 1e+147) {
tmp = t_2;
} else {
tmp = t_3 * (sqrt(fabs(U)) * sqrt(fabs(fma(n, (t_1 * U_42_), t))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = 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(Float64(n * t_1) * Float64(U_42_ - U))))) t_3 = sqrt(Float64(2.0 * abs(n))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(t_3 * sqrt(abs(Float64(U * Float64(t + Float64(t_1 * Float64(n * U_42_))))))); elseif (t_2 <= 1e+147) tmp = t_2; else tmp = Float64(t_3 * Float64(sqrt(abs(U)) * sqrt(abs(fma(n, Float64(t_1 * U_42_), t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(2.0 * N[Abs[n], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(t$95$3 * N[Sqrt[N[Abs[N[(U * N[(t + N[(t$95$1 * N[(n * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+147], t$95$2, N[(t$95$3 * N[(N[Sqrt[N[Abs[U], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[N[(n * N[(t$95$1 * U$42$), $MachinePrecision] + t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\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) + \left(n \cdot t\_1\right) \cdot \left(U* - U\right)\right)}\\
t_3 := \sqrt{2 \cdot \left|n\right|}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;t\_3 \cdot \sqrt{\left|U \cdot \left(t + t\_1 \cdot \left(n \cdot U*\right)\right)\right|}\\
\mathbf{elif}\;t\_2 \leq 10^{+147}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \left(\sqrt{\left|U\right|} \cdot \sqrt{\left|\mathsf{fma}\left(n, t\_1 \cdot U*, t\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 15.4%
Simplified25.1%
Taylor expanded in U* around inf 24.5%
mul-1-neg24.5%
associate-/l*24.5%
distribute-rgt-neg-in24.5%
distribute-neg-frac224.5%
*-commutative24.5%
Simplified24.5%
add-sqr-sqrt24.5%
pow1/224.5%
pow1/224.5%
pow-prod-down17.9%
Applied egg-rr14.7%
unpow1/214.7%
unpow214.7%
rem-sqrt-square14.7%
associate-*l*24.5%
associate-/l*24.5%
associate-*r/24.6%
distribute-frac-neg224.6%
unpow224.6%
unpow224.6%
times-frac28.6%
unpow228.6%
Simplified28.6%
pow1/228.6%
fabs-mul28.6%
unpow-prod-down81.7%
associate-*r*81.7%
Applied egg-rr81.7%
Simplified81.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*))))) < 9.9999999999999998e146Initial program 99.3%
if 9.9999999999999998e146 < (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 26.2%
Simplified35.9%
Taylor expanded in U* around inf 34.8%
mul-1-neg34.8%
associate-/l*34.8%
distribute-rgt-neg-in34.8%
distribute-neg-frac234.8%
*-commutative34.8%
Simplified34.8%
add-sqr-sqrt34.8%
pow1/234.8%
pow1/235.3%
pow-prod-down32.8%
Applied egg-rr30.6%
unpow1/230.6%
unpow230.6%
rem-sqrt-square33.1%
associate-*l*35.3%
associate-/l*35.4%
associate-*r/34.6%
distribute-frac-neg234.6%
unpow234.6%
unpow234.6%
times-frac38.0%
unpow238.0%
Simplified38.0%
pow1/238.0%
fabs-mul38.0%
unpow-prod-down43.9%
associate-*r*41.8%
Applied egg-rr41.8%
Simplified41.8%
pow1/241.8%
fabs-mul41.8%
unpow-prod-down46.7%
+-commutative46.7%
associate-*l*52.3%
fma-define52.3%
Applied egg-rr52.3%
unpow1/252.3%
unpow1/252.3%
Simplified52.3%
Final simplification76.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U* U))))))
(t_3 (sqrt (* 2.0 (fabs n)))))
(if (<= t_2 0.0)
(* t_3 (sqrt (fabs (* U (+ t (* t_1 (* n U*)))))))
(if (<= t_2 2e+147)
t_2
(* t_3 (sqrt (fabs (* n (* U (+ (* t_1 U*) (/ t n)))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)))));
double t_3 = sqrt((2.0 * fabs(n)));
double tmp;
if (t_2 <= 0.0) {
tmp = t_3 * sqrt(fabs((U * (t + (t_1 * (n * U_42_))))));
} else if (t_2 <= 2e+147) {
tmp = t_2;
} else {
tmp = t_3 * sqrt(fabs((n * (U * ((t_1 * U_42_) + (t / n))))));
}
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (l / om) ** 2.0d0
t_2 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * t_1) * (u_42 - u)))))
t_3 = sqrt((2.0d0 * abs(n)))
if (t_2 <= 0.0d0) then
tmp = t_3 * sqrt(abs((u * (t + (t_1 * (n * u_42))))))
else if (t_2 <= 2d+147) then
tmp = t_2
else
tmp = t_3 * sqrt(abs((n * (u * ((t_1 * u_42) + (t / n))))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.pow((l / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)))));
double t_3 = Math.sqrt((2.0 * Math.abs(n)));
double tmp;
if (t_2 <= 0.0) {
tmp = t_3 * Math.sqrt(Math.abs((U * (t + (t_1 * (n * U_42_))))));
} else if (t_2 <= 2e+147) {
tmp = t_2;
} else {
tmp = t_3 * Math.sqrt(Math.abs((n * (U * ((t_1 * U_42_) + (t / n))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = math.pow((l / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U))))) t_3 = math.sqrt((2.0 * math.fabs(n))) tmp = 0 if t_2 <= 0.0: tmp = t_3 * math.sqrt(math.fabs((U * (t + (t_1 * (n * U_42_)))))) elif t_2 <= 2e+147: tmp = t_2 else: tmp = t_3 * math.sqrt(math.fabs((n * (U * ((t_1 * U_42_) + (t / n)))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = 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(Float64(n * t_1) * Float64(U_42_ - U))))) t_3 = sqrt(Float64(2.0 * abs(n))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(t_3 * sqrt(abs(Float64(U * Float64(t + Float64(t_1 * Float64(n * U_42_))))))); elseif (t_2 <= 2e+147) tmp = t_2; else tmp = Float64(t_3 * sqrt(abs(Float64(n * Float64(U * Float64(Float64(t_1 * U_42_) + Float64(t / n))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l / Om) ^ 2.0; t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U))))); t_3 = sqrt((2.0 * abs(n))); tmp = 0.0; if (t_2 <= 0.0) tmp = t_3 * sqrt(abs((U * (t + (t_1 * (n * U_42_)))))); elseif (t_2 <= 2e+147) tmp = t_2; else tmp = t_3 * sqrt(abs((n * (U * ((t_1 * U_42_) + (t / n)))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(2.0 * N[Abs[n], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(t$95$3 * N[Sqrt[N[Abs[N[(U * N[(t + N[(t$95$1 * N[(n * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+147], t$95$2, N[(t$95$3 * N[Sqrt[N[Abs[N[(n * N[(U * N[(N[(t$95$1 * U$42$), $MachinePrecision] + N[(t / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\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) + \left(n \cdot t\_1\right) \cdot \left(U* - U\right)\right)}\\
t_3 := \sqrt{2 \cdot \left|n\right|}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;t\_3 \cdot \sqrt{\left|U \cdot \left(t + t\_1 \cdot \left(n \cdot U*\right)\right)\right|}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \sqrt{\left|n \cdot \left(U \cdot \left(t\_1 \cdot U* + \frac{t}{n}\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 15.4%
Simplified25.1%
Taylor expanded in U* around inf 24.5%
mul-1-neg24.5%
associate-/l*24.5%
distribute-rgt-neg-in24.5%
distribute-neg-frac224.5%
*-commutative24.5%
Simplified24.5%
add-sqr-sqrt24.5%
pow1/224.5%
pow1/224.5%
pow-prod-down17.9%
Applied egg-rr14.7%
unpow1/214.7%
unpow214.7%
rem-sqrt-square14.7%
associate-*l*24.5%
associate-/l*24.5%
associate-*r/24.6%
distribute-frac-neg224.6%
unpow224.6%
unpow224.6%
times-frac28.6%
unpow228.6%
Simplified28.6%
pow1/228.6%
fabs-mul28.6%
unpow-prod-down81.7%
associate-*r*81.7%
Applied egg-rr81.7%
Simplified81.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*))))) < 2e147Initial program 99.3%
if 2e147 < (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 25.5%
Simplified36.1%
Taylor expanded in U* around inf 35.0%
mul-1-neg35.0%
associate-/l*35.1%
distribute-rgt-neg-in35.1%
distribute-neg-frac235.1%
*-commutative35.1%
Simplified35.1%
add-sqr-sqrt35.1%
pow1/235.1%
pow1/235.6%
pow-prod-down33.1%
Applied egg-rr30.8%
unpow1/230.8%
unpow230.8%
rem-sqrt-square32.6%
associate-*l*35.6%
associate-/l*35.6%
associate-*r/34.9%
distribute-frac-neg234.9%
unpow234.9%
unpow234.9%
times-frac38.3%
unpow238.3%
Simplified38.3%
pow1/238.3%
fabs-mul38.3%
unpow-prod-down44.2%
associate-*r*42.1%
Applied egg-rr42.1%
Simplified42.1%
Taylor expanded in n around inf 38.7%
associate-/l*38.5%
associate-/l*38.7%
distribute-lft-out38.7%
associate-/l*40.6%
unpow240.6%
unpow240.6%
times-frac46.3%
unpow246.3%
Simplified46.3%
Final simplification74.1%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 (fabs n))))
(t_2 (pow (/ l Om) 2.0))
(t_3 (* n t_2))
(t_4
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_3 (- U* U))))))
(if (<= t_4 0.0)
(* t_1 (sqrt (fabs (* U (+ t (* t_2 (* n U*)))))))
(if (<= t_4 2e+299)
(sqrt t_4)
(* t_1 (sqrt (fabs (* U* (* U (+ t_3 (/ t U*)))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((2.0 * fabs(n)));
double t_2 = pow((l / Om), 2.0);
double t_3 = n * t_2;
double t_4 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U)));
double tmp;
if (t_4 <= 0.0) {
tmp = t_1 * sqrt(fabs((U * (t + (t_2 * (n * U_42_))))));
} else if (t_4 <= 2e+299) {
tmp = sqrt(t_4);
} else {
tmp = t_1 * sqrt(fabs((U_42_ * (U * (t_3 + (t / U_42_))))));
}
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = sqrt((2.0d0 * abs(n)))
t_2 = (l / om) ** 2.0d0
t_3 = n * t_2
t_4 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + (t_3 * (u_42 - u)))
if (t_4 <= 0.0d0) then
tmp = t_1 * sqrt(abs((u * (t + (t_2 * (n * u_42))))))
else if (t_4 <= 2d+299) then
tmp = sqrt(t_4)
else
tmp = t_1 * sqrt(abs((u_42 * (u * (t_3 + (t / u_42))))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.sqrt((2.0 * Math.abs(n)));
double t_2 = Math.pow((l / Om), 2.0);
double t_3 = n * t_2;
double t_4 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U)));
double tmp;
if (t_4 <= 0.0) {
tmp = t_1 * Math.sqrt(Math.abs((U * (t + (t_2 * (n * U_42_))))));
} else if (t_4 <= 2e+299) {
tmp = Math.sqrt(t_4);
} else {
tmp = t_1 * Math.sqrt(Math.abs((U_42_ * (U * (t_3 + (t / U_42_))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt((2.0 * math.fabs(n))) t_2 = math.pow((l / Om), 2.0) t_3 = n * t_2 t_4 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U))) tmp = 0 if t_4 <= 0.0: tmp = t_1 * math.sqrt(math.fabs((U * (t + (t_2 * (n * U_42_)))))) elif t_4 <= 2e+299: tmp = math.sqrt(t_4) else: tmp = t_1 * math.sqrt(math.fabs((U_42_ * (U * (t_3 + (t / U_42_)))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(2.0 * abs(n))) t_2 = Float64(l / Om) ^ 2.0 t_3 = Float64(n * t_2) t_4 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_3 * Float64(U_42_ - U)))) tmp = 0.0 if (t_4 <= 0.0) tmp = Float64(t_1 * sqrt(abs(Float64(U * Float64(t + Float64(t_2 * Float64(n * U_42_))))))); elseif (t_4 <= 2e+299) tmp = sqrt(t_4); else tmp = Float64(t_1 * sqrt(abs(Float64(U_42_ * Float64(U * Float64(t_3 + Float64(t / U_42_))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt((2.0 * abs(n))); t_2 = (l / Om) ^ 2.0; t_3 = n * t_2; t_4 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U))); tmp = 0.0; if (t_4 <= 0.0) tmp = t_1 * sqrt(abs((U * (t + (t_2 * (n * U_42_)))))); elseif (t_4 <= 2e+299) tmp = sqrt(t_4); else tmp = t_1 * sqrt(abs((U_42_ * (U * (t_3 + (t / U_42_)))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * N[Abs[n], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(n * t$95$2), $MachinePrecision]}, Block[{t$95$4 = 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$3 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[(t$95$1 * N[Sqrt[N[Abs[N[(U * N[(t + N[(t$95$2 * N[(n * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+299], N[Sqrt[t$95$4], $MachinePrecision], N[(t$95$1 * N[Sqrt[N[Abs[N[(U$42$ * N[(U * N[(t$95$3 + N[(t / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot \left|n\right|}\\
t_2 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := n \cdot t\_2\\
t_4 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_3 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;t\_1 \cdot \sqrt{\left|U \cdot \left(t + t\_2 \cdot \left(n \cdot U*\right)\right)\right|}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{t\_4}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{\left|U* \cdot \left(U \cdot \left(t\_3 + \frac{t}{U*}\right)\right)\right|}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 14.0%
Simplified23.3%
Taylor expanded in U* around inf 22.4%
mul-1-neg22.4%
associate-/l*22.4%
distribute-rgt-neg-in22.4%
distribute-neg-frac222.4%
*-commutative22.4%
Simplified22.4%
add-sqr-sqrt22.4%
pow1/222.4%
pow1/222.4%
pow-prod-down16.4%
Applied egg-rr13.5%
unpow1/213.5%
unpow213.5%
rem-sqrt-square13.5%
associate-*l*22.4%
associate-/l*22.4%
associate-*r/22.5%
distribute-frac-neg222.5%
unpow222.5%
unpow222.5%
times-frac26.5%
unpow226.5%
Simplified26.5%
pow1/226.5%
fabs-mul26.5%
unpow-prod-down77.6%
associate-*r*77.6%
Applied egg-rr77.6%
Simplified77.6%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 2.0000000000000001e299Initial program 99.3%
if 2.0000000000000001e299 < (*.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 25.5%
Simplified36.4%
Taylor expanded in U* around inf 35.4%
mul-1-neg35.4%
associate-/l*35.4%
distribute-rgt-neg-in35.4%
distribute-neg-frac235.4%
*-commutative35.4%
Simplified35.4%
add-sqr-sqrt35.4%
pow1/235.4%
pow1/235.9%
pow-prod-down34.2%
Applied egg-rr31.9%
unpow1/231.9%
unpow231.9%
rem-sqrt-square32.8%
associate-*l*35.9%
associate-/l*36.0%
associate-*r/35.2%
distribute-frac-neg235.2%
unpow235.2%
unpow235.2%
times-frac38.6%
unpow238.6%
Simplified38.6%
pow1/238.6%
fabs-mul38.6%
unpow-prod-down43.9%
associate-*r*41.7%
Applied egg-rr41.7%
Simplified41.7%
Taylor expanded in U* around inf 40.2%
associate-/l*39.2%
associate-/l*38.4%
distribute-lft-out38.4%
*-commutative38.4%
associate-/l*38.5%
unpow238.5%
unpow238.5%
times-frac42.9%
unpow242.9%
Simplified42.9%
Final simplification72.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2 (* t_1 (- U* U)))
(t_3 (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_2)))))
(if (<= t_3 0.0)
(* (sqrt (* U t)) (sqrt (* 2.0 n)))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 (* 2.0 (* l (/ l Om)))))))
(sqrt (fabs (* 2.0 (* (+ t (* t_1 U*)) (* n U)))))))))
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 = t_1 * (U_42_ - U);
double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((U * t)) * sqrt((2.0 * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(fabs((2.0 * ((t + (t_1 * U_42_)) * (n * U)))));
}
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 = t_1 * (U_42_ - U);
double t_3 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((U * t)) * Math.sqrt((2.0 * n));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * ((t + (t_1 * U_42_)) * (n * U)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = t_1 * (U_42_ - U) t_3 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((U * t)) * math.sqrt((2.0 * n)) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(math.fabs((2.0 * ((t + (t_1 * U_42_)) * (n * U))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(t_1 * Float64(U_42_ - U)) t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(U * t)) * sqrt(Float64(2.0 * n))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(abs(Float64(2.0 * Float64(Float64(t + Float64(t_1 * U_42_)) * Float64(n * U))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = t_1 * (U_42_ - U); t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((U * t)) * sqrt((2.0 * n)); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))); else tmp = sqrt(abs((2.0 * ((t + (t_1 * U_42_)) * (n * U))))); 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[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$2 - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(N[(t + N[(t$95$1 * U$42$), $MachinePrecision]), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := t\_1 \cdot \left(U* - U\right)\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_2\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{U \cdot t} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(\left(t + t\_1 \cdot U*\right) \cdot \left(n \cdot U\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 15.4%
Simplified25.1%
associate-*r*28.6%
sub-neg28.6%
distribute-lft-in28.6%
Applied egg-rr28.6%
distribute-lft-out28.6%
sub-neg28.6%
Simplified28.6%
Taylor expanded in t around inf 25.3%
pow1/225.3%
*-commutative25.3%
unpow-prod-down43.5%
pow1/243.5%
pow1/243.5%
Applied egg-rr43.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 75.5%
Simplified78.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%
Simplified6.2%
Taylor expanded in U* around inf 22.4%
mul-1-neg22.4%
associate-/l*22.4%
distribute-rgt-neg-in22.4%
distribute-neg-frac222.4%
*-commutative22.4%
Simplified22.4%
add-sqr-sqrt22.4%
pow1/222.4%
pow1/223.7%
pow-prod-down23.8%
Applied egg-rr22.4%
unpow1/222.4%
unpow222.4%
rem-sqrt-square22.4%
associate-*l*23.8%
associate-/l*23.8%
associate-*r/23.7%
distribute-frac-neg223.7%
unpow223.7%
unpow223.7%
times-frac27.1%
unpow227.1%
Simplified27.1%
Taylor expanded in U around 0 23.8%
associate-*r*22.4%
sub-neg22.4%
mul-1-neg22.4%
remove-double-neg22.4%
associate-/l*22.4%
*-commutative22.4%
associate-/l*22.4%
unpow222.4%
unpow222.4%
times-frac25.7%
unpow225.7%
Simplified25.7%
Final simplification66.7%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2 (* t_1 (- U* U)))
(t_3 (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_2)))))
(if (<= t_3 0.0)
(* (sqrt (* U t)) (sqrt (* 2.0 n)))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 (* 2.0 (* l (/ l Om)))))))
(sqrt (fabs (* (* 2.0 n) (* U (+ t (* t_1 U*))))))))))
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 = t_1 * (U_42_ - U);
double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((U * t)) * sqrt((2.0 * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(fabs(((2.0 * n) * (U * (t + (t_1 * U_42_))))));
}
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 = t_1 * (U_42_ - U);
double t_3 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((U * t)) * Math.sqrt((2.0 * n));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(Math.abs(((2.0 * n) * (U * (t + (t_1 * U_42_))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = t_1 * (U_42_ - U) t_3 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((U * t)) * math.sqrt((2.0 * n)) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(math.fabs(((2.0 * n) * (U * (t + (t_1 * U_42_)))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(t_1 * Float64(U_42_ - U)) t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(U * t)) * sqrt(Float64(2.0 * n))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(abs(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(t_1 * U_42_)))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = t_1 * (U_42_ - U); t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((U * t)) * sqrt((2.0 * n)); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))); else tmp = sqrt(abs(((2.0 * n) * (U * (t + (t_1 * U_42_)))))); 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[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$2 - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(t$95$1 * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := t\_1 \cdot \left(U* - U\right)\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_2\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{U \cdot t} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + t\_1 \cdot U*\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 15.4%
Simplified25.1%
associate-*r*28.6%
sub-neg28.6%
distribute-lft-in28.6%
Applied egg-rr28.6%
distribute-lft-out28.6%
sub-neg28.6%
Simplified28.6%
Taylor expanded in t around inf 25.3%
pow1/225.3%
*-commutative25.3%
unpow-prod-down43.5%
pow1/243.5%
pow1/243.5%
Applied egg-rr43.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 75.5%
Simplified78.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%
Simplified6.2%
Taylor expanded in U* around inf 22.4%
mul-1-neg22.4%
associate-/l*22.4%
distribute-rgt-neg-in22.4%
distribute-neg-frac222.4%
*-commutative22.4%
Simplified22.4%
add-sqr-sqrt22.4%
pow1/222.4%
pow1/223.7%
pow-prod-down23.8%
Applied egg-rr22.4%
unpow1/222.4%
unpow222.4%
rem-sqrt-square22.4%
associate-*l*23.8%
associate-/l*23.8%
associate-*r/23.7%
distribute-frac-neg223.7%
unpow223.7%
unpow223.7%
times-frac27.1%
unpow227.1%
Simplified27.1%
pow127.1%
associate-*r*25.7%
associate-*r*25.4%
Applied egg-rr25.4%
Simplified27.1%
Final simplification67.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2 (* t_1 (- U* U)))
(t_3 (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_2)))))
(if (<= t_3 0.0)
(* (sqrt (* U t)) (sqrt (* 2.0 n)))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 (* 2.0 (* l (/ l Om)))))))
(sqrt (* (* 2.0 n) (* U (+ t (* t_1 U*)))))))))
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 = t_1 * (U_42_ - U);
double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((U * t)) * sqrt((2.0 * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + (t_1 * U_42_)))));
}
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 = t_1 * (U_42_ - U);
double t_3 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((U * t)) * Math.sqrt((2.0 * n));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (t_1 * U_42_)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = t_1 * (U_42_ - U) t_3 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((U * t)) * math.sqrt((2.0 * n)) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + (t_1 * U_42_))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(t_1 * Float64(U_42_ - U)) t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(U * t)) * sqrt(Float64(2.0 * n))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(t_1 * U_42_))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = t_1 * (U_42_ - U); t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((U * t)) * sqrt((2.0 * n)); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))); else tmp = sqrt(((2.0 * n) * (U * (t + (t_1 * U_42_))))); 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[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$2 - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(t$95$1 * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := t\_1 \cdot \left(U* - U\right)\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_2\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{U \cdot t} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + t\_1 \cdot U*\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 15.4%
Simplified25.1%
associate-*r*28.6%
sub-neg28.6%
distribute-lft-in28.6%
Applied egg-rr28.6%
distribute-lft-out28.6%
sub-neg28.6%
Simplified28.6%
Taylor expanded in t around inf 25.3%
pow1/225.3%
*-commutative25.3%
unpow-prod-down43.5%
pow1/243.5%
pow1/243.5%
Applied egg-rr43.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 75.5%
Simplified78.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%
Simplified6.2%
Taylor expanded in U* around inf 22.4%
mul-1-neg22.4%
associate-/l*22.4%
distribute-rgt-neg-in22.4%
distribute-neg-frac222.4%
*-commutative22.4%
Simplified22.4%
add-sqr-sqrt22.4%
pow1/222.4%
pow1/223.7%
pow-prod-down23.8%
Applied egg-rr22.4%
unpow1/222.4%
unpow222.4%
rem-sqrt-square22.4%
associate-*l*23.8%
associate-/l*23.8%
associate-*r/23.7%
distribute-frac-neg223.7%
unpow223.7%
unpow223.7%
times-frac27.1%
unpow227.1%
Simplified27.1%
*-un-lft-identity27.1%
associate-*r*25.7%
associate-*r*25.4%
Applied egg-rr25.4%
Simplified25.7%
Final simplification66.7%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_1))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 (fabs n))) (sqrt (fabs (* U t))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l (/ l Om)))))))
(pow
(pow
(* (sqrt (* U U*)) (* l (* n (/ (sqrt 2.0) Om))))
0.3333333333333333)
3.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)) * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1);
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * fabs(n))) * sqrt(fabs((U * t)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l * (l / Om)))))));
} else {
tmp = pow(pow((sqrt((U * U_42_)) * (l * (n * (sqrt(2.0) / Om)))), 0.3333333333333333), 3.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)) * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1);
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * Math.abs(n))) * Math.sqrt(Math.abs((U * t)));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.pow(Math.pow((Math.sqrt((U * U_42_)) * (l * (n * (Math.sqrt(2.0) / Om)))), 0.3333333333333333), 3.0);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt((2.0 * math.fabs(n))) * math.sqrt(math.fabs((U * t))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l * (l / Om))))))) else: tmp = math.pow(math.pow((math.sqrt((U * U_42_)) * (l * (n * (math.sqrt(2.0) / Om)))), 0.3333333333333333), 3.0) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1)) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * abs(n))) * sqrt(abs(Float64(U * t)))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = (Float64(sqrt(Float64(U * U_42_)) * Float64(l * Float64(n * Float64(sqrt(2.0) / Om)))) ^ 0.3333333333333333) ^ 3.0; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt((2.0 * abs(n))) * sqrt(abs((U * t))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l * (l / Om))))))); else tmp = ((sqrt((U * U_42_)) * (l * (n * (sqrt(2.0) / Om)))) ^ 0.3333333333333333) ^ 3.0; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * N[Abs[n], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[N[(U * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(l * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.3333333333333333], $MachinePrecision], 3.0], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot \left|n\right|} \cdot \sqrt{\left|U \cdot t\right|}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\right)}^{0.3333333333333333}\right)}^{3}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 14.0%
Simplified23.3%
Taylor expanded in U* around inf 22.4%
mul-1-neg22.4%
associate-/l*22.4%
distribute-rgt-neg-in22.4%
distribute-neg-frac222.4%
*-commutative22.4%
Simplified22.4%
add-sqr-sqrt22.4%
pow1/222.4%
pow1/222.4%
pow-prod-down16.4%
Applied egg-rr13.5%
unpow1/213.5%
unpow213.5%
rem-sqrt-square13.5%
associate-*l*22.4%
associate-/l*22.4%
associate-*r/22.5%
distribute-frac-neg222.5%
unpow222.5%
unpow222.5%
times-frac26.5%
unpow226.5%
Simplified26.5%
pow1/226.5%
fabs-mul26.5%
unpow-prod-down77.6%
associate-*r*77.6%
Applied egg-rr77.6%
Simplified77.6%
Taylor expanded in t around inf 72.0%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 75.5%
Simplified78.6%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified6.3%
Taylor expanded in U* around inf 21.2%
add-cube-cbrt21.2%
pow321.2%
*-commutative21.2%
associate-/l*21.2%
Applied egg-rr21.2%
pow1/326.5%
associate-/l*26.5%
Applied egg-rr26.5%
Final simplification70.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2 (* (* n t_1) (- U* U)))
(t_3 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_2))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 (fabs n))) (sqrt (fabs (* U (+ t (* t_1 (* n U*)))))))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 (* 2.0 (* l (/ l Om)))))))
(pow
(pow
(* (sqrt (* U U*)) (* l (* n (/ (sqrt 2.0) Om))))
0.3333333333333333)
3.0)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = (n * t_1) * (U_42_ - U);
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2);
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * fabs(n))) * sqrt(fabs((U * (t + (t_1 * (n * U_42_))))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = pow(pow((sqrt((U * U_42_)) * (l * (n * (sqrt(2.0) / Om)))), 0.3333333333333333), 3.0);
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.pow((l / Om), 2.0);
double t_2 = (n * t_1) * (U_42_ - U);
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2);
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * Math.abs(n))) * Math.sqrt(Math.abs((U * (t + (t_1 * (n * U_42_))))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.pow(Math.pow((Math.sqrt((U * U_42_)) * (l * (n * (Math.sqrt(2.0) / Om)))), 0.3333333333333333), 3.0);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = math.pow((l / Om), 2.0) t_2 = (n * t_1) * (U_42_ - U) t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * math.fabs(n))) * math.sqrt(math.fabs((U * (t + (t_1 * (n * U_42_)))))) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))) else: tmp = math.pow(math.pow((math.sqrt((U * U_42_)) * (l * (n * (math.sqrt(2.0) / Om)))), 0.3333333333333333), 3.0) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Om) ^ 2.0 t_2 = Float64(Float64(n * t_1) * Float64(U_42_ - U)) t_3 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2)) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * abs(n))) * sqrt(abs(Float64(U * Float64(t + Float64(t_1 * Float64(n * U_42_))))))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = (Float64(sqrt(Float64(U * U_42_)) * Float64(l * Float64(n * Float64(sqrt(2.0) / Om)))) ^ 0.3333333333333333) ^ 3.0; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l / Om) ^ 2.0; t_2 = (n * t_1) * (U_42_ - U); t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * abs(n))) * sqrt(abs((U * (t + (t_1 * (n * U_42_)))))); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))); else tmp = ((sqrt((U * U_42_)) * (l * (n * (sqrt(2.0) / Om)))) ^ 0.3333333333333333) ^ 3.0; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * N[Abs[n], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[N[(U * N[(t + N[(t$95$1 * N[(n * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$2 - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(l * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.3333333333333333], $MachinePrecision], 3.0], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \left(n \cdot t\_1\right) \cdot \left(U* - U\right)\\
t_3 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_2\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot \left|n\right|} \cdot \sqrt{\left|U \cdot \left(t + t\_1 \cdot \left(n \cdot U*\right)\right)\right|}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\right)}^{0.3333333333333333}\right)}^{3}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 14.0%
Simplified23.3%
Taylor expanded in U* around inf 22.4%
mul-1-neg22.4%
associate-/l*22.4%
distribute-rgt-neg-in22.4%
distribute-neg-frac222.4%
*-commutative22.4%
Simplified22.4%
add-sqr-sqrt22.4%
pow1/222.4%
pow1/222.4%
pow-prod-down16.4%
Applied egg-rr13.5%
unpow1/213.5%
unpow213.5%
rem-sqrt-square13.5%
associate-*l*22.4%
associate-/l*22.4%
associate-*r/22.5%
distribute-frac-neg222.5%
unpow222.5%
unpow222.5%
times-frac26.5%
unpow226.5%
Simplified26.5%
pow1/226.5%
fabs-mul26.5%
unpow-prod-down77.6%
associate-*r*77.6%
Applied egg-rr77.6%
Simplified77.6%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 75.5%
Simplified78.6%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified6.3%
Taylor expanded in U* around inf 21.2%
add-cube-cbrt21.2%
pow321.2%
*-commutative21.2%
associate-/l*21.2%
Applied egg-rr21.2%
pow1/326.5%
associate-/l*26.5%
Applied egg-rr26.5%
Final simplification71.3%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2 (* t_1 (- U* U)))
(t_3 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_2))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 (fabs n))) (sqrt (fabs (* U t))))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 (* 2.0 (* l (/ l Om)))))))
(sqrt (fabs (* (* 2.0 n) (* U (+ t (* t_1 U*))))))))))
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 = t_1 * (U_42_ - U);
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2);
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * fabs(n))) * sqrt(fabs((U * t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(fabs(((2.0 * n) * (U * (t + (t_1 * U_42_))))));
}
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 = t_1 * (U_42_ - U);
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2);
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * Math.abs(n))) * Math.sqrt(Math.abs((U * t)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(Math.abs(((2.0 * n) * (U * (t + (t_1 * U_42_))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = t_1 * (U_42_ - U) t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * math.fabs(n))) * math.sqrt(math.fabs((U * t))) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(math.fabs(((2.0 * n) * (U * (t + (t_1 * U_42_)))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(t_1 * Float64(U_42_ - U)) t_3 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2)) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * abs(n))) * sqrt(abs(Float64(U * t)))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(abs(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(t_1 * U_42_)))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = t_1 * (U_42_ - U); t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_2); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * abs(n))) * sqrt(abs((U * t))); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - (2.0 * (l * (l / Om))))))); else tmp = sqrt(abs(((2.0 * n) * (U * (t + (t_1 * U_42_)))))); 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[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * N[Abs[n], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[N[(U * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$2 - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(t$95$1 * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := t\_1 \cdot \left(U* - U\right)\\
t_3 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_2\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot \left|n\right|} \cdot \sqrt{\left|U \cdot t\right|}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + t\_1 \cdot U*\right)\right)\right|}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 14.0%
Simplified23.3%
Taylor expanded in U* around inf 22.4%
mul-1-neg22.4%
associate-/l*22.4%
distribute-rgt-neg-in22.4%
distribute-neg-frac222.4%
*-commutative22.4%
Simplified22.4%
add-sqr-sqrt22.4%
pow1/222.4%
pow1/222.4%
pow-prod-down16.4%
Applied egg-rr13.5%
unpow1/213.5%
unpow213.5%
rem-sqrt-square13.5%
associate-*l*22.4%
associate-/l*22.4%
associate-*r/22.5%
distribute-frac-neg222.5%
unpow222.5%
unpow222.5%
times-frac26.5%
unpow226.5%
Simplified26.5%
pow1/226.5%
fabs-mul26.5%
unpow-prod-down77.6%
associate-*r*77.6%
Applied egg-rr77.6%
Simplified77.6%
Taylor expanded in t around inf 72.0%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 75.5%
Simplified78.6%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified6.3%
Taylor expanded in U* around inf 24.2%
mul-1-neg24.2%
associate-/l*24.2%
distribute-rgt-neg-in24.2%
distribute-neg-frac224.2%
*-commutative24.2%
Simplified24.2%
add-sqr-sqrt24.2%
pow1/224.2%
pow1/225.5%
pow-prod-down25.7%
Applied egg-rr24.2%
unpow1/224.2%
unpow224.2%
rem-sqrt-square24.2%
associate-*l*25.7%
associate-/l*25.7%
associate-*r/25.6%
distribute-frac-neg225.6%
unpow225.6%
unpow225.6%
times-frac28.9%
unpow228.9%
Simplified28.9%
pow128.9%
associate-*r*24.6%
associate-*r*24.3%
Applied egg-rr24.3%
Simplified28.9%
Final simplification71.0%
(FPCore (n U t l Om U*) :precision binary64 (if (or (<= Om -1e+19) (not (<= Om 2.9e-102))) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om)))))))) (sqrt (* (* 2.0 n) (* U (+ t (* (* n (pow (/ l Om) 2.0)) U*)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1e+19) || !(Om <= 2.9e-102)) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + ((n * pow((l / Om), 2.0)) * U_42_)))));
}
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 ((om <= (-1d+19)) .or. (.not. (om <= 2.9d-102))) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t + ((n * ((l / om) ** 2.0d0)) * u_42)))))
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 ((Om <= -1e+19) || !(Om <= 2.9e-102)) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((n * Math.pow((l / Om), 2.0)) * U_42_)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -1e+19) or not (Om <= 2.9e-102): tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + ((n * math.pow((l / Om), 2.0)) * U_42_))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -1e+19) || !(Om <= 2.9e-102)) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * U_42_))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -1e+19) || ~((Om <= 2.9e-102))) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); else tmp = sqrt(((2.0 * n) * (U * (t + ((n * ((l / Om) ^ 2.0)) * U_42_))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -1e+19], N[Not[LessEqual[Om, 2.9e-102]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1 \cdot 10^{+19} \lor \neg \left(Om \leq 2.9 \cdot 10^{-102}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot U*\right)\right)}\\
\end{array}
\end{array}
if Om < -1e19 or 2.89999999999999986e-102 < Om Initial program 62.2%
Simplified59.7%
Taylor expanded in n around 0 57.1%
unpow257.1%
associate-*r/61.2%
*-commutative61.2%
Applied egg-rr61.2%
if -1e19 < Om < 2.89999999999999986e-102Initial program 48.7%
Simplified47.6%
Taylor expanded in U* around inf 47.5%
mul-1-neg47.5%
associate-/l*47.6%
distribute-rgt-neg-in47.6%
distribute-neg-frac247.6%
*-commutative47.6%
Simplified47.6%
add-sqr-sqrt47.6%
pow1/247.6%
pow1/247.7%
pow-prod-down38.3%
Applied egg-rr37.9%
unpow1/237.9%
unpow237.9%
rem-sqrt-square47.6%
associate-*l*48.0%
associate-/l*48.0%
associate-*r/47.6%
distribute-frac-neg247.6%
unpow247.6%
unpow247.6%
times-frac55.8%
unpow255.8%
Simplified55.8%
*-un-lft-identity55.8%
associate-*r*56.5%
associate-*r*57.4%
Applied egg-rr57.4%
Simplified55.4%
Final simplification59.2%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U* 6.8e+249) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om)))))))) (sqrt (* (* 2.0 n) (* (* n (pow (/ l Om) 2.0)) (* U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 6.8e+249) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt(((2.0 * n) * ((n * pow((l / Om), 2.0)) * (U * U_42_))));
}
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 (u_42 <= 6.8d+249) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
else
tmp = sqrt(((2.0d0 * n) * ((n * ((l / om) ** 2.0d0)) * (u * u_42))))
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 (U_42_ <= 6.8e+249) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((n * Math.pow((l / Om), 2.0)) * (U * U_42_))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 6.8e+249: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt(((2.0 * n) * ((n * math.pow((l / Om), 2.0)) * (U * U_42_)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 6.8e+249) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U * U_42_)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= 6.8e+249) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); else tmp = sqrt(((2.0 * n) * ((n * ((l / Om) ^ 2.0)) * (U * U_42_)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, 6.8e+249], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 6.8 \cdot 10^{+249}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U \cdot U*\right)\right)}\\
\end{array}
\end{array}
if U* < 6.80000000000000026e249Initial program 56.3%
Simplified54.5%
Taylor expanded in n around 0 49.8%
unpow249.8%
associate-*r/52.7%
*-commutative52.7%
Applied egg-rr52.7%
if 6.80000000000000026e249 < U* Initial program 75.9%
Simplified69.8%
associate-*r*69.9%
sub-neg69.9%
distribute-lft-in19.6%
Applied egg-rr19.6%
distribute-lft-out69.9%
sub-neg69.9%
Simplified69.9%
Taylor expanded in U* around inf 69.6%
associate-/l*69.6%
*-commutative69.6%
Applied egg-rr69.6%
associate-*r/69.6%
associate-*l*69.8%
associate-/l*70.0%
associate-/l*70.0%
unpow270.0%
unpow270.0%
times-frac73.7%
unpow273.7%
Simplified73.7%
Final simplification54.0%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 1.42e+162) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om)))))))) (* (sqrt t) (sqrt (* n (* 2.0 U))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 1.42e+162) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt(t) * sqrt((n * (2.0 * 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 <= 1.42d+162) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
else
tmp = sqrt(t) * sqrt((n * (2.0d0 * 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 <= 1.42e+162) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt(t) * Math.sqrt((n * (2.0 * U)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 1.42e+162: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt(t) * math.sqrt((n * (2.0 * U))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 1.42e+162) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); else tmp = Float64(sqrt(t) * sqrt(Float64(n * Float64(2.0 * U)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= 1.42e+162) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); else tmp = sqrt(t) * sqrt((n * (2.0 * U))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 1.42e+162], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.42 \cdot 10^{+162}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{n \cdot \left(2 \cdot U\right)}\\
\end{array}
\end{array}
if t < 1.4199999999999999e162Initial program 59.0%
Simplified57.2%
Taylor expanded in n around 0 49.6%
unpow249.6%
associate-*r/52.7%
*-commutative52.7%
Applied egg-rr52.7%
if 1.4199999999999999e162 < t Initial program 46.4%
Simplified42.2%
Applied egg-rr58.4%
associate-*r/58.4%
*-commutative58.4%
*-commutative58.4%
Simplified58.4%
Taylor expanded in t around inf 61.8%
Final simplification53.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.5e-94) (sqrt (* (* (* 2.0 n) U) t)) (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_) {
double tmp;
if (l <= 4.5e-94) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
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 <= 4.5d-94) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
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 <= 4.5e-94) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.5e-94: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.5e-94) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.5e-94) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.5e-94], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.5 \cdot 10^{-94}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 4.5000000000000002e-94Initial program 68.1%
Taylor expanded in t around inf 54.2%
if 4.5000000000000002e-94 < l Initial program 40.1%
Simplified42.3%
Taylor expanded in n around 0 36.6%
unpow236.6%
associate-*r/42.7%
*-commutative42.7%
Applied egg-rr42.7%
Final simplification49.8%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 6.4e-89) (sqrt (* (* (* 2.0 n) U) t)) (pow (* (* 2.0 U) (* n t)) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.4e-89) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = pow(((2.0 * U) * (n * t)), 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 <= 6.4d-89) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = ((2.0d0 * u) * (n * t)) ** 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 <= 6.4e-89) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.pow(((2.0 * U) * (n * t)), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.4e-89: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.pow(((2.0 * U) * (n * t)), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.4e-89) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = Float64(Float64(2.0 * U) * Float64(n * t)) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 6.4e-89) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = ((2.0 * U) * (n * t)) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 6.4e-89], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.4 \cdot 10^{-89}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 6.39999999999999997e-89Initial program 67.7%
Taylor expanded in t around inf 53.9%
if 6.39999999999999997e-89 < l Initial program 40.5%
Simplified42.7%
Taylor expanded in t around inf 26.4%
pow1/227.4%
associate-*r*27.4%
Applied egg-rr27.4%
Final simplification44.0%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 9.5e-87) (sqrt (* (* (* 2.0 n) U) t)) (sqrt (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 9.5e-87) {
tmp = sqrt((((2.0 * n) * U) * t));
} 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 (l <= 9.5d-87) then
tmp = sqrt((((2.0d0 * n) * u) * t))
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 (l <= 9.5e-87) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 9.5e-87: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 9.5e-87) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); 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 (l <= 9.5e-87) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 9.5e-87], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 9.5 \cdot 10^{-87}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 9.5e-87Initial program 67.7%
Taylor expanded in t around inf 53.9%
if 9.5e-87 < l Initial program 40.5%
Simplified42.7%
Taylor expanded in t around inf 26.4%
Final simplification43.6%
(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 57.5%
Simplified55.5%
Taylor expanded in t around inf 41.2%
Final simplification41.2%
herbie shell --seed 2024110
(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*))))))