
(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 14 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}
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U))))))
(if (<= t_2 0.0)
(sqrt
(*
(* 2.0 n)
(*
U
(-
t
(/ (- (* 2.0 (pow l_m 2.0)) (* U* (* (pow l_m 2.0) (/ n Om)))) Om)))))
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (+ (* t_1 (- U U*)) (* 2.0 (* l_m (/ l_m Om)))))))
(*
(sqrt (* U (* n (+ (/ (* n U*) (pow Om 2.0)) (* 2.0 (/ -1.0 Om))))))
(* l_m (sqrt 2.0)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (((2.0 * pow(l_m, 2.0)) - (U_42_ * (pow(l_m, 2.0) * (n / Om)))) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * Math.pow((l_m / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (((2.0 * Math.pow(l_m, 2.0)) - (U_42_ * (Math.pow(l_m, 2.0) * (n / Om)))) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l_m * Math.sqrt(2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = n * math.pow((l_m / Om), 2.0) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (((2.0 * math.pow(l_m, 2.0)) - (U_42_ * (math.pow(l_m, 2.0) * (n / Om)))) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l_m * math.sqrt(2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(Float64(2.0 * (l_m ^ 2.0)) - Float64(U_42_ * Float64((l_m ^ 2.0) * Float64(n / Om)))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(t_1 * Float64(U - U_42_)) + Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = n * ((l_m / Om) ^ 2.0); t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (((2.0 * (l_m ^ 2.0)) - (U_42_ * ((l_m ^ 2.0) * (n / Om)))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) + (2.0 * (-1.0 / Om)))))) * (l_m * sqrt(2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] - N[(U$42$ * N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{2 \cdot {l\_m}^{2} - U* \cdot \left({l\_m}^{2} \cdot \frac{n}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\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 10.4%
Simplified45.7%
Taylor expanded in U around 0 41.4%
associate-/l*39.4%
unpow239.4%
unpow239.4%
times-frac45.7%
unpow245.7%
neg-mul-145.7%
distribute-lft-neg-out45.7%
*-commutative45.7%
Simplified45.7%
Taylor expanded in Om around inf 47.8%
+-commutative47.8%
mul-1-neg47.8%
unsub-neg47.8%
associate-/l*51.7%
associate-/l*51.7%
Simplified51.7%
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 74.0%
Simplified79.5%
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%
Simplified9.3%
Taylor expanded in U around 0 1.4%
associate-/l*1.2%
unpow21.2%
unpow21.2%
times-frac9.8%
unpow29.8%
neg-mul-19.8%
distribute-lft-neg-out9.8%
*-commutative9.8%
Simplified9.8%
Taylor expanded in Om around inf 18.1%
+-commutative18.1%
mul-1-neg18.1%
unsub-neg18.1%
associate-/l*18.1%
associate-/l*17.9%
Simplified17.9%
Taylor expanded in l around inf 20.3%
Final simplification65.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(sqrt
(* (* 2.0 n) (* U (- t (/ (* (* l_m l_m) (- 2.0 (/ (* n U*) Om))) Om)))))
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (+ (* t_1 (- U U*)) (* 2.0 (* l_m (/ l_m Om)))))))
(*
(sqrt (* U (* n (+ (/ (* n U*) (pow Om 2.0)) (* 2.0 (/ -1.0 Om))))))
(* l_m (sqrt 2.0)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * pow((l_m / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * Math.pow((l_m / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l_m * Math.sqrt(2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = n * math.pow((l_m / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l_m * math.sqrt(2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(Float64(l_m * l_m) * Float64(2.0 - Float64(Float64(n * U_42_) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(t_1 * Float64(U - U_42_)) + Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = n * ((l_m / Om) ^ 2.0); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) + (2.0 * (-1.0 / Om)))))) * (l_m * sqrt(2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 - N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{\left(l\_m \cdot l\_m\right) \cdot \left(2 - \frac{n \cdot U*}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 11.6%
Simplified48.6%
Taylor expanded in U around 0 43.8%
associate-/l*43.8%
unpow243.8%
unpow243.8%
times-frac48.6%
unpow248.6%
neg-mul-148.6%
distribute-lft-neg-out48.6%
*-commutative48.6%
Simplified48.6%
Taylor expanded in Om around inf 53.0%
+-commutative53.0%
mul-1-neg53.0%
unsub-neg53.0%
associate-/l*53.0%
associate-/l*53.0%
Simplified53.0%
Taylor expanded in l around 0 53.0%
unpow253.0%
Applied egg-rr53.0%
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 74.0%
Simplified79.5%
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%
Simplified10.6%
Taylor expanded in U around 0 3.7%
associate-/l*1.1%
unpow21.1%
unpow21.1%
times-frac11.2%
unpow211.2%
neg-mul-111.2%
distribute-lft-neg-out11.2%
*-commutative11.2%
Simplified11.2%
Taylor expanded in Om around inf 16.1%
+-commutative16.1%
mul-1-neg16.1%
unsub-neg16.1%
associate-/l*20.8%
associate-/l*20.7%
Simplified20.7%
Taylor expanded in l around inf 20.3%
Final simplification65.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(sqrt
(* (* 2.0 n) (* U (- t (/ (* (* l_m l_m) (- 2.0 (/ (* n U*) Om))) Om)))))
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (+ (* t_1 (- U U*)) (* 2.0 (* l_m (/ l_m Om)))))))
(*
(* l_m (sqrt 2.0))
(sqrt (* (* n U) (- (* U* (/ n (pow Om 2.0))) (/ 2.0 Om)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * pow((l_m / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ * (n / pow(Om, 2.0))) - (2.0 / Om))));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * Math.pow((l_m / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * ((U_42_ * (n / Math.pow(Om, 2.0))) - (2.0 / Om))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = n * math.pow((l_m / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * ((U_42_ * (n / math.pow(Om, 2.0))) - (2.0 / Om)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(Float64(l_m * l_m) * Float64(2.0 - Float64(Float64(n * U_42_) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(t_1 * Float64(U - U_42_)) + Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(U_42_ * Float64(n / (Om ^ 2.0))) - Float64(2.0 / Om))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = n * ((l_m / Om) ^ 2.0); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))))); else tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ * (n / (Om ^ 2.0))) - (2.0 / Om)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 - N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(U$42$ * N[(n / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{\left(l\_m \cdot l\_m\right) \cdot \left(2 - \frac{n \cdot U*}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 11.6%
Simplified48.6%
Taylor expanded in U around 0 43.8%
associate-/l*43.8%
unpow243.8%
unpow243.8%
times-frac48.6%
unpow248.6%
neg-mul-148.6%
distribute-lft-neg-out48.6%
*-commutative48.6%
Simplified48.6%
Taylor expanded in Om around inf 53.0%
+-commutative53.0%
mul-1-neg53.0%
unsub-neg53.0%
associate-/l*53.0%
associate-/l*53.0%
Simplified53.0%
Taylor expanded in l around 0 53.0%
unpow253.0%
Applied egg-rr53.0%
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 74.0%
Simplified79.5%
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%
Simplified10.6%
Taylor expanded in U around 0 3.7%
associate-/l*1.1%
unpow21.1%
unpow21.1%
times-frac11.2%
unpow211.2%
neg-mul-111.2%
distribute-lft-neg-out11.2%
*-commutative11.2%
Simplified11.2%
Taylor expanded in Om around inf 16.1%
+-commutative16.1%
mul-1-neg16.1%
unsub-neg16.1%
associate-/l*20.8%
associate-/l*20.7%
Simplified20.7%
Taylor expanded in l around inf 20.3%
*-commutative20.3%
associate-*r*20.2%
*-commutative20.2%
associate-/l*20.2%
associate-*r/20.2%
metadata-eval20.2%
Simplified20.2%
Final simplification65.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(sqrt
(* (* 2.0 n) (* U (- t (/ (* (* l_m l_m) (- 2.0 (/ (* n U*) Om))) Om)))))
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (+ (* t_1 (- U U*)) (* 2.0 (* l_m (/ l_m Om)))))))
(sqrt
(*
(* 2.0 n)
(/ (* U (* (pow l_m 2.0) (- (* U* (/ n Om)) 2.0))) Om)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * pow((l_m / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * ((U * (pow(l_m, 2.0) * ((U_42_ * (n / Om)) - 2.0))) / Om)));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = n * Math.pow((l_m / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((U * (Math.pow(l_m, 2.0) * ((U_42_ * (n / Om)) - 2.0))) / Om)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = n * math.pow((l_m / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.sqrt(((2.0 * n) * ((U * (math.pow(l_m, 2.0) * ((U_42_ * (n / Om)) - 2.0))) / Om))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(Float64(l_m * l_m) * Float64(2.0 - Float64(Float64(n * U_42_) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(t_1 * Float64(U - U_42_)) + Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(U * Float64((l_m ^ 2.0) * Float64(Float64(U_42_ * Float64(n / Om)) - 2.0))) / Om))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = n * ((l_m / Om) ^ 2.0); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt(((2.0 * n) * ((U * ((l_m ^ 2.0) * ((U_42_ * (n / Om)) - 2.0))) / Om))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 - N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(U * N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{\left(l\_m \cdot l\_m\right) \cdot \left(2 - \frac{n \cdot U*}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{U \cdot \left({l\_m}^{2} \cdot \left(U* \cdot \frac{n}{Om} - 2\right)\right)}{Om}}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 11.6%
Simplified48.6%
Taylor expanded in U around 0 43.8%
associate-/l*43.8%
unpow243.8%
unpow243.8%
times-frac48.6%
unpow248.6%
neg-mul-148.6%
distribute-lft-neg-out48.6%
*-commutative48.6%
Simplified48.6%
Taylor expanded in Om around inf 53.0%
+-commutative53.0%
mul-1-neg53.0%
unsub-neg53.0%
associate-/l*53.0%
associate-/l*53.0%
Simplified53.0%
Taylor expanded in l around 0 53.0%
unpow253.0%
Applied egg-rr53.0%
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 74.0%
Simplified79.5%
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%
Simplified10.6%
Taylor expanded in U around 0 3.7%
associate-/l*1.1%
unpow21.1%
unpow21.1%
times-frac11.2%
unpow211.2%
neg-mul-111.2%
distribute-lft-neg-out11.2%
*-commutative11.2%
Simplified11.2%
Taylor expanded in Om around inf 16.1%
+-commutative16.1%
mul-1-neg16.1%
unsub-neg16.1%
associate-/l*20.8%
associate-/l*20.7%
Simplified20.7%
Taylor expanded in l around 0 34.6%
Taylor expanded in t around 0 34.6%
associate-*r/34.6%
mul-1-neg34.6%
associate-*r/39.3%
*-commutative39.3%
Simplified39.3%
Final simplification68.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= Om 3e+85)
(sqrt
(* (* 2.0 n) (* U (- t (/ (* (* l_m l_m) (- 2.0 (/ (* n U*) Om))) Om)))))
(sqrt (* (* 2.0 (* n U)) (- t (/ (* 2.0 (pow l_m 2.0)) Om))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (Om <= 3e+85) {
tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * pow(l_m, 2.0)) / Om))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (om <= 3d+85) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (((l_m * l_m) * (2.0d0 - ((n * u_42) / om))) / om)))))
else
tmp = sqrt(((2.0d0 * (n * u)) * (t - ((2.0d0 * (l_m ** 2.0d0)) / om))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (Om <= 3e+85) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if Om <= 3e+85: tmp = math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))) else: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (Om <= 3e+85) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(Float64(l_m * l_m) * Float64(2.0 - Float64(Float64(n * U_42_) / Om))) / Om))))); else tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (Om <= 3e+85) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))); else tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * (l_m ^ 2.0)) / Om)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, 3e+85], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 - N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 3 \cdot 10^{+85}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{\left(l\_m \cdot l\_m\right) \cdot \left(2 - \frac{n \cdot U*}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)}\\
\end{array}
\end{array}
if Om < 3e85Initial program 49.6%
Simplified57.8%
Taylor expanded in U around 0 48.3%
associate-/l*49.3%
unpow249.3%
unpow249.3%
times-frac58.3%
unpow258.3%
neg-mul-158.3%
distribute-lft-neg-out58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in Om around inf 53.5%
+-commutative53.5%
mul-1-neg53.5%
unsub-neg53.5%
associate-/l*55.0%
associate-/l*57.3%
Simplified57.3%
Taylor expanded in l around 0 59.2%
unpow259.2%
Applied egg-rr59.2%
if 3e85 < Om Initial program 58.3%
Simplified63.3%
Taylor expanded in Om around inf 58.4%
associate-*r/58.4%
Simplified58.4%
Final simplification59.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= t 8.6e+85)
(sqrt
(* (* 2.0 n) (* U (- t (/ (* (* l_m l_m) (- 2.0 (/ (* n U*) Om))) Om)))))
(* (sqrt (* 2.0 (* n U))) (sqrt t))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 8.6e+85) {
tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else {
tmp = sqrt((2.0 * (n * U))) * sqrt(t);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 8.6d+85) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (((l_m * l_m) * (2.0d0 - ((n * u_42) / om))) / om)))))
else
tmp = sqrt((2.0d0 * (n * u))) * sqrt(t)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 8.6e+85) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
} else {
tmp = Math.sqrt((2.0 * (n * U))) * Math.sqrt(t);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= 8.6e+85: tmp = math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))) else: tmp = math.sqrt((2.0 * (n * U))) * math.sqrt(t) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= 8.6e+85) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(Float64(l_m * l_m) * Float64(2.0 - Float64(Float64(n * U_42_) / Om))) / Om))))); else tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(t)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= 8.6e+85) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))); else tmp = sqrt((2.0 * (n * U))) * sqrt(t); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, 8.6e+85], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 - N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $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}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.6 \cdot 10^{+85}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{\left(l\_m \cdot l\_m\right) \cdot \left(2 - \frac{n \cdot U*}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < 8.5999999999999998e85Initial program 53.0%
Simplified59.9%
Taylor expanded in U around 0 49.2%
associate-/l*51.6%
unpow251.6%
unpow251.6%
times-frac60.4%
unpow260.4%
neg-mul-160.4%
distribute-lft-neg-out60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in Om around inf 54.8%
+-commutative54.8%
mul-1-neg54.8%
unsub-neg54.8%
associate-/l*56.2%
associate-/l*58.4%
Simplified58.4%
Taylor expanded in l around 0 58.4%
unpow258.4%
Applied egg-rr58.4%
if 8.5999999999999998e85 < t Initial program 44.6%
Simplified50.9%
Taylor expanded in t around inf 48.1%
associate-*r*46.5%
Simplified46.5%
pow1/246.6%
associate-*r*46.6%
unpow-prod-down60.4%
*-commutative60.4%
pow1/260.4%
Applied egg-rr60.4%
unpow1/260.4%
Simplified60.4%
Final simplification58.7%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 4.7e-110)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (* l_m l_m) Om)))))))
(sqrt
(* (* 2.0 n) (* U (- t (/ (* (* l_m l_m) (- 2.0 (/ (* n U*) Om))) Om)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 4.7e-110) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m * l_m) / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 4.7d-110) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m * l_m) / om)))))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t - (((l_m * l_m) * (2.0d0 - ((n * u_42) / om))) / om)))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 4.7e-110) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m * l_m) / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 4.7e-110: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m * l_m) / Om))))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 4.7e-110) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(Float64(l_m * l_m) * Float64(2.0 - Float64(Float64(n * U_42_) / Om))) / Om))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 4.7e-110) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m * l_m) / Om))))))); else tmp = sqrt(((2.0 * n) * (U * (t - (((l_m * l_m) * (2.0 - ((n * U_42_) / Om))) / Om))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 4.7e-110], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 - N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 4.7 \cdot 10^{-110}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{\left(l\_m \cdot l\_m\right) \cdot \left(2 - \frac{n \cdot U*}{Om}\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 4.69999999999999992e-110Initial program 53.6%
Simplified59.9%
Taylor expanded in n around 0 48.9%
unpow254.7%
Applied egg-rr48.9%
if 4.69999999999999992e-110 < l Initial program 46.0%
Simplified54.1%
Taylor expanded in U around 0 45.9%
associate-/l*48.7%
unpow248.7%
unpow248.7%
times-frac54.4%
unpow254.4%
neg-mul-154.4%
distribute-lft-neg-out54.4%
*-commutative54.4%
Simplified54.4%
Taylor expanded in Om around inf 48.8%
+-commutative48.8%
mul-1-neg48.8%
unsub-neg48.8%
associate-/l*51.5%
associate-/l*55.6%
Simplified55.6%
Taylor expanded in l around 0 60.5%
unpow260.5%
Applied egg-rr60.5%
Final simplification52.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 7.2e-9) (pow (* n (* t (* 2.0 U))) 0.5) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (* l_m l_m) Om)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 7.2e-9) {
tmp = pow((n * (t * (2.0 * U))), 0.5);
} else {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m * l_m) / Om)))))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 7.2d-9) then
tmp = (n * (t * (2.0d0 * u))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m * l_m) / om)))))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 7.2e-9) {
tmp = Math.pow((n * (t * (2.0 * U))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m * l_m) / Om)))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 7.2e-9: tmp = math.pow((n * (t * (2.0 * U))), 0.5) else: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m * l_m) / Om))))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 7.2e-9) tmp = Float64(n * Float64(t * Float64(2.0 * U))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 7.2e-9) tmp = (n * (t * (2.0 * U))) ^ 0.5; else tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m * l_m) / Om))))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 7.2e-9], N[Power[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 7.2 \cdot 10^{-9}:\\
\;\;\;\;{\left(n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 7.2e-9Initial program 54.8%
Simplified60.5%
Taylor expanded in t around inf 41.3%
add-sqr-sqrt41.3%
pow1/241.3%
pow1/245.2%
pow-prod-down32.4%
pow232.4%
associate-*r*32.4%
Applied egg-rr32.4%
unpow1/232.4%
*-commutative32.4%
Simplified32.4%
pow1/232.4%
sqrt-pow145.2%
metadata-eval45.2%
pow145.2%
associate-*l*44.3%
Applied egg-rr44.3%
if 7.2e-9 < l Initial program 37.4%
Simplified49.0%
Taylor expanded in n around 0 42.5%
unpow258.1%
Applied egg-rr42.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U* -1.9e+53) (pow (* (* 2.0 U) (* n t)) 0.5) (pow (* n (* t (* 2.0 U))) 0.5)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.9e+53) {
tmp = pow(((2.0 * U) * (n * t)), 0.5);
} else {
tmp = pow((n * (t * (2.0 * U))), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= (-1.9d+53)) then
tmp = ((2.0d0 * u) * (n * t)) ** 0.5d0
else
tmp = (n * (t * (2.0d0 * u))) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.9e+53) {
tmp = Math.pow(((2.0 * U) * (n * t)), 0.5);
} else {
tmp = Math.pow((n * (t * (2.0 * U))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U_42_ <= -1.9e+53: tmp = math.pow(((2.0 * U) * (n * t)), 0.5) else: tmp = math.pow((n * (t * (2.0 * U))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U_42_ <= -1.9e+53) tmp = Float64(Float64(2.0 * U) * Float64(n * t)) ^ 0.5; else tmp = Float64(n * Float64(t * Float64(2.0 * U))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U_42_ <= -1.9e+53) tmp = ((2.0 * U) * (n * t)) ^ 0.5; else tmp = (n * (t * (2.0 * U))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U$42$, -1.9e+53], N[Power[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1.9 \cdot 10^{+53}:\\
\;\;\;\;{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if U* < -1.89999999999999999e53Initial program 62.5%
Simplified58.5%
Taylor expanded in t around inf 32.3%
pow1/247.6%
associate-*r*47.6%
Applied egg-rr47.6%
if -1.89999999999999999e53 < U* Initial program 49.0%
Simplified58.2%
Taylor expanded in t around inf 36.5%
add-sqr-sqrt36.5%
pow1/236.5%
pow1/237.0%
pow-prod-down26.2%
pow226.2%
associate-*r*26.2%
Applied egg-rr26.2%
unpow1/226.2%
*-commutative26.2%
Simplified26.2%
pow1/226.2%
sqrt-pow137.0%
metadata-eval37.0%
pow137.0%
associate-*l*39.9%
Applied egg-rr39.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U 6.2e+101) (pow (* n (* t (* 2.0 U))) 0.5) (sqrt (* 2.0 (* t (* n U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 6.2e+101) {
tmp = pow((n * (t * (2.0 * U))), 0.5);
} else {
tmp = sqrt((2.0 * (t * (n * U))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 6.2d+101) then
tmp = (n * (t * (2.0d0 * u))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (t * (n * u))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 6.2e+101) {
tmp = Math.pow((n * (t * (2.0 * U))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (t * (n * U))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= 6.2e+101: tmp = math.pow((n * (t * (2.0 * U))), 0.5) else: tmp = math.sqrt((2.0 * (t * (n * U)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= 6.2e+101) tmp = Float64(n * Float64(t * Float64(2.0 * U))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= 6.2e+101) tmp = (n * (t * (2.0 * U))) ^ 0.5; else tmp = sqrt((2.0 * (t * (n * U)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 6.2e+101], N[Power[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 6.2 \cdot 10^{+101}:\\
\;\;\;\;{\left(n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\end{array}
\end{array}
if U < 6.19999999999999998e101Initial program 49.3%
Simplified59.6%
Taylor expanded in t around inf 34.6%
add-sqr-sqrt34.6%
pow1/234.6%
pow1/238.2%
pow-prod-down28.8%
pow228.8%
associate-*r*28.8%
Applied egg-rr28.8%
unpow1/228.8%
*-commutative28.8%
Simplified28.8%
pow1/228.8%
sqrt-pow138.2%
metadata-eval38.2%
pow138.2%
associate-*l*38.2%
Applied egg-rr38.2%
if 6.19999999999999998e101 < U Initial program 68.7%
Simplified47.8%
Taylor expanded in t around inf 44.7%
associate-*r*58.1%
Simplified58.1%
Final simplification40.4%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U 1e-19) (sqrt (* (* 2.0 n) (* U t))) (sqrt (* 2.0 (* t (* n U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 1e-19) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = sqrt((2.0 * (t * (n * U))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 1d-19) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = sqrt((2.0d0 * (t * (n * u))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 1e-19) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.sqrt((2.0 * (t * (n * U))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= 1e-19: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.sqrt((2.0 * (t * (n * U)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= 1e-19) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= 1e-19) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = sqrt((2.0 * (t * (n * U)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 1e-19], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 10^{-19}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\end{array}
\end{array}
if U < 9.9999999999999998e-20Initial program 48.3%
Simplified59.0%
Taylor expanded in t around inf 36.6%
if 9.9999999999999998e-20 < U Initial program 63.0%
Simplified55.5%
Taylor expanded in t around inf 40.2%
associate-*r*47.0%
Simplified47.0%
Final simplification38.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= t -5.2e+50) (sqrt (* 2.0 (* U (* n t)))) (sqrt (* 2.0 (* t (* n U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= -5.2e+50) {
tmp = sqrt((2.0 * (U * (n * t))));
} else {
tmp = sqrt((2.0 * (t * (n * U))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-5.2d+50)) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else
tmp = sqrt((2.0d0 * (t * (n * u))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= -5.2e+50) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else {
tmp = Math.sqrt((2.0 * (t * (n * U))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= -5.2e+50: tmp = math.sqrt((2.0 * (U * (n * t)))) else: tmp = math.sqrt((2.0 * (t * (n * U)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= -5.2e+50) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); else tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= -5.2e+50) tmp = sqrt((2.0 * (U * (n * t)))); else tmp = sqrt((2.0 * (t * (n * U)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, -5.2e+50], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+50}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\end{array}
\end{array}
if t < -5.2000000000000004e50Initial program 43.7%
Simplified63.8%
Taylor expanded in t around inf 45.8%
if -5.2000000000000004e50 < t Initial program 53.5%
Simplified56.8%
Taylor expanded in t around inf 33.1%
associate-*r*36.0%
Simplified36.0%
Final simplification38.0%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * t))))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 51.4%
Simplified58.3%
Taylor expanded in t around inf 35.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* U (* n t)) -2.0)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt(((U * (n * t)) * -2.0));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt(((u * (n * t)) * (-2.0d0)))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt(((U * (n * t)) * -2.0));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt(((U * (n * t)) * -2.0))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(Float64(U * Float64(n * t)) * -2.0)) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt(((U * (n * t)) * -2.0)); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(U \cdot \left(n \cdot t\right)\right) \cdot -2}
\end{array}
Initial program 51.4%
Simplified58.3%
Taylor expanded in t around inf 35.7%
add-sqr-sqrt35.7%
pow1/235.7%
pow1/238.9%
pow-prod-down29.1%
pow229.1%
associate-*r*29.1%
Applied egg-rr29.1%
unpow1/229.1%
*-commutative29.1%
Simplified29.1%
Taylor expanded in n around -inf 6.2%
Final simplification6.2%
herbie shell --seed 2024178
(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*))))))