
(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 20 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 (* U (* 2.0 n)))
(t_3
(sqrt
(* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U* U)))))))
(if (<= t_3 2e-148)
(*
(pow (* U (- t (fma 2.0 (* l (/ l Om)) (* n (* t_1 (- U U*)))))) 0.5)
(sqrt (* 2.0 n)))
(if (<= t_3 INFINITY)
(sqrt
(*
t_2
(+
(- t (* 2.0 (/ l (/ Om l))))
(* (pow (* (pow (cbrt (/ l Om)) 2.0) (cbrt n)) 3.0) (- U* U)))))
(cbrt (pow (* 2.0 (* -2.0 (/ (* U (* n (pow l 2.0))) Om))) 1.5))))))
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 = U * (2.0 * n);
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)))));
double tmp;
if (t_3 <= 2e-148) {
tmp = pow((U * (t - fma(2.0, (l * (l / Om)), (n * (t_1 * (U - U_42_)))))), 0.5) * sqrt((2.0 * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + (pow((pow(cbrt((l / Om)), 2.0) * cbrt(n)), 3.0) * (U_42_ - U)))));
} else {
tmp = cbrt(pow((2.0 * (-2.0 * ((U * (n * pow(l, 2.0))) / Om))), 1.5));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Om) ^ 2.0 t_2 = Float64(U * Float64(2.0 * n)) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * t_1) * Float64(U_42_ - U))))) tmp = 0.0 if (t_3 <= 2e-148) tmp = Float64((Float64(U * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(n * Float64(t_1 * Float64(U - U_42_)))))) ^ 0.5) * sqrt(Float64(2.0 * n))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l / Float64(Om / l)))) + Float64((Float64((cbrt(Float64(l / Om)) ^ 2.0) * cbrt(n)) ^ 3.0) * Float64(U_42_ - U))))); else tmp = cbrt((Float64(2.0 * Float64(-2.0 * Float64(Float64(U * Float64(n * (l ^ 2.0))) / Om))) ^ 1.5)); 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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * 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]}, If[LessEqual[t$95$3, 2e-148], N[(N[Power[N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[Power[N[Power[N[(l / Om), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[n, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(2.0 * N[(-2.0 * N[(N[(U * N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := U \cdot \left(2 \cdot n\right)\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot t_1\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;{\left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left(t_1 \cdot \left(U - U*\right)\right)\right)\right)\right)}^{0.5} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + {\left({\left(\sqrt[3]{\frac{\ell}{Om}}\right)}^{2} \cdot \sqrt[3]{n}\right)}^{3} \cdot \left(U* - U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(2 \cdot \left(-2 \cdot \frac{U \cdot \left(n \cdot {\ell}^{2}\right)}{Om}\right)\right)}^{1.5}}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999987e-148Initial program 14.7%
associate-/l*14.7%
add-sqr-sqrt6.7%
*-un-lft-identity6.7%
times-frac6.7%
Applied egg-rr6.7%
/-rgt-identity6.7%
associate-*r/6.7%
rem-square-sqrt14.7%
Simplified14.7%
pow1/214.7%
associate-*l*35.4%
unpow-prod-down46.8%
pow1/246.8%
associate--l-46.8%
fma-def46.8%
div-inv46.8%
clear-num46.8%
associate-*l*46.8%
Applied egg-rr46.8%
if 1.99999999999999987e-148 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 63.5%
associate-/l*70.5%
add-sqr-sqrt31.5%
*-un-lft-identity31.5%
times-frac31.5%
Applied egg-rr31.5%
/-rgt-identity31.5%
associate-*r/31.5%
rem-square-sqrt70.5%
Simplified70.5%
add-cube-cbrt70.4%
pow370.4%
Applied egg-rr70.4%
*-commutative70.4%
cbrt-prod70.4%
unpow270.4%
cbrt-prod71.2%
pow271.2%
Applied egg-rr71.2%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified2.9%
Taylor expanded in Om around inf 6.2%
*-commutative6.2%
associate-*l/6.2%
associate-*r/6.2%
Simplified6.2%
add-cbrt-cube6.1%
pow1/36.0%
add-sqr-sqrt6.0%
pow16.0%
pow1/227.2%
pow-prod-up27.2%
associate-*r*27.2%
metadata-eval27.2%
Applied egg-rr27.2%
unpow1/327.4%
associate-*l*27.4%
associate-*l*28.3%
Simplified28.3%
Taylor expanded in t around 0 30.6%
Final simplification61.3%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* U (* 2.0 n)))
(t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1)))))
(if (<= t_3 0.0)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (/ l (/ Om l)))) t_1)))
(cbrt (pow (* 2.0 (* -2.0 (/ (* U (* n (pow l 2.0))) Om))) 1.5))))))
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 = U * (2.0 * n);
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + t_1)));
} else {
tmp = cbrt(pow((2.0 * (-2.0 * ((U * (n * pow(l, 2.0))) / Om))), 1.5));
}
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 = U * (2.0 * n);
double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + t_1)));
} else {
tmp = Math.cbrt(Math.pow((2.0 * (-2.0 * ((U * (n * Math.pow(l, 2.0))) / Om))), 1.5));
}
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(U * Float64(2.0 * n)) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l / Float64(Om / l)))) + t_1))); else tmp = cbrt((Float64(2.0 * Float64(-2.0 * Float64(Float64(U * Float64(n * (l ^ 2.0))) / Om))) ^ 1.5)); end return 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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(2.0 * N[(-2.0 * N[(N[(U * N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $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 := U \cdot \left(2 \cdot n\right)\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(2 \cdot \left(-2 \cdot \frac{U \cdot \left(n \cdot {\ell}^{2}\right)}{Om}\right)\right)}^{1.5}}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 12.4%
Simplified12.4%
Taylor expanded in n around 0 33.8%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 63.7%
associate-/l*70.6%
add-sqr-sqrt31.9%
*-un-lft-identity31.9%
times-frac31.8%
Applied egg-rr31.8%
/-rgt-identity31.8%
associate-*r/31.9%
rem-square-sqrt70.6%
Simplified70.6%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified2.9%
Taylor expanded in Om around inf 6.2%
*-commutative6.2%
associate-*l/6.2%
associate-*r/6.2%
Simplified6.2%
add-cbrt-cube6.1%
pow1/36.0%
add-sqr-sqrt6.0%
pow16.0%
pow1/227.2%
pow-prod-up27.2%
associate-*r*27.2%
metadata-eval27.2%
Applied egg-rr27.2%
unpow1/327.4%
associate-*l*27.4%
associate-*l*28.3%
Simplified28.3%
Taylor expanded in t around 0 30.6%
Final simplification59.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* U (* 2.0 n)))
(t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1)))))
(if (<= t_3 2e-148)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (* (pow l 2.0) (/ 2.0 Om))))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (/ l (/ Om l)))) t_1)))
(cbrt (pow (* 2.0 (* -2.0 (/ (* U (* n (pow l 2.0))) Om))) 1.5))))))
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 = U * (2.0 * n);
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 2e-148) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - (pow(l, 2.0) * (2.0 / Om)))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + t_1)));
} else {
tmp = cbrt(pow((2.0 * (-2.0 * ((U * (n * pow(l, 2.0))) / Om))), 1.5));
}
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 = U * (2.0 * n);
double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 2e-148) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - (Math.pow(l, 2.0) * (2.0 / Om)))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + t_1)));
} else {
tmp = Math.cbrt(Math.pow((2.0 * (-2.0 * ((U * (n * Math.pow(l, 2.0))) / Om))), 1.5));
}
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(U * Float64(2.0 * n)) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1))) tmp = 0.0 if (t_3 <= 2e-148) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64((l ^ 2.0) * Float64(2.0 / Om)))))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l / Float64(Om / l)))) + t_1))); else tmp = cbrt((Float64(2.0 * Float64(-2.0 * Float64(Float64(U * Float64(n * (l ^ 2.0))) / Om))) ^ 1.5)); end return 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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-148], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(2.0 * N[(-2.0 * N[(N[(U * N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $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 := U \cdot \left(2 \cdot n\right)\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right)}\\
\mathbf{if}\;t_3 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - {\ell}^{2} \cdot \frac{2}{Om}\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(2 \cdot \left(-2 \cdot \frac{U \cdot \left(n \cdot {\ell}^{2}\right)}{Om}\right)\right)}^{1.5}}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999987e-148Initial program 14.7%
Simplified14.7%
Applied egg-rr46.8%
*-commutative46.8%
fma-def46.8%
+-commutative46.8%
fma-def46.8%
*-commutative46.8%
*-commutative46.8%
associate-*l/46.8%
associate-*r/46.8%
Simplified46.8%
Taylor expanded in n around 0 44.5%
associate-*r/44.5%
*-commutative44.5%
associate-*r/44.5%
Simplified44.5%
if 1.99999999999999987e-148 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 63.5%
associate-/l*70.5%
add-sqr-sqrt31.5%
*-un-lft-identity31.5%
times-frac31.5%
Applied egg-rr31.5%
/-rgt-identity31.5%
associate-*r/31.5%
rem-square-sqrt70.5%
Simplified70.5%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified2.9%
Taylor expanded in Om around inf 6.2%
*-commutative6.2%
associate-*l/6.2%
associate-*r/6.2%
Simplified6.2%
add-cbrt-cube6.1%
pow1/36.0%
add-sqr-sqrt6.0%
pow16.0%
pow1/227.2%
pow-prod-up27.2%
associate-*r*27.2%
metadata-eval27.2%
Applied egg-rr27.2%
unpow1/327.4%
associate-*l*27.4%
associate-*l*28.3%
Simplified28.3%
Taylor expanded in t around 0 30.6%
Final simplification60.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* U (* 2.0 n)))
(t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1)))))
(if (<= t_3 2e-148)
(* (sqrt (* 2.0 n)) (sqrt (fma -2.0 (/ U (/ Om (pow l 2.0))) (* U t))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (/ l (/ Om l)))) t_1)))
(cbrt (pow (* 2.0 (* -2.0 (/ (* U (* n (pow l 2.0))) Om))) 1.5))))))
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 = U * (2.0 * n);
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 2e-148) {
tmp = sqrt((2.0 * n)) * sqrt(fma(-2.0, (U / (Om / pow(l, 2.0))), (U * t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + t_1)));
} else {
tmp = cbrt(pow((2.0 * (-2.0 * ((U * (n * pow(l, 2.0))) / Om))), 1.5));
}
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(U * Float64(2.0 * n)) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1))) tmp = 0.0 if (t_3 <= 2e-148) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(fma(-2.0, Float64(U / Float64(Om / (l ^ 2.0))), Float64(U * t)))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l / Float64(Om / l)))) + t_1))); else tmp = cbrt((Float64(2.0 * Float64(-2.0 * Float64(Float64(U * Float64(n * (l ^ 2.0))) / Om))) ^ 1.5)); end return 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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-148], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(U / N[(Om / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(2.0 * N[(-2.0 * N[(N[(U * N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $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 := U \cdot \left(2 \cdot n\right)\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right)}\\
\mathbf{if}\;t_3 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{\mathsf{fma}\left(-2, \frac{U}{\frac{Om}{{\ell}^{2}}}, U \cdot t\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(2 \cdot \left(-2 \cdot \frac{U \cdot \left(n \cdot {\ell}^{2}\right)}{Om}\right)\right)}^{1.5}}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999987e-148Initial program 14.7%
Simplified14.7%
Applied egg-rr46.8%
*-commutative46.8%
fma-def46.8%
+-commutative46.8%
fma-def46.8%
*-commutative46.8%
*-commutative46.8%
associate-*l/46.8%
associate-*r/46.8%
Simplified46.8%
Taylor expanded in n around 0 44.5%
associate-*r/44.5%
*-commutative44.5%
associate-*r/44.5%
Simplified44.5%
Taylor expanded in t around 0 42.2%
fma-def42.2%
associate-/l*44.5%
Simplified44.5%
if 1.99999999999999987e-148 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 63.5%
associate-/l*70.5%
add-sqr-sqrt31.5%
*-un-lft-identity31.5%
times-frac31.5%
Applied egg-rr31.5%
/-rgt-identity31.5%
associate-*r/31.5%
rem-square-sqrt70.5%
Simplified70.5%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified2.9%
Taylor expanded in Om around inf 6.2%
*-commutative6.2%
associate-*l/6.2%
associate-*r/6.2%
Simplified6.2%
add-cbrt-cube6.1%
pow1/36.0%
add-sqr-sqrt6.0%
pow16.0%
pow1/227.2%
pow-prod-up27.2%
associate-*r*27.2%
metadata-eval27.2%
Applied egg-rr27.2%
unpow1/327.4%
associate-*l*27.4%
associate-*l*28.3%
Simplified28.3%
Taylor expanded in t around 0 30.6%
Final simplification60.5%
(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 (* U (* 2.0 n)))
(t_4 (sqrt (* t_3 (+ (- t (* 2.0 (/ (* l l) Om))) t_2)))))
(if (<= t_4 2e-148)
(*
(pow (* U (- t (fma 2.0 (* l (/ l Om)) (* n (* t_1 (- U U*)))))) 0.5)
(sqrt (* 2.0 n)))
(if (<= t_4 INFINITY)
(sqrt (* t_3 (+ (- t (* 2.0 (/ l (/ Om l)))) t_2)))
(cbrt (pow (* 2.0 (* -2.0 (/ (* U (* n (pow l 2.0))) Om))) 1.5))))))
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 = U * (2.0 * n);
double t_4 = sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_4 <= 2e-148) {
tmp = pow((U * (t - fma(2.0, (l * (l / Om)), (n * (t_1 * (U - U_42_)))))), 0.5) * sqrt((2.0 * n));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_3 * ((t - (2.0 * (l / (Om / l)))) + t_2)));
} else {
tmp = cbrt(pow((2.0 * (-2.0 * ((U * (n * pow(l, 2.0))) / Om))), 1.5));
}
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(U * Float64(2.0 * n)) t_4 = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2))) tmp = 0.0 if (t_4 <= 2e-148) tmp = Float64((Float64(U * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(n * Float64(t_1 * Float64(U - U_42_)))))) ^ 0.5) * sqrt(Float64(2.0 * n))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(l / Float64(Om / l)))) + t_2))); else tmp = cbrt((Float64(2.0 * Float64(-2.0 * Float64(Float64(U * Float64(n * (l ^ 2.0))) / Om))) ^ 1.5)); 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[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$3 * 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$4, 2e-148], N[(N[Power[N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(2.0 * N[(-2.0 * N[(N[(U * N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $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 := U \cdot \left(2 \cdot n\right)\\
t_4 := \sqrt{t_3 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2\right)}\\
\mathbf{if}\;t_4 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;{\left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left(t_1 \cdot \left(U - U*\right)\right)\right)\right)\right)}^{0.5} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\sqrt{t_3 \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(2 \cdot \left(-2 \cdot \frac{U \cdot \left(n \cdot {\ell}^{2}\right)}{Om}\right)\right)}^{1.5}}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999987e-148Initial program 14.7%
associate-/l*14.7%
add-sqr-sqrt6.7%
*-un-lft-identity6.7%
times-frac6.7%
Applied egg-rr6.7%
/-rgt-identity6.7%
associate-*r/6.7%
rem-square-sqrt14.7%
Simplified14.7%
pow1/214.7%
associate-*l*35.4%
unpow-prod-down46.8%
pow1/246.8%
associate--l-46.8%
fma-def46.8%
div-inv46.8%
clear-num46.8%
associate-*l*46.8%
Applied egg-rr46.8%
if 1.99999999999999987e-148 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 63.5%
associate-/l*70.5%
add-sqr-sqrt31.5%
*-un-lft-identity31.5%
times-frac31.5%
Applied egg-rr31.5%
/-rgt-identity31.5%
associate-*r/31.5%
rem-square-sqrt70.5%
Simplified70.5%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified2.9%
Taylor expanded in Om around inf 6.2%
*-commutative6.2%
associate-*l/6.2%
associate-*r/6.2%
Simplified6.2%
add-cbrt-cube6.1%
pow1/36.0%
add-sqr-sqrt6.0%
pow16.0%
pow1/227.2%
pow-prod-up27.2%
associate-*r*27.2%
metadata-eval27.2%
Applied egg-rr27.2%
unpow1/327.4%
associate-*l*27.4%
associate-*l*28.3%
Simplified28.3%
Taylor expanded in t around 0 30.6%
Final simplification60.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* U (* 2.0 n)))
(t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1)))))
(if (<= t_3 0.0)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (/ l (/ Om l)))) t_1)))
(pow (* (* 2.0 n) (* U (- t (/ (* 2.0 (pow l 2.0)) Om)))) 0.5)))))
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 = U * (2.0 * n);
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + t_1)));
} else {
tmp = pow(((2.0 * n) * (U * (t - ((2.0 * pow(l, 2.0)) / Om)))), 0.5);
}
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 = U * (2.0 * n);
double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + t_1)));
} else {
tmp = Math.pow(((2.0 * n) * (U * (t - ((2.0 * Math.pow(l, 2.0)) / Om)))), 0.5);
}
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 = U * (2.0 * n) t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + t_1))) else: tmp = math.pow(((2.0 * n) * (U * (t - ((2.0 * math.pow(l, 2.0)) / Om)))), 0.5) 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(U * Float64(2.0 * n)) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l / Float64(Om / l)))) + t_1))); else tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(2.0 * (l ^ 2.0)) / Om)))) ^ 0.5; 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 = U * (2.0 * n); t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l / (Om / l)))) + t_1))); else tmp = ((2.0 * n) * (U * (t - ((2.0 * (l ^ 2.0)) / Om)))) ^ 0.5; 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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $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 := U \cdot \left(2 \cdot n\right)\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{2 \cdot {\ell}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 12.4%
Simplified12.4%
Taylor expanded in n around 0 33.8%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 63.7%
associate-/l*70.6%
add-sqr-sqrt31.9%
*-un-lft-identity31.9%
times-frac31.8%
Applied egg-rr31.8%
/-rgt-identity31.8%
associate-*r/31.9%
rem-square-sqrt70.6%
Simplified70.6%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified2.9%
Applied egg-rr0.5%
*-commutative0.5%
fma-def0.5%
+-commutative0.5%
fma-def0.5%
*-commutative0.5%
*-commutative0.5%
associate-*l/0.5%
associate-*r/0.5%
Simplified0.5%
Taylor expanded in n around 0 3.5%
associate-*r/3.5%
*-commutative3.5%
associate-*r/3.5%
Simplified3.5%
sqrt-unprod7.1%
pow1/228.4%
associate-*r/28.4%
Applied egg-rr28.4%
Final simplification58.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= U -0.95) (not (<= U 5.3e-5)))
(pow (* (- t (* (pow l 2.0) (/ 2.0 Om))) (* 2.0 (* n U))) 0.5)
(sqrt
(*
(* 2.0 n)
(*
U
(+
(+ t (* (/ l (/ Om l)) -2.0))
(* 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 <= -0.95) || !(U <= 5.3e-5)) {
tmp = pow(((t - (pow(l, 2.0) * (2.0 / Om))) * (2.0 * (n * U))), 0.5);
} else {
tmp = sqrt(((2.0 * n) * (U * ((t + ((l / (Om / l)) * -2.0)) + (n * (pow((l / Om), 2.0) * (U_42_ - 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 ((u <= (-0.95d0)) .or. (.not. (u <= 5.3d-5))) then
tmp = ((t - ((l ** 2.0d0) * (2.0d0 / om))) * (2.0d0 * (n * u))) ** 0.5d0
else
tmp = sqrt(((2.0d0 * n) * (u * ((t + ((l / (om / l)) * (-2.0d0))) + (n * (((l / om) ** 2.0d0) * (u_42 - 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 ((U <= -0.95) || !(U <= 5.3e-5)) {
tmp = Math.pow(((t - (Math.pow(l, 2.0) * (2.0 / Om))) * (2.0 * (n * U))), 0.5);
} else {
tmp = Math.sqrt(((2.0 * n) * (U * ((t + ((l / (Om / l)) * -2.0)) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U)))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (U <= -0.95) or not (U <= 5.3e-5): tmp = math.pow(((t - (math.pow(l, 2.0) * (2.0 / Om))) * (2.0 * (n * U))), 0.5) else: tmp = math.sqrt(((2.0 * n) * (U * ((t + ((l / (Om / l)) * -2.0)) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U))))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((U <= -0.95) || !(U <= 5.3e-5)) tmp = Float64(Float64(t - Float64((l ^ 2.0) * Float64(2.0 / Om))) * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t + Float64(Float64(l / Float64(Om / l)) * -2.0)) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((U <= -0.95) || ~((U <= 5.3e-5))) tmp = ((t - ((l ^ 2.0) * (2.0 / Om))) * (2.0 * (n * U))) ^ 0.5; else tmp = sqrt(((2.0 * n) * (U * ((t + ((l / (Om / l)) * -2.0)) + (n * (((l / Om) ^ 2.0) * (U_42_ - U))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[U, -0.95], N[Not[LessEqual[U, 5.3e-5]], $MachinePrecision]], N[Power[N[(N[(t - N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t + N[(N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -0.95 \lor \neg \left(U \leq 5.3 \cdot 10^{-5}\right):\\
\;\;\;\;{\left(\left(t - {\ell}^{2} \cdot \frac{2}{Om}\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t + \frac{\ell}{\frac{Om}{\ell}} \cdot -2\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\
\end{array}
\end{array}
if U < -0.94999999999999996 or 5.3000000000000001e-5 < U Initial program 54.4%
Simplified56.5%
Taylor expanded in Om around inf 49.1%
*-commutative49.1%
associate-*l/49.1%
associate-*r/49.1%
Simplified49.1%
pow1/255.2%
associate-*r*55.2%
Applied egg-rr55.2%
if -0.94999999999999996 < U < 5.3000000000000001e-5Initial program 40.9%
Simplified50.5%
Final simplification52.4%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* U (* 2.0 n)) (- (- 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(((U * (2.0 * n)) * ((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(((u * (2.0d0 * n)) * ((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(((U * (2.0 * n)) * ((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(((U * (2.0 * n)) * ((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(U * Float64(2.0 * n)) * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(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(((U * (2.0 * n)) * ((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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $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(U \cdot \left(2 \cdot n\right)\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
Initial program 46.5%
associate-*l/51.8%
Applied egg-rr51.8%
Final simplification51.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (- t (* (pow l 2.0) (/ 2.0 Om)))))
(if (<= Om -2.75e+159)
(sqrt (* 2.0 (* n (* U t_1))))
(pow (* t_1 (* 2.0 (* n U))) 0.5))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (pow(l, 2.0) * (2.0 / Om));
double tmp;
if (Om <= -2.75e+159) {
tmp = sqrt((2.0 * (n * (U * t_1))));
} else {
tmp = pow((t_1 * (2.0 * (n * U))), 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) :: t_1
real(8) :: tmp
t_1 = t - ((l ** 2.0d0) * (2.0d0 / om))
if (om <= (-2.75d+159)) then
tmp = sqrt((2.0d0 * (n * (u * t_1))))
else
tmp = (t_1 * (2.0d0 * (n * u))) ** 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 t_1 = t - (Math.pow(l, 2.0) * (2.0 / Om));
double tmp;
if (Om <= -2.75e+159) {
tmp = Math.sqrt((2.0 * (n * (U * t_1))));
} else {
tmp = Math.pow((t_1 * (2.0 * (n * U))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = t - (math.pow(l, 2.0) * (2.0 / Om)) tmp = 0 if Om <= -2.75e+159: tmp = math.sqrt((2.0 * (n * (U * t_1)))) else: tmp = math.pow((t_1 * (2.0 * (n * U))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(t - Float64((l ^ 2.0) * Float64(2.0 / Om))) tmp = 0.0 if (Om <= -2.75e+159) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t_1)))); else tmp = Float64(t_1 * Float64(2.0 * Float64(n * U))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = t - ((l ^ 2.0) * (2.0 / Om)); tmp = 0.0; if (Om <= -2.75e+159) tmp = sqrt((2.0 * (n * (U * t_1)))); else tmp = (t_1 * (2.0 * (n * U))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(t - N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Om, -2.75e+159], N[Sqrt[N[(2.0 * N[(n * N[(U * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(t$95$1 * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - {\ell}^{2} \cdot \frac{2}{Om}\\
\mathbf{if}\;Om \leq -2.75 \cdot 10^{+159}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(t_1 \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if Om < -2.7499999999999999e159Initial program 45.5%
associate-/l*55.9%
add-sqr-sqrt27.6%
*-un-lft-identity27.6%
times-frac27.5%
Applied egg-rr27.5%
/-rgt-identity27.5%
associate-*r/27.6%
rem-square-sqrt55.9%
Simplified55.9%
Taylor expanded in n around 0 48.1%
associate-*r*42.8%
associate-*r/42.8%
*-commutative42.8%
associate-*r/42.8%
*-commutative42.8%
associate-*l*55.8%
Simplified55.8%
if -2.7499999999999999e159 < Om Initial program 46.7%
Simplified47.3%
Taylor expanded in Om around inf 36.8%
*-commutative36.8%
associate-*l/36.8%
associate-*r/36.8%
Simplified36.8%
pow1/242.5%
associate-*r*42.5%
Applied egg-rr42.5%
Final simplification44.5%
(FPCore (n U t l Om U*) :precision binary64 (if (<= Om -7e+158) (pow (* (* 2.0 n) (* U (- t (/ (* 2.0 (pow l 2.0)) Om)))) 0.5) (pow (* (- t (* (pow l 2.0) (/ 2.0 Om))) (* 2.0 (* n U))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -7e+158) {
tmp = pow(((2.0 * n) * (U * (t - ((2.0 * pow(l, 2.0)) / Om)))), 0.5);
} else {
tmp = pow(((t - (pow(l, 2.0) * (2.0 / Om))) * (2.0 * (n * U))), 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 (om <= (-7d+158)) then
tmp = ((2.0d0 * n) * (u * (t - ((2.0d0 * (l ** 2.0d0)) / om)))) ** 0.5d0
else
tmp = ((t - ((l ** 2.0d0) * (2.0d0 / om))) * (2.0d0 * (n * u))) ** 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 (Om <= -7e+158) {
tmp = Math.pow(((2.0 * n) * (U * (t - ((2.0 * Math.pow(l, 2.0)) / Om)))), 0.5);
} else {
tmp = Math.pow(((t - (Math.pow(l, 2.0) * (2.0 / Om))) * (2.0 * (n * U))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -7e+158: tmp = math.pow(((2.0 * n) * (U * (t - ((2.0 * math.pow(l, 2.0)) / Om)))), 0.5) else: tmp = math.pow(((t - (math.pow(l, 2.0) * (2.0 / Om))) * (2.0 * (n * U))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -7e+158) tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(2.0 * (l ^ 2.0)) / Om)))) ^ 0.5; else tmp = Float64(Float64(t - Float64((l ^ 2.0) * Float64(2.0 / Om))) * Float64(2.0 * Float64(n * U))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -7e+158) tmp = ((2.0 * n) * (U * (t - ((2.0 * (l ^ 2.0)) / Om)))) ^ 0.5; else tmp = ((t - ((l ^ 2.0) * (2.0 / Om))) * (2.0 * (n * U))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -7e+158], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(N[(t - N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -7 \cdot 10^{+158}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{2 \cdot {\ell}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(t - {\ell}^{2} \cdot \frac{2}{Om}\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if Om < -7.0000000000000003e158Initial program 45.5%
Simplified46.9%
Applied egg-rr52.8%
*-commutative52.8%
fma-def52.8%
+-commutative52.8%
fma-def52.8%
*-commutative52.8%
*-commutative52.8%
associate-*l/52.8%
associate-*r/52.8%
Simplified52.8%
Taylor expanded in n around 0 50.1%
associate-*r/50.1%
*-commutative50.1%
associate-*r/50.1%
Simplified50.1%
sqrt-unprod55.8%
pow1/255.8%
associate-*r/55.9%
Applied egg-rr55.9%
if -7.0000000000000003e158 < Om Initial program 46.7%
Simplified47.3%
Taylor expanded in Om around inf 36.8%
*-commutative36.8%
associate-*l/36.8%
associate-*r/36.8%
Simplified36.8%
pow1/242.5%
associate-*r*42.5%
Applied egg-rr42.5%
Final simplification44.5%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U* 4.6e-177) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om))))))) (sqrt (* 2.0 (* n (* U (- t (* (pow l 2.0) (/ 2.0 Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 4.6e-177) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else {
tmp = sqrt((2.0 * (n * (U * (t - (pow(l, 2.0) * (2.0 / 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 (u_42 <= 4.6d-177) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
else
tmp = sqrt((2.0d0 * (n * (u * (t - ((l ** 2.0d0) * (2.0d0 / 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 (U_42_ <= 4.6e-177) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else {
tmp = Math.sqrt((2.0 * (n * (U * (t - (Math.pow(l, 2.0) * (2.0 / Om)))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 4.6e-177: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) else: tmp = math.sqrt((2.0 * (n * (U * (t - (math.pow(l, 2.0) * (2.0 / Om))))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 4.6e-177) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t - Float64((l ^ 2.0) * Float64(2.0 / Om))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= 4.6e-177) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); else tmp = sqrt((2.0 * (n * (U * (t - ((l ^ 2.0) * (2.0 / Om))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, 4.6e-177], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t - N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 4.6 \cdot 10^{-177}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - {\ell}^{2} \cdot \frac{2}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if U* < 4.60000000000000044e-177Initial program 47.2%
Simplified49.5%
Taylor expanded in n around 0 42.7%
if 4.60000000000000044e-177 < U* Initial program 45.6%
associate-/l*49.2%
add-sqr-sqrt20.2%
*-un-lft-identity20.2%
times-frac20.2%
Applied egg-rr20.2%
/-rgt-identity20.2%
associate-*r/20.2%
rem-square-sqrt49.2%
Simplified49.2%
Taylor expanded in n around 0 28.5%
associate-*r*34.5%
associate-*r/34.5%
*-commutative34.5%
associate-*r/34.5%
*-commutative34.5%
associate-*l*37.3%
Simplified37.3%
Final simplification40.4%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 4.8e-70) (sqrt (* 2.0 (* (- t (* 2.0 (/ (pow l 2.0) Om))) (* n U)))) (sqrt (fabs (* 2.0 (* U (* n t)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 4.8e-70) {
tmp = sqrt((2.0 * ((t - (2.0 * (pow(l, 2.0) / Om))) * (n * U))));
} else {
tmp = sqrt(fabs((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 (t <= 4.8d-70) then
tmp = sqrt((2.0d0 * ((t - (2.0d0 * ((l ** 2.0d0) / om))) * (n * u))))
else
tmp = sqrt(abs((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 (t <= 4.8e-70) {
tmp = Math.sqrt((2.0 * ((t - (2.0 * (Math.pow(l, 2.0) / Om))) * (n * U))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 4.8e-70: tmp = math.sqrt((2.0 * ((t - (2.0 * (math.pow(l, 2.0) / Om))) * (n * U)))) else: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 4.8e-70) tmp = sqrt(Float64(2.0 * Float64(Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))) * Float64(n * U)))); else tmp = sqrt(abs(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 (t <= 4.8e-70) tmp = sqrt((2.0 * ((t - (2.0 * ((l ^ 2.0) / Om))) * (n * U)))); else tmp = sqrt(abs((2.0 * (U * (n * t))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 4.8e-70], N[Sqrt[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]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.8 \cdot 10^{-70}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\end{array}
\end{array}
if t < 4.8000000000000002e-70Initial program 46.3%
Simplified48.2%
Taylor expanded in Om around inf 37.4%
if 4.8000000000000002e-70 < t Initial program 46.9%
Simplified49.5%
Taylor expanded in t around inf 40.7%
associate-*r*40.7%
Simplified40.7%
add-sqr-sqrt40.7%
pow1/240.7%
pow1/247.2%
pow-prod-down35.6%
pow235.6%
associate-*l*35.6%
Applied egg-rr35.6%
unpow1/235.6%
unpow235.6%
rem-sqrt-square47.9%
Simplified47.9%
Final simplification40.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 9.4e+30) (pow (* t (* 2.0 (* n U))) 0.5) (pow (* -4.0 (* (/ U Om) (* n (pow l 2.0)))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 9.4e+30) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = pow((-4.0 * ((U / Om) * (n * pow(l, 2.0)))), 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 <= 9.4d+30) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else
tmp = ((-4.0d0) * ((u / om) * (n * (l ** 2.0d0)))) ** 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 <= 9.4e+30) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = Math.pow((-4.0 * ((U / Om) * (n * Math.pow(l, 2.0)))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 9.4e+30: tmp = math.pow((t * (2.0 * (n * U))), 0.5) else: tmp = math.pow((-4.0 * ((U / Om) * (n * math.pow(l, 2.0)))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 9.4e+30) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = Float64(-4.0 * Float64(Float64(U / Om) * Float64(n * (l ^ 2.0)))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 9.4e+30) tmp = (t * (2.0 * (n * U))) ^ 0.5; else tmp = (-4.0 * ((U / Om) * (n * (l ^ 2.0)))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 9.4e+30], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U / Om), $MachinePrecision] * N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 9.4 \cdot 10^{+30}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \left(\frac{U}{Om} \cdot \left(n \cdot {\ell}^{2}\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 9.39999999999999979e30Initial program 52.4%
Simplified50.9%
Taylor expanded in t around inf 37.9%
associate-*r*39.7%
*-commutative39.7%
Simplified39.7%
pow1/241.2%
associate-*r*41.2%
Applied egg-rr41.2%
if 9.39999999999999979e30 < l Initial program 21.9%
Simplified31.7%
Taylor expanded in Om around inf 20.2%
*-commutative20.2%
associate-*l/20.2%
associate-*r/20.2%
Simplified20.2%
Taylor expanded in t around 0 19.6%
associate-/l*19.6%
*-commutative19.6%
Simplified19.6%
pow1/236.3%
associate-*r*36.3%
metadata-eval36.3%
associate-/r/34.1%
Applied egg-rr34.1%
Final simplification39.9%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.5e-80) (pow (* t (* 2.0 (* n U))) 0.5) (sqrt (fabs (* 2.0 (* U (* n t)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-80) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = sqrt(fabs((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 <= 1.5d-80) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else
tmp = sqrt(abs((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 <= 1.5e-80) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e-80: tmp = math.pow((t * (2.0 * (n * U))), 0.5) else: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e-80) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = sqrt(abs(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 <= 1.5e-80) tmp = (t * (2.0 * (n * U))) ^ 0.5; else tmp = sqrt(abs((2.0 * (U * (n * t))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e-80], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{-80}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\end{array}
\end{array}
if l < 1.50000000000000004e-80Initial program 51.7%
Simplified50.1%
Taylor expanded in t around inf 38.2%
associate-*r*40.2%
*-commutative40.2%
Simplified40.2%
pow1/242.0%
associate-*r*42.0%
Applied egg-rr42.0%
if 1.50000000000000004e-80 < l Initial program 33.9%
Simplified31.6%
Taylor expanded in t around inf 18.8%
associate-*r*18.8%
Simplified18.8%
add-sqr-sqrt18.8%
pow1/218.8%
pow1/225.7%
pow-prod-down21.7%
pow221.7%
associate-*l*21.7%
Applied egg-rr21.7%
unpow1/221.7%
unpow221.7%
rem-sqrt-square27.0%
Simplified27.0%
Final simplification37.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U 1.5e-308) (sqrt (fabs (* 2.0 (* U (* n t))))) (* (sqrt (* n t)) (sqrt (* 2.0 U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.5e-308) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else {
tmp = sqrt((n * t)) * sqrt((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 (u <= 1.5d-308) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else
tmp = sqrt((n * t)) * sqrt((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 (U <= 1.5e-308) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else {
tmp = Math.sqrt((n * t)) * Math.sqrt((2.0 * U));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 1.5e-308: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) else: tmp = math.sqrt((n * t)) * math.sqrt((2.0 * U)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 1.5e-308) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); else tmp = Float64(sqrt(Float64(n * t)) * sqrt(Float64(2.0 * U))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 1.5e-308) tmp = sqrt(abs((2.0 * (U * (n * t))))); else tmp = sqrt((n * t)) * sqrt((2.0 * U)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 1.5e-308], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.5 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\
\end{array}
\end{array}
if U < 1.4999999999999999e-308Initial program 46.5%
Simplified49.9%
Taylor expanded in t around inf 34.1%
associate-*r*34.1%
Simplified34.1%
add-sqr-sqrt34.1%
pow1/234.1%
pow1/238.0%
pow-prod-down27.3%
pow227.3%
associate-*l*27.3%
Applied egg-rr27.3%
unpow1/227.3%
unpow227.3%
rem-sqrt-square38.7%
Simplified38.7%
if 1.4999999999999999e-308 < U Initial program 46.6%
Simplified46.0%
Taylor expanded in t around inf 31.0%
associate-*r*31.0%
Simplified31.0%
pow1/232.8%
*-commutative32.8%
unpow-prod-down40.9%
pow1/240.0%
pow1/240.0%
Applied egg-rr40.0%
Final simplification39.3%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U* 1.04e-171) (pow (* 2.0 (* U (* n t))) 0.5) (sqrt (* 2.0 (* n (* U t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 1.04e-171) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = sqrt((2.0 * (n * (U * 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 (u_42 <= 1.04d-171) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (n * (u * 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 (U_42_ <= 1.04e-171) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 1.04e-171: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.sqrt((2.0 * (n * (U * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 1.04e-171) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= 1.04e-171) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = sqrt((2.0 * (n * (U * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, 1.04e-171], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 1.04 \cdot 10^{-171}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if U* < 1.0399999999999999e-171Initial program 46.5%
Simplified47.0%
Taylor expanded in t around inf 37.4%
associate-*r*37.4%
Simplified37.4%
pow1/240.8%
associate-*l*40.8%
Applied egg-rr40.8%
if 1.0399999999999999e-171 < U* Initial program 46.5%
associate-/l*50.1%
add-sqr-sqrt20.6%
*-un-lft-identity20.6%
times-frac20.6%
Applied egg-rr20.6%
/-rgt-identity20.6%
associate-*r/20.6%
rem-square-sqrt50.1%
Simplified50.1%
Taylor expanded in t around inf 25.8%
associate-*r*31.1%
*-commutative31.1%
associate-*r*33.0%
Simplified33.0%
Final simplification37.5%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.5e-82) (pow (* t (* 2.0 (* n U))) 0.5) (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 <= 4.5e-82) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} 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 <= 4.5d-82) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
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 <= 4.5e-82) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} 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 <= 4.5e-82: tmp = math.pow((t * (2.0 * (n * U))), 0.5) 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 <= 4.5e-82) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = Float64(2.0 * Float64(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 <= 4.5e-82) tmp = (t * (2.0 * (n * U))) ^ 0.5; 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, 4.5e-82], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.5 \cdot 10^{-82}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 4.4999999999999998e-82Initial program 51.7%
Simplified50.1%
Taylor expanded in t around inf 38.2%
associate-*r*40.2%
*-commutative40.2%
Simplified40.2%
pow1/242.0%
associate-*r*42.0%
Applied egg-rr42.0%
if 4.4999999999999998e-82 < l Initial program 33.9%
Simplified31.6%
Taylor expanded in t around inf 18.8%
associate-*r*18.8%
Simplified18.8%
pow1/225.7%
associate-*l*25.7%
Applied egg-rr25.7%
Final simplification37.3%
(FPCore (n U t l Om U*) :precision binary64 (if (<= Om -1.02e+158) (sqrt (* 2.0 (* n (* U t)))) (sqrt (* 2.0 (* t (* n U))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -1.02e+158) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = sqrt((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 (om <= (-1.02d+158)) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = sqrt((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 (Om <= -1.02e+158) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = Math.sqrt((2.0 * (t * (n * U))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -1.02e+158: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = math.sqrt((2.0 * (t * (n * U)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -1.02e+158) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = sqrt(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 (Om <= -1.02e+158) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = sqrt((2.0 * (t * (n * U)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -1.02e+158], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.02 \cdot 10^{+158}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\end{array}
\end{array}
if Om < -1.02e158Initial program 45.5%
associate-/l*55.9%
add-sqr-sqrt27.6%
*-un-lft-identity27.6%
times-frac27.5%
Applied egg-rr27.5%
/-rgt-identity27.5%
associate-*r/27.6%
rem-square-sqrt55.9%
Simplified55.9%
Taylor expanded in t around inf 45.4%
associate-*r*40.1%
*-commutative40.1%
associate-*r*53.2%
Simplified53.2%
if -1.02e158 < Om Initial program 46.7%
Simplified47.3%
Taylor expanded in t around inf 30.4%
associate-*r*32.1%
*-commutative32.1%
Simplified32.1%
Final simplification35.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U* 2.42e-169) (sqrt (* (* n t) (* 2.0 U))) (sqrt (* 2.0 (* n (* U t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 2.42e-169) {
tmp = sqrt(((n * t) * (2.0 * U)));
} else {
tmp = sqrt((2.0 * (n * (U * 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 (u_42 <= 2.42d-169) then
tmp = sqrt(((n * t) * (2.0d0 * u)))
else
tmp = sqrt((2.0d0 * (n * (u * 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 (U_42_ <= 2.42e-169) {
tmp = Math.sqrt(((n * t) * (2.0 * U)));
} else {
tmp = Math.sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 2.42e-169: tmp = math.sqrt(((n * t) * (2.0 * U))) else: tmp = math.sqrt((2.0 * (n * (U * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 2.42e-169) tmp = sqrt(Float64(Float64(n * t) * Float64(2.0 * U))); else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= 2.42e-169) tmp = sqrt(((n * t) * (2.0 * U))); else tmp = sqrt((2.0 * (n * (U * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, 2.42e-169], N[Sqrt[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 2.42 \cdot 10^{-169}:\\
\;\;\;\;\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if U* < 2.42000000000000005e-169Initial program 46.5%
Simplified47.0%
Taylor expanded in t around inf 37.4%
associate-*r*37.4%
Simplified37.4%
if 2.42000000000000005e-169 < U* Initial program 46.5%
associate-/l*50.1%
add-sqr-sqrt20.6%
*-un-lft-identity20.6%
times-frac20.6%
Applied egg-rr20.6%
/-rgt-identity20.6%
associate-*r/20.6%
rem-square-sqrt50.1%
Simplified50.1%
Taylor expanded in t around inf 25.8%
associate-*r*31.1%
*-commutative31.1%
associate-*r*33.0%
Simplified33.0%
Final simplification35.6%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (n * (U * 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 * (n * (u * 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 * (n * (U * t))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (n * (U * t))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * t)))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (n * (U * t)))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 46.5%
associate-/l*51.8%
add-sqr-sqrt23.0%
*-un-lft-identity23.0%
times-frac23.0%
Applied egg-rr23.0%
/-rgt-identity23.0%
associate-*r/23.0%
rem-square-sqrt51.8%
Simplified51.8%
Taylor expanded in t around inf 32.6%
associate-*r*33.2%
*-commutative33.2%
associate-*r*31.7%
Simplified31.7%
Final simplification31.7%
herbie shell --seed 2023311
(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*))))))