
(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 15 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 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_1))))
(t_3 (* 2.0 (* l (/ l Om)))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (* 2.0 (/ (pow l 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 t_3))))
(sqrt (fabs (* 2.0 (* n (* U (- t t_3))))))))))
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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double t_3 = 2.0 * (l * (l / Om));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * (pow(l, 2.0) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - t_3))));
} else {
tmp = sqrt(fabs((2.0 * (n * (U * (t - t_3))))));
}
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 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double t_3 = 2.0 * (l * (l / Om));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - (2.0 * (Math.pow(l, 2.0) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - t_3))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * (n * (U * (t - t_3))))));
}
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 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1))) t_3 = 2.0 * (l * (l / Om)) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - (2.0 * (math.pow(l, 2.0) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - t_3)))) else: tmp = math.sqrt(math.fabs((2.0 * (n * (U * (t - t_3)))))) 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 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1))) t_3 = Float64(2.0 * Float64(l * Float64(l / Om))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - t_3)))); else tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * Float64(t - t_3)))))); 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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1))); t_3 = 2.0 * (l * (l / Om)); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t - (2.0 * ((l ^ 2.0) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - t_3)))); else tmp = sqrt(abs((2.0 * (n * (U * (t - t_3)))))); 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[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$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * N[(t - t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $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 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1\right)}\\
t_3 := 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - t\_3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot \left(t - t\_3\right)\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.0%
Simplified33.3%
sqrt-prod45.5%
fma-undefine45.5%
associate-*r*45.5%
+-commutative45.5%
*-commutative45.5%
fma-define45.5%
associate-*r/45.5%
pow245.5%
Applied egg-rr45.5%
*-commutative45.5%
associate-*r/45.5%
Simplified45.5%
Taylor expanded in n around 0 45.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 68.1%
Simplified73.7%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified14.1%
Taylor expanded in n around 0 2.0%
associate-*r*1.8%
associate-*r/1.8%
Simplified1.8%
add-sqr-sqrt1.8%
pow1/21.8%
pow1/226.8%
pow-prod-down26.6%
pow226.6%
associate-*r*26.6%
*-commutative26.6%
associate-/l*26.6%
Applied egg-rr26.6%
unpow1/226.6%
unpow226.6%
rem-sqrt-square27.5%
associate-*l*27.5%
associate-*l*28.6%
Simplified28.6%
unpow228.6%
*-un-lft-identity28.6%
times-frac41.7%
Applied egg-rr41.7%
Final simplification65.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_1))))
(t_3 (* 2.0 (* l (/ l Om)))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 t_3))))
(sqrt (fabs (* 2.0 (* n (* U (- t t_3))))))))))
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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double t_3 = 2.0 * (l * (l / Om));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - t_3))));
} else {
tmp = sqrt(fabs((2.0 * (n * (U * (t - t_3))))));
}
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 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double t_3 = 2.0 * (l * (l / Om));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - t_3))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * (n * (U * (t - t_3))))));
}
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 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1))) t_3 = 2.0 * (l * (l / Om)) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - t_3)))) else: tmp = math.sqrt(math.fabs((2.0 * (n * (U * (t - t_3)))))) 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 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1))) t_3 = Float64(2.0 * Float64(l * Float64(l / Om))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - t_3)))); else tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * Float64(t - t_3)))))); 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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_1))); t_3 = 2.0 * (l * (l / Om)); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - t_3)))); else tmp = sqrt(abs((2.0 * (n * (U * (t - t_3)))))); 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[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$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * N[(t - t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $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 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1\right)}\\
t_3 := 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - t\_3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot \left(t - t\_3\right)\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.0%
Simplified33.3%
Taylor expanded in t around inf 31.0%
pow1/231.0%
associate-*r*31.0%
unpow-prod-down34.5%
pow1/234.5%
Applied egg-rr34.5%
unpow1/234.5%
Simplified34.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 68.1%
Simplified73.7%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified14.1%
Taylor expanded in n around 0 2.0%
associate-*r*1.8%
associate-*r/1.8%
Simplified1.8%
add-sqr-sqrt1.8%
pow1/21.8%
pow1/226.8%
pow-prod-down26.6%
pow226.6%
associate-*r*26.6%
*-commutative26.6%
associate-/l*26.6%
Applied egg-rr26.6%
unpow1/226.6%
unpow226.6%
rem-sqrt-square27.5%
associate-*l*27.5%
associate-*l*28.6%
Simplified28.6%
unpow228.6%
*-un-lft-identity28.6%
times-frac41.7%
Applied egg-rr41.7%
Final simplification64.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* l (/ l Om))))
(t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_3 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_2))))
(if (<= t_3 0.0)
(sqrt (fabs (* 2.0 (* n (* U (- t t_1))))))
(if (<= t_3 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_2 t_1))))
(sqrt (fabs (* 2.0 (/ (* -2.0 (* n (* U (pow l 2.0)))) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (l * (l / Om));
double t_2 = (n * pow((l / Om), 2.0)) * (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(fabs((2.0 * (n * (U * (t - t_1))))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = sqrt(fabs((2.0 * ((-2.0 * (n * (U * pow(l, 2.0)))) / Om))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (l * (l / Om));
double t_2 = (n * Math.pow((l / Om), 2.0)) * (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(Math.abs((2.0 * (n * (U * (t - t_1))))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * ((-2.0 * (n * (U * Math.pow(l, 2.0)))) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (l * (l / Om)) t_2 = (n * math.pow((l / Om), 2.0)) * (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(math.fabs((2.0 * (n * (U * (t - t_1)))))) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))) else: tmp = math.sqrt(math.fabs((2.0 * ((-2.0 * (n * (U * math.pow(l, 2.0)))) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(l * Float64(l / Om))) t_2 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * 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 = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * Float64(t - t_1)))))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_2 - t_1)))); else tmp = sqrt(abs(Float64(2.0 * Float64(Float64(-2.0 * Float64(n * Float64(U * (l ^ 2.0)))) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (l * (l / Om)); t_2 = (n * ((l / Om) ^ 2.0)) * (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(abs((2.0 * (n * (U * (t - t_1)))))); elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_2 - t_1)))); else tmp = sqrt(abs((2.0 * ((-2.0 * (n * (U * (l ^ 2.0)))) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $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[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * N[(t - t$95$1), $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 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(N[(-2.0 * N[(n * N[(U * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
t_2 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\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{\left|2 \cdot \left(n \cdot \left(U \cdot \left(t - t\_1\right)\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 - t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \frac{-2 \cdot \left(n \cdot \left(U \cdot {\ell}^{2}\right)\right)}{Om}\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 12.2%
Simplified32.6%
Taylor expanded in n around 0 27.0%
associate-*r*13.1%
associate-*r/13.1%
Simplified13.1%
add-sqr-sqrt13.1%
pow1/213.1%
pow1/213.4%
pow-prod-down13.2%
pow213.2%
associate-*r*13.2%
*-commutative13.2%
associate-/l*13.2%
Applied egg-rr13.2%
unpow1/213.2%
unpow213.2%
rem-sqrt-square14.1%
associate-*l*14.1%
associate-*l*28.8%
Simplified28.8%
unpow228.8%
*-un-lft-identity28.8%
times-frac34.0%
Applied egg-rr34.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 68.1%
Simplified73.7%
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%
Simplified10.4%
Taylor expanded in n around 0 2.3%
associate-*r*1.1%
associate-*r/1.1%
Simplified1.1%
add-sqr-sqrt1.1%
pow1/21.1%
pow1/231.5%
pow-prod-down31.5%
pow231.5%
associate-*r*31.5%
*-commutative31.5%
associate-/l*31.5%
Applied egg-rr31.5%
unpow1/231.5%
unpow231.5%
rem-sqrt-square31.5%
associate-*l*31.5%
associate-*l*33.0%
Simplified33.0%
Taylor expanded in t around 0 45.0%
associate-*r/45.0%
associate-*r*45.0%
Simplified45.0%
Final simplification64.6%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -1e-310)
(sqrt (* 2.0 (* (* n U) (- t (/ (* 2.0 (pow l 2.0)) Om)))))
(if (or (<= n 1.06e-153) (not (<= n 5.8e+121)))
(* (sqrt (* 2.0 n)) (sqrt (* U t)))
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l 2.0) Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -1e-310) {
tmp = sqrt((2.0 * ((n * U) * (t - ((2.0 * pow(l, 2.0)) / Om)))));
} else if ((n <= 1.06e-153) || !(n <= 5.8e+121)) {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
} else {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l, 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 (n <= (-1d-310)) then
tmp = sqrt((2.0d0 * ((n * u) * (t - ((2.0d0 * (l ** 2.0d0)) / om)))))
else if ((n <= 1.06d-153) .or. (.not. (n <= 5.8d+121))) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
else
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * ((l ** 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 (n <= -1e-310) {
tmp = Math.sqrt((2.0 * ((n * U) * (t - ((2.0 * Math.pow(l, 2.0)) / Om)))));
} else if ((n <= 1.06e-153) || !(n <= 5.8e+121)) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l, 2.0) / Om))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= -1e-310: tmp = math.sqrt((2.0 * ((n * U) * (t - ((2.0 * math.pow(l, 2.0)) / Om))))) elif (n <= 1.06e-153) or not (n <= 5.8e+121): tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) else: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l, 2.0) / Om)))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -1e-310) tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t - Float64(Float64(2.0 * (l ^ 2.0)) / Om))))); elseif ((n <= 1.06e-153) || !(n <= 5.8e+121)) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om)))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -1e-310) tmp = sqrt((2.0 * ((n * U) * (t - ((2.0 * (l ^ 2.0)) / Om))))); elseif ((n <= 1.06e-153) || ~((n <= 5.8e+121))) tmp = sqrt((2.0 * n)) * sqrt((U * t)); else tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l ^ 2.0) / Om)))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -1e-310], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t - N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[n, 1.06e-153], N[Not[LessEqual[n, 5.8e+121]], $MachinePrecision]], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;n \leq 1.06 \cdot 10^{-153} \lor \neg \left(n \leq 5.8 \cdot 10^{+121}\right):\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\\
\end{array}
\end{array}
if n < -9.999999999999969e-311Initial program 56.6%
Simplified54.7%
Taylor expanded in n around 0 46.0%
associate-*r*48.9%
associate-*r/48.9%
Simplified48.9%
if -9.999999999999969e-311 < n < 1.06e-153 or 5.7999999999999998e121 < n Initial program 43.9%
Simplified46.2%
sqrt-prod72.3%
fma-undefine72.3%
associate-*r*72.4%
+-commutative72.4%
*-commutative72.4%
fma-define72.4%
associate-*r/68.4%
pow268.4%
Applied egg-rr68.4%
*-commutative68.4%
associate-*r/68.4%
Simplified68.4%
Taylor expanded in t around inf 60.5%
if 1.06e-153 < n < 5.7999999999999998e121Initial program 52.5%
Simplified62.0%
associate-*r*62.1%
sub-neg62.1%
distribute-lft-in51.8%
Applied egg-rr51.8%
*-commutative51.8%
associate-*r*51.7%
unpow251.7%
times-frac41.2%
unpow241.2%
unpow241.2%
*-commutative41.2%
associate-*r*41.2%
unpow241.2%
times-frac41.2%
unpow241.2%
unpow241.2%
distribute-rgt-out49.8%
unpow249.8%
unpow249.8%
times-frac60.3%
unpow260.3%
distribute-rgt-in62.0%
sub-neg62.0%
Simplified62.0%
Taylor expanded in n around 0 49.3%
Final simplification52.3%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n 1.6e-307)
(sqrt (* 2.0 (* (* n U) (- t (/ (* 2.0 (pow l 2.0)) Om)))))
(if (or (<= n 1.05e-165) (not (<= n 2.7e+107)))
(* (sqrt (* 2.0 n)) (sqrt (* U t)))
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 1.6e-307) {
tmp = sqrt((2.0 * ((n * U) * (t - ((2.0 * pow(l, 2.0)) / Om)))));
} else if ((n <= 1.05e-165) || !(n <= 2.7e+107)) {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
} else {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 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 (n <= 1.6d-307) then
tmp = sqrt((2.0d0 * ((n * u) * (t - ((2.0d0 * (l ** 2.0d0)) / om)))))
else if ((n <= 1.05d-165) .or. (.not. (n <= 2.7d+107))) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
else
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 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 (n <= 1.6e-307) {
tmp = Math.sqrt((2.0 * ((n * U) * (t - ((2.0 * Math.pow(l, 2.0)) / Om)))));
} else if ((n <= 1.05e-165) || !(n <= 2.7e+107)) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= 1.6e-307: tmp = math.sqrt((2.0 * ((n * U) * (t - ((2.0 * math.pow(l, 2.0)) / Om))))) elif (n <= 1.05e-165) or not (n <= 2.7e+107): tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) else: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 1.6e-307) tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t - Float64(Float64(2.0 * (l ^ 2.0)) / Om))))); elseif ((n <= 1.05e-165) || !(n <= 2.7e+107)) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= 1.6e-307) tmp = sqrt((2.0 * ((n * U) * (t - ((2.0 * (l ^ 2.0)) / Om))))); elseif ((n <= 1.05e-165) || ~((n <= 2.7e+107))) tmp = sqrt((2.0 * n)) * sqrt((U * t)); else tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 1.6e-307], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t - N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[n, 1.05e-165], N[Not[LessEqual[n, 2.7e+107]], $MachinePrecision]], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 1.6 \cdot 10^{-307}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;n \leq 1.05 \cdot 10^{-165} \lor \neg \left(n \leq 2.7 \cdot 10^{+107}\right):\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if n < 1.60000000000000005e-307Initial program 56.6%
Simplified54.7%
Taylor expanded in n around 0 46.0%
associate-*r*48.9%
associate-*r/48.9%
Simplified48.9%
if 1.60000000000000005e-307 < n < 1.04999999999999997e-165 or 2.7000000000000001e107 < n Initial program 48.1%
Simplified50.2%
sqrt-prod75.0%
fma-undefine75.0%
associate-*r*75.0%
+-commutative75.0%
*-commutative75.0%
fma-define75.0%
associate-*r/72.5%
pow272.5%
Applied egg-rr72.5%
*-commutative72.5%
associate-*r/72.5%
Simplified72.5%
Taylor expanded in t around inf 63.7%
if 1.04999999999999997e-165 < n < 2.7000000000000001e107Initial program 47.3%
Simplified57.6%
Taylor expanded in n around 0 43.4%
Final simplification52.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U))))
(if (<= t -0.026)
(sqrt (fabs (* 2.0 (* n (* U t)))))
(if (<= t 1.35e+75)
(pow (* (- t (* 2.0 (/ (pow l 2.0) Om))) t_1) 0.5)
(* (sqrt t_1) (sqrt t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (t <= -0.026) {
tmp = sqrt(fabs((2.0 * (n * (U * t)))));
} else if (t <= 1.35e+75) {
tmp = pow(((t - (2.0 * (pow(l, 2.0) / Om))) * t_1), 0.5);
} else {
tmp = sqrt(t_1) * sqrt(t);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
if (t <= (-0.026d0)) then
tmp = sqrt(abs((2.0d0 * (n * (u * t)))))
else if (t <= 1.35d+75) then
tmp = ((t - (2.0d0 * ((l ** 2.0d0) / om))) * t_1) ** 0.5d0
else
tmp = sqrt(t_1) * sqrt(t)
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (t <= -0.026) {
tmp = Math.sqrt(Math.abs((2.0 * (n * (U * t)))));
} else if (t <= 1.35e+75) {
tmp = Math.pow(((t - (2.0 * (Math.pow(l, 2.0) / Om))) * t_1), 0.5);
} else {
tmp = Math.sqrt(t_1) * Math.sqrt(t);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) tmp = 0 if t <= -0.026: tmp = math.sqrt(math.fabs((2.0 * (n * (U * t))))) elif t <= 1.35e+75: tmp = math.pow(((t - (2.0 * (math.pow(l, 2.0) / Om))) * t_1), 0.5) else: tmp = math.sqrt(t_1) * math.sqrt(t) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if (t <= -0.026) tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * t))))); elseif (t <= 1.35e+75) tmp = Float64(Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))) * t_1) ^ 0.5; else tmp = Float64(sqrt(t_1) * sqrt(t)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * U); tmp = 0.0; if (t <= -0.026) tmp = sqrt(abs((2.0 * (n * (U * t))))); elseif (t <= 1.35e+75) tmp = ((t - (2.0 * ((l ^ 2.0) / Om))) * t_1) ^ 0.5; else tmp = sqrt(t_1) * sqrt(t); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.026], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.35e+75], N[Power[N[(N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[t$95$1], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;t \leq -0.026:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right|}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+75}:\\
\;\;\;\;{\left(\left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot t\_1\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < -0.0259999999999999988Initial program 46.3%
Simplified54.9%
Taylor expanded in n around 0 46.0%
associate-*r*43.4%
associate-*r/43.4%
Simplified43.4%
add-sqr-sqrt43.4%
pow1/243.4%
pow1/243.6%
pow-prod-down29.1%
pow229.1%
associate-*r*29.1%
*-commutative29.1%
associate-/l*29.1%
Applied egg-rr29.1%
unpow1/229.1%
unpow229.1%
rem-sqrt-square43.9%
associate-*l*43.9%
associate-*l*46.6%
Simplified46.6%
Taylor expanded in t around inf 49.6%
associate-*r*47.2%
*-commutative47.2%
associate-*r*51.2%
Simplified51.2%
if -0.0259999999999999988 < t < 1.34999999999999999e75Initial program 52.1%
Simplified54.2%
Taylor expanded in n around 0 39.4%
associate-*r*43.6%
associate-*r/43.6%
Simplified43.6%
pow1/251.2%
associate-*r*51.2%
*-commutative51.2%
associate-/l*51.2%
Applied egg-rr51.2%
if 1.34999999999999999e75 < t Initial program 60.0%
Simplified52.1%
associate-*r*54.1%
sub-neg54.1%
distribute-lft-in47.4%
Applied egg-rr47.4%
*-commutative47.4%
associate-*r*47.2%
unpow247.2%
times-frac38.4%
unpow238.4%
unpow238.4%
*-commutative38.4%
associate-*r*35.8%
unpow235.8%
times-frac35.8%
unpow235.8%
unpow235.8%
distribute-rgt-out40.5%
unpow240.5%
unpow240.5%
times-frac49.2%
unpow249.2%
distribute-rgt-in51.4%
sub-neg51.4%
Simplified51.4%
Taylor expanded in t around inf 46.6%
associate-*r*52.6%
associate-*r*52.6%
sqrt-prod70.9%
Applied egg-rr70.9%
Final simplification54.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= t -8.5e-265)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(if (<= t 1.55e-195)
(* (sqrt (* U U*)) (* (* n l) (/ (sqrt 2.0) (- Om))))
(* (sqrt (* 2.0 (* n U))) (sqrt t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -8.5e-265) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else if (t <= 1.55e-195) {
tmp = sqrt((U * U_42_)) * ((n * l) * (sqrt(2.0) / -Om));
} else {
tmp = sqrt((2.0 * (n * U))) * sqrt(t);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-8.5d-265)) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
else if (t <= 1.55d-195) then
tmp = sqrt((u * u_42)) * ((n * l) * (sqrt(2.0d0) / -om))
else
tmp = sqrt((2.0d0 * (n * u))) * sqrt(t)
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -8.5e-265) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else if (t <= 1.55e-195) {
tmp = Math.sqrt((U * U_42_)) * ((n * l) * (Math.sqrt(2.0) / -Om));
} else {
tmp = Math.sqrt((2.0 * (n * U))) * Math.sqrt(t);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -8.5e-265: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) elif t <= 1.55e-195: tmp = math.sqrt((U * U_42_)) * ((n * l) * (math.sqrt(2.0) / -Om)) else: tmp = math.sqrt((2.0 * (n * U))) * math.sqrt(t) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -8.5e-265) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); elseif (t <= 1.55e-195) tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(Float64(n * l) * Float64(sqrt(2.0) / Float64(-Om)))); else tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(t)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -8.5e-265) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); elseif (t <= 1.55e-195) tmp = sqrt((U * U_42_)) * ((n * l) * (sqrt(2.0) / -Om)); else tmp = sqrt((2.0 * (n * U))) * sqrt(t); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -8.5e-265], 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, 1.55e-195], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(N[(n * l), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{-265}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-195}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \left(\left(n \cdot \ell\right) \cdot \frac{\sqrt{2}}{-Om}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < -8.4999999999999997e-265Initial program 49.2%
Simplified53.1%
Taylor expanded in n around 0 42.5%
if -8.4999999999999997e-265 < t < 1.55000000000000001e-195Initial program 33.0%
Simplified36.9%
associate-*r*36.9%
sub-neg36.9%
distribute-lft-in25.2%
Applied egg-rr25.2%
*-commutative25.2%
associate-*r*21.4%
unpow221.4%
times-frac17.1%
unpow217.1%
unpow217.1%
*-commutative17.1%
associate-*r*17.1%
unpow217.1%
times-frac17.1%
unpow217.1%
unpow217.1%
distribute-rgt-out25.0%
unpow225.0%
unpow225.0%
times-frac29.2%
unpow229.2%
distribute-rgt-in36.9%
sub-neg36.9%
Simplified36.9%
Taylor expanded in U* around inf 31.2%
associate-/l*31.3%
associate-/l*33.1%
associate-/l*33.1%
Simplified33.1%
Taylor expanded in n around -inf 20.5%
mul-1-neg20.5%
associate-/l*16.9%
associate-*r/16.9%
*-commutative16.9%
distribute-rgt-neg-in16.9%
associate-*r/16.9%
associate-/l*20.5%
distribute-frac-neg220.5%
associate-*r*20.6%
associate-/l*20.6%
*-commutative20.6%
Simplified20.6%
if 1.55000000000000001e-195 < t Initial program 59.5%
Simplified59.0%
associate-*r*59.8%
sub-neg59.8%
distribute-lft-in52.4%
Applied egg-rr52.4%
*-commutative52.4%
associate-*r*52.2%
unpow252.2%
times-frac43.0%
unpow243.0%
unpow243.0%
*-commutative43.0%
associate-*r*41.0%
unpow241.0%
times-frac41.0%
unpow241.0%
unpow241.0%
distribute-rgt-out45.8%
unpow245.8%
unpow245.8%
times-frac55.0%
unpow255.0%
distribute-rgt-in57.7%
sub-neg57.7%
Simplified57.7%
Taylor expanded in t around inf 42.1%
associate-*r*46.9%
associate-*r*46.9%
sqrt-prod57.3%
Applied egg-rr57.3%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= t -8.8e-250)
(sqrt (fabs (* 2.0 (* n (* U t)))))
(if (<= t 1.45e-195)
(* (sqrt (* U U*)) (* (* n l) (/ (sqrt 2.0) (- Om))))
(* (sqrt (* 2.0 (* n U))) (sqrt t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -8.8e-250) {
tmp = sqrt(fabs((2.0 * (n * (U * t)))));
} else if (t <= 1.45e-195) {
tmp = sqrt((U * U_42_)) * ((n * l) * (sqrt(2.0) / -Om));
} else {
tmp = sqrt((2.0 * (n * U))) * sqrt(t);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-8.8d-250)) then
tmp = sqrt(abs((2.0d0 * (n * (u * t)))))
else if (t <= 1.45d-195) then
tmp = sqrt((u * u_42)) * ((n * l) * (sqrt(2.0d0) / -om))
else
tmp = sqrt((2.0d0 * (n * u))) * sqrt(t)
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -8.8e-250) {
tmp = Math.sqrt(Math.abs((2.0 * (n * (U * t)))));
} else if (t <= 1.45e-195) {
tmp = Math.sqrt((U * U_42_)) * ((n * l) * (Math.sqrt(2.0) / -Om));
} else {
tmp = Math.sqrt((2.0 * (n * U))) * Math.sqrt(t);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -8.8e-250: tmp = math.sqrt(math.fabs((2.0 * (n * (U * t))))) elif t <= 1.45e-195: tmp = math.sqrt((U * U_42_)) * ((n * l) * (math.sqrt(2.0) / -Om)) else: tmp = math.sqrt((2.0 * (n * U))) * math.sqrt(t) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -8.8e-250) tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * t))))); elseif (t <= 1.45e-195) tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(Float64(n * l) * Float64(sqrt(2.0) / Float64(-Om)))); else tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(t)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -8.8e-250) tmp = sqrt(abs((2.0 * (n * (U * t))))); elseif (t <= 1.45e-195) tmp = sqrt((U * U_42_)) * ((n * l) * (sqrt(2.0) / -Om)); else tmp = sqrt((2.0 * (n * U))) * sqrt(t); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -8.8e-250], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.45e-195], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(N[(n * l), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.8 \cdot 10^{-250}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right|}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-195}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \left(\left(n \cdot \ell\right) \cdot \frac{\sqrt{2}}{-Om}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < -8.8e-250Initial program 48.6%
Simplified52.7%
Taylor expanded in n around 0 42.4%
associate-*r*42.6%
associate-*r/42.6%
Simplified42.6%
add-sqr-sqrt42.6%
pow1/242.6%
pow1/246.4%
pow-prod-down32.4%
pow232.4%
associate-*r*32.4%
*-commutative32.4%
associate-/l*32.4%
Applied egg-rr32.4%
unpow1/232.4%
unpow232.4%
rem-sqrt-square46.8%
associate-*l*46.8%
associate-*l*46.8%
Simplified46.8%
Taylor expanded in t around inf 41.4%
associate-*r*42.6%
*-commutative42.6%
associate-*r*43.2%
Simplified43.2%
if -8.8e-250 < t < 1.4500000000000001e-195Initial program 38.5%
Simplified41.5%
associate-*r*41.5%
sub-neg41.5%
distribute-lft-in26.2%
Applied egg-rr26.2%
*-commutative26.2%
associate-*r*23.2%
unpow223.2%
times-frac19.8%
unpow219.8%
unpow219.8%
*-commutative19.8%
associate-*r*19.8%
unpow219.8%
times-frac19.8%
unpow219.8%
unpow219.8%
distribute-rgt-out32.0%
unpow232.0%
unpow232.0%
times-frac35.3%
unpow235.3%
distribute-rgt-in41.4%
sub-neg41.4%
Simplified41.4%
Taylor expanded in U* around inf 34.1%
associate-/l*34.2%
associate-/l*35.6%
associate-/l*35.6%
Simplified35.6%
Taylor expanded in n around -inf 25.7%
mul-1-neg25.7%
associate-/l*22.9%
associate-*r/22.9%
*-commutative22.9%
distribute-rgt-neg-in22.9%
associate-*r/22.9%
associate-/l*25.7%
distribute-frac-neg225.7%
associate-*r*25.8%
associate-/l*25.7%
*-commutative25.7%
Simplified25.7%
if 1.4500000000000001e-195 < t Initial program 59.5%
Simplified59.0%
associate-*r*59.8%
sub-neg59.8%
distribute-lft-in52.4%
Applied egg-rr52.4%
*-commutative52.4%
associate-*r*52.2%
unpow252.2%
times-frac43.0%
unpow243.0%
unpow243.0%
*-commutative43.0%
associate-*r*41.0%
unpow241.0%
times-frac41.0%
unpow241.0%
unpow241.0%
distribute-rgt-out45.8%
unpow245.8%
unpow245.8%
times-frac55.0%
unpow255.0%
distribute-rgt-in57.7%
sub-neg57.7%
Simplified57.7%
Taylor expanded in t around inf 42.1%
associate-*r*46.9%
associate-*r*46.9%
sqrt-prod57.3%
Applied egg-rr57.3%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= t -1.15e-250)
(sqrt (fabs (* 2.0 (* n (* U t)))))
(if (<= t 1.56e-195)
(* (sqrt (* U U*)) (* l (* n (/ (sqrt 2.0) (- Om)))))
(* (sqrt (* 2.0 (* n U))) (sqrt t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -1.15e-250) {
tmp = sqrt(fabs((2.0 * (n * (U * t)))));
} else if (t <= 1.56e-195) {
tmp = sqrt((U * U_42_)) * (l * (n * (sqrt(2.0) / -Om)));
} else {
tmp = sqrt((2.0 * (n * U))) * sqrt(t);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-1.15d-250)) then
tmp = sqrt(abs((2.0d0 * (n * (u * t)))))
else if (t <= 1.56d-195) then
tmp = sqrt((u * u_42)) * (l * (n * (sqrt(2.0d0) / -om)))
else
tmp = sqrt((2.0d0 * (n * u))) * sqrt(t)
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -1.15e-250) {
tmp = Math.sqrt(Math.abs((2.0 * (n * (U * t)))));
} else if (t <= 1.56e-195) {
tmp = Math.sqrt((U * U_42_)) * (l * (n * (Math.sqrt(2.0) / -Om)));
} else {
tmp = Math.sqrt((2.0 * (n * U))) * Math.sqrt(t);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -1.15e-250: tmp = math.sqrt(math.fabs((2.0 * (n * (U * t))))) elif t <= 1.56e-195: tmp = math.sqrt((U * U_42_)) * (l * (n * (math.sqrt(2.0) / -Om))) else: tmp = math.sqrt((2.0 * (n * U))) * math.sqrt(t) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -1.15e-250) tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * t))))); elseif (t <= 1.56e-195) tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(l * Float64(n * Float64(sqrt(2.0) / Float64(-Om))))); else tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(t)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -1.15e-250) tmp = sqrt(abs((2.0 * (n * (U * t))))); elseif (t <= 1.56e-195) tmp = sqrt((U * U_42_)) * (l * (n * (sqrt(2.0) / -Om))); else tmp = sqrt((2.0 * (n * U))) * sqrt(t); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -1.15e-250], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.56e-195], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(l * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-250}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right|}\\
\mathbf{elif}\;t \leq 1.56 \cdot 10^{-195}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(n \cdot \frac{\sqrt{2}}{-Om}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < -1.15e-250Initial program 48.6%
Simplified52.7%
Taylor expanded in n around 0 42.4%
associate-*r*42.6%
associate-*r/42.6%
Simplified42.6%
add-sqr-sqrt42.6%
pow1/242.6%
pow1/246.4%
pow-prod-down32.4%
pow232.4%
associate-*r*32.4%
*-commutative32.4%
associate-/l*32.4%
Applied egg-rr32.4%
unpow1/232.4%
unpow232.4%
rem-sqrt-square46.8%
associate-*l*46.8%
associate-*l*46.8%
Simplified46.8%
Taylor expanded in t around inf 41.4%
associate-*r*42.6%
*-commutative42.6%
associate-*r*43.2%
Simplified43.2%
if -1.15e-250 < t < 1.56000000000000006e-195Initial program 38.5%
Simplified41.5%
associate-*r*41.5%
sub-neg41.5%
distribute-lft-in26.2%
Applied egg-rr26.2%
*-commutative26.2%
associate-*r*23.2%
unpow223.2%
times-frac19.8%
unpow219.8%
unpow219.8%
*-commutative19.8%
associate-*r*19.8%
unpow219.8%
times-frac19.8%
unpow219.8%
unpow219.8%
distribute-rgt-out32.0%
unpow232.0%
unpow232.0%
times-frac35.3%
unpow235.3%
distribute-rgt-in41.4%
sub-neg41.4%
Simplified41.4%
Taylor expanded in U* around inf 34.1%
associate-/l*34.2%
associate-/l*35.6%
associate-/l*35.6%
Simplified35.6%
Taylor expanded in n around -inf 25.7%
mul-1-neg25.7%
associate-/l*22.9%
associate-*r/22.9%
*-commutative22.9%
Simplified22.9%
if 1.56000000000000006e-195 < t Initial program 59.5%
Simplified59.0%
associate-*r*59.8%
sub-neg59.8%
distribute-lft-in52.4%
Applied egg-rr52.4%
*-commutative52.4%
associate-*r*52.2%
unpow252.2%
times-frac43.0%
unpow243.0%
unpow243.0%
*-commutative43.0%
associate-*r*41.0%
unpow241.0%
times-frac41.0%
unpow241.0%
unpow241.0%
distribute-rgt-out45.8%
unpow245.8%
unpow245.8%
times-frac55.0%
unpow255.0%
distribute-rgt-in57.7%
sub-neg57.7%
Simplified57.7%
Taylor expanded in t around inf 42.1%
associate-*r*46.9%
associate-*r*46.9%
sqrt-prod57.3%
Applied egg-rr57.3%
Final simplification46.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= n 1e+122) (sqrt (fabs (* 2.0 (* n (* U (- t (* 2.0 (* l (/ l Om))))))))) (* (sqrt (* 2.0 n)) (sqrt (* U t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 1e+122) {
tmp = sqrt(fabs((2.0 * (n * (U * (t - (2.0 * (l * (l / Om)))))))));
} else {
tmp = sqrt((2.0 * n)) * sqrt((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 (n <= 1d+122) then
tmp = sqrt(abs((2.0d0 * (n * (u * (t - (2.0d0 * (l * (l / om)))))))))
else
tmp = sqrt((2.0d0 * n)) * sqrt((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 (n <= 1e+122) {
tmp = Math.sqrt(Math.abs((2.0 * (n * (U * (t - (2.0 * (l * (l / Om)))))))));
} else {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= 1e+122: tmp = math.sqrt(math.fabs((2.0 * (n * (U * (t - (2.0 * (l * (l / Om))))))))) else: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 1e+122) tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))))); else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= 1e+122) tmp = sqrt(abs((2.0 * (n * (U * (t - (2.0 * (l * (l / Om))))))))); else tmp = sqrt((2.0 * n)) * sqrt((U * t)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 1e+122], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 10^{+122}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\end{array}
\end{array}
if n < 1.00000000000000001e122Initial program 53.0%
Simplified55.7%
Taylor expanded in n around 0 44.7%
associate-*r*47.1%
associate-*r/47.1%
Simplified47.1%
add-sqr-sqrt47.1%
pow1/247.1%
pow1/250.9%
pow-prod-down35.2%
pow235.2%
associate-*r*35.2%
*-commutative35.2%
associate-/l*35.2%
Applied egg-rr35.2%
unpow1/235.2%
unpow235.2%
rem-sqrt-square51.4%
associate-*l*51.4%
associate-*l*50.2%
Simplified50.2%
unpow250.2%
*-un-lft-identity50.2%
times-frac55.4%
Applied egg-rr55.4%
if 1.00000000000000001e122 < n Initial program 45.8%
Simplified43.0%
sqrt-prod79.1%
fma-undefine79.1%
associate-*r*79.1%
+-commutative79.1%
*-commutative79.1%
fma-define79.1%
associate-*r/79.1%
pow279.1%
Applied egg-rr79.1%
*-commutative79.1%
associate-*r/79.1%
Simplified79.1%
Taylor expanded in t around inf 67.9%
Final simplification57.1%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -5.5e-169)
(pow (* 2.0 (* t (* n U))) 0.5)
(if (<= n -1e-310)
(sqrt (fabs (* 2.0 (* n (* U t)))))
(* (sqrt (* 2.0 n)) (sqrt (* U t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -5.5e-169) {
tmp = pow((2.0 * (t * (n * U))), 0.5);
} else if (n <= -1e-310) {
tmp = sqrt(fabs((2.0 * (n * (U * t)))));
} else {
tmp = sqrt((2.0 * n)) * sqrt((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 (n <= (-5.5d-169)) then
tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
else if (n <= (-1d-310)) then
tmp = sqrt(abs((2.0d0 * (n * (u * t)))))
else
tmp = sqrt((2.0d0 * n)) * sqrt((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 (n <= -5.5e-169) {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
} else if (n <= -1e-310) {
tmp = Math.sqrt(Math.abs((2.0 * (n * (U * t)))));
} else {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= -5.5e-169: tmp = math.pow((2.0 * (t * (n * U))), 0.5) elif n <= -1e-310: tmp = math.sqrt(math.fabs((2.0 * (n * (U * t))))) else: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -5.5e-169) tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5; elseif (n <= -1e-310) tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * t))))); else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -5.5e-169) tmp = (2.0 * (t * (n * U))) ^ 0.5; elseif (n <= -1e-310) tmp = sqrt(abs((2.0 * (n * (U * t))))); else tmp = sqrt((2.0 * n)) * sqrt((U * t)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -5.5e-169], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[n, -1e-310], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -5.5 \cdot 10^{-169}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;n \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\end{array}
\end{array}
if n < -5.4999999999999994e-169Initial program 59.1%
Simplified53.7%
Taylor expanded in t around inf 40.6%
pow1/242.6%
associate-*r*44.6%
*-commutative44.6%
Applied egg-rr44.6%
if -5.4999999999999994e-169 < n < -9.999999999999969e-311Initial program 47.0%
Simplified58.8%
Taylor expanded in n around 0 33.1%
associate-*r*39.7%
associate-*r/39.7%
Simplified39.7%
add-sqr-sqrt39.7%
pow1/239.7%
pow1/239.7%
pow-prod-down22.5%
pow222.5%
associate-*r*22.5%
*-commutative22.5%
associate-/l*22.5%
Applied egg-rr22.5%
unpow1/222.5%
unpow222.5%
rem-sqrt-square40.9%
associate-*l*40.9%
associate-*l*49.0%
Simplified49.0%
Taylor expanded in t around inf 23.2%
associate-*r*30.2%
*-commutative30.2%
associate-*r*45.6%
Simplified45.6%
if -9.999999999999969e-311 < n Initial program 47.8%
Simplified53.3%
sqrt-prod69.5%
fma-undefine69.5%
associate-*r*69.6%
+-commutative69.6%
*-commutative69.6%
fma-define69.6%
associate-*r/63.0%
pow263.0%
Applied egg-rr63.0%
*-commutative63.0%
associate-*r/63.0%
Simplified63.0%
Taylor expanded in t around inf 50.1%
Final simplification47.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 1.6e-307) (sqrt (fabs (* 2.0 (* n (* U t))))) (* (sqrt (* 2.0 (* n U))) (sqrt t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 1.6e-307) {
tmp = sqrt(fabs((2.0 * (n * (U * t)))));
} else {
tmp = sqrt((2.0 * (n * U))) * sqrt(t);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 1.6d-307) then
tmp = sqrt(abs((2.0d0 * (n * (u * t)))))
else
tmp = sqrt((2.0d0 * (n * u))) * sqrt(t)
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 1.6e-307) {
tmp = Math.sqrt(Math.abs((2.0 * (n * (U * t)))));
} else {
tmp = Math.sqrt((2.0 * (n * U))) * Math.sqrt(t);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 1.6e-307: tmp = math.sqrt(math.fabs((2.0 * (n * (U * t))))) else: tmp = math.sqrt((2.0 * (n * U))) * math.sqrt(t) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 1.6e-307) tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * t))))); else tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(t)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= 1.6e-307) tmp = sqrt(abs((2.0 * (n * (U * t))))); else tmp = sqrt((2.0 * (n * U))) * sqrt(t); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 1.6e-307], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.6 \cdot 10^{-307}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < 1.60000000000000005e-307Initial program 49.3%
Simplified52.9%
Taylor expanded in n around 0 41.5%
associate-*r*42.0%
associate-*r/42.0%
Simplified42.0%
add-sqr-sqrt42.0%
pow1/242.0%
pow1/245.4%
pow-prod-down32.2%
pow232.2%
associate-*r*32.2%
*-commutative32.2%
associate-/l*32.2%
Applied egg-rr32.2%
unpow1/232.2%
unpow232.2%
rem-sqrt-square45.9%
associate-*l*45.9%
associate-*l*45.8%
Simplified45.8%
Taylor expanded in t around inf 37.0%
associate-*r*38.1%
*-commutative38.1%
associate-*r*38.6%
Simplified38.6%
if 1.60000000000000005e-307 < t Initial program 54.7%
Simplified55.0%
associate-*r*55.8%
sub-neg55.8%
distribute-lft-in47.8%
Applied egg-rr47.8%
*-commutative47.8%
associate-*r*46.9%
unpow246.9%
times-frac38.1%
unpow238.1%
unpow238.1%
*-commutative38.1%
associate-*r*36.4%
unpow236.4%
times-frac36.4%
unpow236.4%
unpow236.4%
distribute-rgt-out41.3%
unpow241.3%
unpow241.3%
times-frac50.1%
unpow250.1%
distribute-rgt-in54.0%
sub-neg54.0%
Simplified54.0%
Taylor expanded in t around inf 37.5%
associate-*r*41.6%
associate-*r*41.6%
sqrt-prod51.2%
Applied egg-rr51.2%
(FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* t (* n U))) 0.5))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow((2.0 * (t * (n * U))), 0.5);
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = (2.0d0 * (t * (n * u))) ** 0.5d0
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow((2.0 * (t * (n * U))), 0.5);
}
def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * (t * (n * U))), 0.5)
function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5 end
function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * (t * (n * U))) ^ 0.5; end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
\\
{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}
\end{array}
Initial program 52.0%
Simplified54.0%
Taylor expanded in t around inf 35.6%
pow1/236.7%
associate-*r*41.4%
*-commutative41.4%
Applied egg-rr41.4%
Final simplification41.4%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* t (* n U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (t * (n * U))));
}
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 * (t * (n * u))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (t * (n * U))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (t * (n * U))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(t * Float64(n * U)))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (t * (n * U)))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}
\end{array}
Initial program 52.0%
Simplified54.0%
Taylor expanded in t around inf 35.6%
associate-*r*39.1%
Simplified39.1%
Final simplification39.1%
(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 52.0%
Simplified54.0%
Taylor expanded in t around inf 35.6%
herbie shell --seed 2024108
(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*))))))