
(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 17 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}
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2 (* (* 2.0 n) U))
(t_3 (* n t_1))
(t_4 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_3 (- U* U)))))))
(if (<= t_4 5e-129)
(sqrt
(*
(* 2.0 n)
(* U (- t (- (* t_1 (* n (- U U*))) (* (/ (pow l 2.0) Om) -2.0))))))
(if (<= t_4 INFINITY)
(sqrt (* t_2 (- (- t (* 2.0 (* l (/ l Om)))) (* t_3 (- U U*)))))
(*
(sqrt
(* U (* n (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.0 Om))))))
(* l (sqrt 2.0)))))))l = abs(l);
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 = (2.0 * n) * U;
double t_3 = n * t_1;
double t_4 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U)))));
double tmp;
if (t_4 <= 5e-129) {
tmp = sqrt(((2.0 * n) * (U * (t - ((t_1 * (n * (U - U_42_))) - ((pow(l, 2.0) / Om) * -2.0))))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) - (t_3 * (U - U_42_)))));
} else {
tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0));
}
return tmp;
}
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.pow((l / Om), 2.0);
double t_2 = (2.0 * n) * U;
double t_3 = n * t_1;
double t_4 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U)))));
double tmp;
if (t_4 <= 5e-129) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - ((t_1 * (n * (U - U_42_))) - ((Math.pow(l, 2.0) / Om) * -2.0))))));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) - (t_3 * (U - U_42_)))));
} else {
tmp = Math.sqrt((U * (n * (((n * (U_42_ - U)) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = math.pow((l / Om), 2.0) t_2 = (2.0 * n) * U t_3 = n * t_1 t_4 = math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U))))) tmp = 0 if t_4 <= 5e-129: tmp = math.sqrt(((2.0 * n) * (U * (t - ((t_1 * (n * (U - U_42_))) - ((math.pow(l, 2.0) / Om) * -2.0)))))) elif t_4 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) - (t_3 * (U - U_42_))))) else: tmp = math.sqrt((U * (n * (((n * (U_42_ - U)) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Om) ^ 2.0 t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(n * t_1) t_4 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_3 * Float64(U_42_ - U))))) tmp = 0.0 if (t_4 <= 5e-129) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(t_1 * Float64(n * Float64(U - U_42_))) - Float64(Float64((l ^ 2.0) / Om) * -2.0)))))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(t_3 * Float64(U - U_42_))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l / Om) ^ 2.0; t_2 = (2.0 * n) * U; t_3 = n * t_1; t_4 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U))))); tmp = 0.0; if (t_4 <= 5e-129) tmp = sqrt(((2.0 * n) * (U * (t - ((t_1 * (n * (U - U_42_))) - (((l ^ 2.0) / Om) * -2.0)))))); elseif (t_4 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) - (t_3 * (U - U_42_))))); else tmp = sqrt((U * (n * (((n * (U_42_ - U)) / (Om ^ 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(n * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 5e-129], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(t$95$1 * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := n \cdot t_1\\
t_4 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_3 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_4 \leq 5 \cdot 10^{-129}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(t_1 \cdot \left(n \cdot \left(U - U*\right)\right) - \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_3 \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 5.00000000000000027e-129Initial program 29.4%
Simplified43.6%
associate--l+43.6%
associate-/l*43.6%
associate-*r/43.6%
*-commutative43.6%
associate-*r/43.6%
pow243.6%
associate-*r*51.3%
*-commutative51.3%
associate-*r*51.3%
Applied egg-rr51.3%
if 5.00000000000000027e-129 < (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 73.1%
associate-*l/75.4%
Applied egg-rr75.4%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified8.2%
Taylor expanded in l around inf 41.0%
Final simplification67.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (* n (pow (/ l Om) 2.0)))
(t_3 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U)))))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= t_3 INFINITY)
(sqrt (* t_1 (- (- t (* 2.0 (* l (/ l Om)))) (* t_2 (- U U*)))))
(*
(sqrt
(* U (* n (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.0 Om))))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = n * pow((l / Om), 2.0);
double t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
} else {
tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0));
}
return tmp;
}
l = Math.abs(l);
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 t_2 = n * Math.pow((l / Om), 2.0);
double t_3 = Math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
} else {
tmp = Math.sqrt((U * (n * (((n * (U_42_ - U)) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (2.0 * n) * U t_2 = n * math.pow((l / Om), 2.0) t_3 = math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif t_3 <= math.inf: tmp = math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_))))) else: tmp = math.sqrt((U * (n * (((n * (U_42_ - U)) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = Float64(n * (Float64(l / Om) ^ 2.0)) t_3 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U))))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(t_2 * Float64(U - U_42_))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (2.0 * n) * U; t_2 = n * ((l / Om) ^ 2.0); t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (t_3 <= Inf) tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_))))); else tmp = sqrt((U * (n * (((n * (U_42_ - U)) / (Om ^ 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_2 \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 9.7%
Simplified9.7%
Taylor expanded in t around inf 32.4%
pow1/232.4%
associate-*r*32.4%
unpow-prod-down34.9%
pow1/234.9%
Applied egg-rr34.9%
unpow1/234.9%
Simplified34.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 73.3%
associate-*l/75.5%
Applied egg-rr75.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%
Simplified8.2%
Taylor expanded in l around inf 41.0%
Final simplification66.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (* n (pow (/ l Om) 2.0)))
(t_3 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U)))))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= t_3 INFINITY)
(sqrt (* t_1 (- (- t (* 2.0 (* l (/ l Om)))) (* t_2 (- U U*)))))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (- (/ (* n U*) (pow Om 2.0)) (/ 2.0 Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = n * pow((l / Om), 2.0);
double t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) - (2.0 / Om)))));
}
return tmp;
}
l = Math.abs(l);
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 t_2 = n * Math.pow((l / Om), 2.0);
double t_3 = Math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (2.0 * n) * U t_2 = n * math.pow((l / Om), 2.0) t_3 = math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif t_3 <= math.inf: tmp = math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = Float64(n * (Float64(l / Om) ^ 2.0)) t_3 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U))))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(t_2 * Float64(U - U_42_))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (2.0 * n) * U; t_2 = n * ((l / Om) ^ 2.0); t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (t_3 <= Inf) tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_))))); else tmp = (l * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) - (2.0 / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_2 \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 9.7%
Simplified9.7%
Taylor expanded in t around inf 32.4%
pow1/232.4%
associate-*r*32.4%
unpow-prod-down34.9%
pow1/234.9%
Applied egg-rr34.9%
unpow1/234.9%
Simplified34.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 73.3%
associate-*l/75.5%
Applied egg-rr75.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%
Simplified8.2%
Taylor expanded in l around inf 41.0%
Taylor expanded in U around 0 40.8%
*-commutative40.8%
associate-*r/40.8%
metadata-eval40.8%
Simplified40.8%
Final simplification66.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (* n (pow (/ l Om) 2.0)))
(t_3 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U)))))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= t_3 INFINITY)
(sqrt (* t_1 (- (- t (* 2.0 (* l (/ l Om)))) (* t_2 (- U U*)))))
(* (* l (sqrt 2.0)) (cbrt (pow (* -2.0 (/ U (/ Om n))) 1.5)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = n * pow((l / Om), 2.0);
double t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
} else {
tmp = (l * sqrt(2.0)) * cbrt(pow((-2.0 * (U / (Om / n))), 1.5));
}
return tmp;
}
l = Math.abs(l);
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 t_2 = n * Math.pow((l / Om), 2.0);
double t_3 = Math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.cbrt(Math.pow((-2.0 * (U / (Om / n))), 1.5));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = Float64(n * (Float64(l / Om) ^ 2.0)) t_3 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U))))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(t_2 * Float64(U - U_42_))))); else tmp = Float64(Float64(l * sqrt(2.0)) * cbrt((Float64(-2.0 * Float64(U / Float64(Om / n))) ^ 1.5))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[N[(-2.0 * N[(U / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_2 \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt[3]{{\left(-2 \cdot \frac{U}{\frac{Om}{n}}\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 9.7%
Simplified9.7%
Taylor expanded in t around inf 32.4%
pow1/232.4%
associate-*r*32.4%
unpow-prod-down34.9%
pow1/234.9%
Applied egg-rr34.9%
unpow1/234.9%
Simplified34.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 73.3%
associate-*l/75.5%
Applied egg-rr75.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%
Simplified8.2%
Taylor expanded in l around inf 41.0%
add-cbrt-cube41.1%
add-sqr-sqrt41.1%
pow141.1%
pow1/241.1%
pow-prod-up41.0%
Applied egg-rr38.3%
Taylor expanded in n around 0 18.9%
associate-/l*29.6%
Simplified29.6%
Final simplification64.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (* n (pow (/ l Om) 2.0)))
(t_3 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U)))))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= t_3 INFINITY)
(sqrt (* t_1 (- (- t (* 2.0 (* l (/ l Om)))) (* t_2 (- U U*)))))
(* (* l (sqrt 2.0)) (* (sqrt (* U (- U* U))) (/ (- n) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = n * pow((l / Om), 2.0);
double t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
} else {
tmp = (l * sqrt(2.0)) * (sqrt((U * (U_42_ - U))) * (-n / Om));
}
return tmp;
}
l = Math.abs(l);
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 t_2 = n * Math.pow((l / Om), 2.0);
double t_3 = Math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
} else {
tmp = (l * Math.sqrt(2.0)) * (Math.sqrt((U * (U_42_ - U))) * (-n / Om));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (2.0 * n) * U t_2 = n * math.pow((l / Om), 2.0) t_3 = math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif t_3 <= math.inf: tmp = math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_))))) else: tmp = (l * math.sqrt(2.0)) * (math.sqrt((U * (U_42_ - U))) * (-n / Om)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = Float64(n * (Float64(l / Om) ^ 2.0)) t_3 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U))))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(t_2 * Float64(U - U_42_))))); else tmp = Float64(Float64(l * sqrt(2.0)) * Float64(sqrt(Float64(U * Float64(U_42_ - U))) * Float64(Float64(-n) / Om))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (2.0 * n) * U; t_2 = n * ((l / Om) ^ 2.0); t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (t_3 <= Inf) tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_))))); else tmp = (l * sqrt(2.0)) * (sqrt((U * (U_42_ - U))) * (-n / Om)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(U * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-n) / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_2 \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \left(\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{-n}{Om}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 9.7%
Simplified9.7%
Taylor expanded in t around inf 32.4%
pow1/232.4%
associate-*r*32.4%
unpow-prod-down34.9%
pow1/234.9%
Applied egg-rr34.9%
unpow1/234.9%
Simplified34.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 73.3%
associate-*l/75.5%
Applied egg-rr75.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%
Simplified8.2%
Taylor expanded in l around inf 41.0%
add-cbrt-cube41.1%
add-sqr-sqrt41.1%
pow141.1%
pow1/241.1%
pow-prod-up41.0%
Applied egg-rr38.3%
Taylor expanded in n around -inf 21.5%
mul-1-neg21.5%
*-commutative21.5%
distribute-rgt-neg-in21.5%
Simplified21.5%
Final simplification63.7%
NOTE: l should be positive before calling this function
(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)))))))))l = abs(l);
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_42_ - U))))))));
}
NOTE: l should be positive before calling this function
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_42 - u))))))))
end function
l = Math.abs(l);
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_42_ - U))))))));
}
l = abs(l) 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_42_ - U))))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(-2.0 * Float64(l * Float64(l / Om))) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)))))))) end
l = abs(l) 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_42_ - U)))))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $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]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \left(-2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)\right)}
\end{array}
Initial program 56.4%
Simplified58.9%
add-cube-cbrt58.9%
pow358.9%
Applied egg-rr58.9%
cbrt-prod58.8%
unpow258.8%
cbrt-prod61.3%
pow261.3%
Applied egg-rr61.3%
pow1/338.5%
add-cube-cbrt38.5%
unpow238.5%
unpow-prod-down38.5%
pow1/338.6%
pow1/361.3%
Applied egg-rr61.3%
associate--l+61.3%
div-inv61.3%
clear-num61.3%
*-commutative61.3%
unpow-prod-down58.8%
pow358.8%
add-cube-cbrt58.8%
Applied egg-rr58.9%
Final simplification58.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(sqrt
(*
(* 2.0 n)
(*
U
(+ (+ t (* -2.0 (/ l (/ Om l)))) (* n (* (pow (/ l Om) 2.0) (- U* U))))))))l = abs(l);
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 / (Om / l)))) + (n * (pow((l / Om), 2.0) * (U_42_ - U)))))));
}
NOTE: l should be positive before calling this function
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 / (om / l)))) + (n * (((l / om) ** 2.0d0) * (u_42 - u)))))))
end function
l = Math.abs(l);
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 / (Om / l)))) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U)))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U)))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U))))))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (((l / Om) ^ 2.0) * (U_42_ - U))))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $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}
l = |l|\\
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}
\end{array}
Initial program 56.4%
Simplified58.9%
Final simplification58.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.2e-52)
(sqrt (* 2.0 (* n (* U t))))
(if (<= l 3.2e+170)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.2e-52) {
tmp = sqrt((2.0 * (n * (U * t))));
} else if (l <= 3.2e+170) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 2.2d-52) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else if (l <= 3.2d+170) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / om)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.2e-52) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else if (l <= 3.2e+170) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.2e-52: tmp = math.sqrt((2.0 * (n * (U * t)))) elif l <= 3.2e+170: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.2e-52) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); elseif (l <= 3.2e+170) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.2e-52) tmp = sqrt((2.0 * (n * (U * t)))); elseif (l <= 3.2e+170) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); else tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.2e-52], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.2e+170], 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[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.2 \cdot 10^{-52}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 3.2 \cdot 10^{+170}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 2.20000000000000009e-52Initial program 61.3%
Simplified63.0%
Taylor expanded in l around 0 47.2%
if 2.20000000000000009e-52 < l < 3.19999999999999979e170Initial program 52.4%
Simplified52.4%
Taylor expanded in n around 0 40.8%
if 3.19999999999999979e170 < l Initial program 28.3%
Simplified47.1%
Taylor expanded in l around inf 77.5%
Taylor expanded in n around 0 35.6%
Final simplification45.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= n -5.2e+180) (sqrt (* 2.0 (fabs (* U (* n t))))) (sqrt (* 2.0 (* n (* U (+ t (* (/ (pow l 2.0) Om) -2.0))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -5.2e+180) {
tmp = sqrt((2.0 * fabs((U * (n * t)))));
} else {
tmp = sqrt((2.0 * (n * (U * (t + ((pow(l, 2.0) / Om) * -2.0))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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.2d+180)) then
tmp = sqrt((2.0d0 * abs((u * (n * t)))))
else
tmp = sqrt((2.0d0 * (n * (u * (t + (((l ** 2.0d0) / om) * (-2.0d0)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -5.2e+180) {
tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
} else {
tmp = Math.sqrt((2.0 * (n * (U * (t + ((Math.pow(l, 2.0) / Om) * -2.0))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= -5.2e+180: tmp = math.sqrt((2.0 * math.fabs((U * (n * t))))) else: tmp = math.sqrt((2.0 * (n * (U * (t + ((math.pow(l, 2.0) / Om) * -2.0)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -5.2e+180) tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t))))); else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64((l ^ 2.0) / Om) * -2.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -5.2e+180) tmp = sqrt((2.0 * abs((U * (n * t))))); else tmp = sqrt((2.0 * (n * (U * (t + (((l ^ 2.0) / Om) * -2.0)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -5.2e+180], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -5.2 \cdot 10^{+180}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if n < -5.20000000000000042e180Initial program 54.8%
Simplified34.6%
Taylor expanded in t around inf 36.1%
add-sqr-sqrt36.1%
pow1/236.1%
pow1/243.5%
pow-prod-down33.2%
pow233.2%
Applied egg-rr33.2%
unpow1/233.2%
unpow233.2%
rem-sqrt-square44.1%
Simplified44.1%
if -5.20000000000000042e180 < n Initial program 56.6%
Simplified59.8%
Taylor expanded in n around 0 51.7%
Final simplification50.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= n -6.6e+209) (* (* l (sqrt 2.0)) (* (sqrt (* U (- U* U))) (/ (- n) Om))) (sqrt (* 2.0 (* n (* U (+ t (* (/ (pow l 2.0) Om) -2.0))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -6.6e+209) {
tmp = (l * sqrt(2.0)) * (sqrt((U * (U_42_ - U))) * (-n / Om));
} else {
tmp = sqrt((2.0 * (n * (U * (t + ((pow(l, 2.0) / Om) * -2.0))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-6.6d+209)) then
tmp = (l * sqrt(2.0d0)) * (sqrt((u * (u_42 - u))) * (-n / om))
else
tmp = sqrt((2.0d0 * (n * (u * (t + (((l ** 2.0d0) / om) * (-2.0d0)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -6.6e+209) {
tmp = (l * Math.sqrt(2.0)) * (Math.sqrt((U * (U_42_ - U))) * (-n / Om));
} else {
tmp = Math.sqrt((2.0 * (n * (U * (t + ((Math.pow(l, 2.0) / Om) * -2.0))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= -6.6e+209: tmp = (l * math.sqrt(2.0)) * (math.sqrt((U * (U_42_ - U))) * (-n / Om)) else: tmp = math.sqrt((2.0 * (n * (U * (t + ((math.pow(l, 2.0) / Om) * -2.0)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -6.6e+209) tmp = Float64(Float64(l * sqrt(2.0)) * Float64(sqrt(Float64(U * Float64(U_42_ - U))) * Float64(Float64(-n) / Om))); else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64((l ^ 2.0) / Om) * -2.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -6.6e+209) tmp = (l * sqrt(2.0)) * (sqrt((U * (U_42_ - U))) * (-n / Om)); else tmp = sqrt((2.0 * (n * (U * (t + (((l ^ 2.0) / Om) * -2.0)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -6.6e+209], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(U * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-n) / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -6.6 \cdot 10^{+209}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \left(\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{-n}{Om}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if n < -6.59999999999999961e209Initial program 47.2%
Simplified47.3%
Taylor expanded in l around inf 22.4%
add-cbrt-cube22.4%
add-sqr-sqrt22.4%
pow122.4%
pow1/222.8%
pow-prod-up22.5%
Applied egg-rr28.5%
Taylor expanded in n around -inf 33.6%
mul-1-neg33.6%
*-commutative33.6%
distribute-rgt-neg-in33.6%
Simplified33.6%
if -6.59999999999999961e209 < n Initial program 57.1%
Simplified59.7%
Taylor expanded in n around 0 51.1%
Final simplification49.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.76e+50) (sqrt (* 2.0 (* n (* U t)))) (* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ U (/ Om n)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.76e+50) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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.76d+50) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * (u / (om / n))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.76e+50) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * (U / (Om / n))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.76e+50: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * (U / (Om / n)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.76e+50) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(U / Float64(Om / n))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.76e+50) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = (l * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.76e+50], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(U / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.76 \cdot 10^{+50}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\\
\end{array}
\end{array}
if l < 1.7600000000000001e50Initial program 60.1%
Simplified61.3%
Taylor expanded in l around 0 45.2%
if 1.7600000000000001e50 < l Initial program 42.3%
Simplified49.6%
Taylor expanded in l around inf 63.7%
Taylor expanded in n around 0 37.4%
associate-/l*34.0%
Simplified34.0%
Final simplification42.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.2e+51) (sqrt (* 2.0 (* n (* U t)))) (* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.2e+51) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
NOTE: l should be positive before calling this function
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.2d+51) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / om)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.2e+51) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.2e+51: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.2e+51) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.2e+51) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.2e+51], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.2 \cdot 10^{+51}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 1.1999999999999999e51Initial program 60.1%
Simplified61.3%
Taylor expanded in l around 0 45.2%
if 1.1999999999999999e51 < l Initial program 42.3%
Simplified49.6%
Taylor expanded in l around inf 63.7%
Taylor expanded in n around 0 37.4%
Final simplification43.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= Om -1.3e-68) (sqrt (* 2.0 (* n (* U t)))) (sqrt (* 2.0 (fabs (* U (* n t)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -1.3e-68) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = sqrt((2.0 * fabs((U * (n * t)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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.3d-68)) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = sqrt((2.0d0 * abs((u * (n * t)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -1.3e-68) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -1.3e-68: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = math.sqrt((2.0 * math.fabs((U * (n * t))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -1.3e-68) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -1.3e-68) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = sqrt((2.0 * abs((U * (n * t))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -1.3e-68], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.3 \cdot 10^{-68}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\
\end{array}
\end{array}
if Om < -1.2999999999999999e-68Initial program 54.8%
Simplified59.2%
Taylor expanded in l around 0 42.5%
if -1.2999999999999999e-68 < Om Initial program 57.4%
Simplified55.4%
Taylor expanded in t around inf 37.8%
add-sqr-sqrt37.7%
pow1/237.7%
pow1/240.2%
pow-prod-down34.7%
pow234.7%
Applied egg-rr34.7%
unpow1/234.7%
unpow234.7%
rem-sqrt-square41.0%
Simplified41.0%
Final simplification41.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= n 3.9e-257) (sqrt (* 2.0 (fabs (* U (* n t))))) (* (sqrt (* 2.0 n)) (sqrt (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 3.9e-257) {
tmp = sqrt((2.0 * fabs((U * (n * t)))));
} else {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (n <= 3.9d-257) then
tmp = sqrt((2.0d0 * abs((u * (n * t)))))
else
tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 3.9e-257) {
tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
} else {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= 3.9e-257: tmp = math.sqrt((2.0 * math.fabs((U * (n * t))))) else: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 3.9e-257) tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t))))); else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= 3.9e-257) tmp = sqrt((2.0 * abs((U * (n * t))))); else tmp = sqrt((2.0 * n)) * sqrt((U * t)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 3.9e-257], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * 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}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq 3.9 \cdot 10^{-257}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\end{array}
\end{array}
if n < 3.9000000000000001e-257Initial program 60.0%
Simplified57.5%
Taylor expanded in t around inf 39.9%
add-sqr-sqrt39.8%
pow1/239.8%
pow1/242.0%
pow-prod-down31.3%
pow231.3%
Applied egg-rr31.3%
unpow1/231.3%
unpow231.3%
rem-sqrt-square42.6%
Simplified42.6%
if 3.9000000000000001e-257 < n Initial program 52.0%
Simplified56.5%
add-cube-cbrt56.5%
pow356.5%
Applied egg-rr56.5%
Taylor expanded in t around inf 36.6%
sqrt-prod42.3%
Applied egg-rr42.3%
*-commutative42.3%
Simplified42.3%
Final simplification42.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= Om -9.5e-93) (sqrt (* 2.0 (* n (* U t)))) (pow (* 2.0 (* U (* n t))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -9.5e-93) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-9.5d-93)) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -9.5e-93) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -9.5e-93: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = math.pow((2.0 * (U * (n * t))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -9.5e-93) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -9.5e-93) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = (2.0 * (U * (n * t))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -9.5e-93], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -9.5 \cdot 10^{-93}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if Om < -9.5000000000000001e-93Initial program 54.8%
Simplified59.2%
Taylor expanded in l around 0 42.5%
if -9.5000000000000001e-93 < Om Initial program 57.4%
Simplified55.4%
Taylor expanded in t around inf 37.8%
pow1/240.3%
Applied egg-rr40.3%
Final simplification41.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
NOTE: l should be positive before calling this function
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
l = Math.abs(l);
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))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
NOTE: l should be positive before calling this function 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}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 56.4%
Simplified54.7%
Taylor expanded in t around inf 36.2%
Final simplification36.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (n * (U * t))));
}
NOTE: l should be positive before calling this function
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
l = Math.abs(l);
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))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (n * (U * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (n * (U * t)))); end
NOTE: l should be positive before calling this function 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}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 56.4%
Simplified58.9%
Taylor expanded in l around 0 38.3%
Final simplification38.3%
herbie shell --seed 2023299
(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*))))))