
(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}
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)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_2 0.0)
(*
(exp
(*
(- (log (* n (- (/ (* 2.0 (pow l_m 2.0)) Om) t))) (log (/ -1.0 U)))
0.5))
(sqrt 2.0))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(pow
(*
(pow (* -2.0 (* U (/ n Om))) 0.16666666666666666)
(cbrt (* l_m (sqrt 2.0))))
3.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)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = exp(((log((n * (((2.0 * pow(l_m, 2.0)) / Om) - t))) - log((-1.0 / U))) * 0.5)) * sqrt(2.0);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = pow((pow((-2.0 * (U * (n / Om))), 0.16666666666666666) * cbrt((l_m * sqrt(2.0)))), 3.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)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.exp(((Math.log((n * (((2.0 * Math.pow(l_m, 2.0)) / Om) - t))) - Math.log((-1.0 / U))) * 0.5)) * Math.sqrt(2.0);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.pow((Math.pow((-2.0 * (U * (n / Om))), 0.16666666666666666) * Math.cbrt((l_m * Math.sqrt(2.0)))), 3.0);
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(exp(Float64(Float64(log(Float64(n * Float64(Float64(Float64(2.0 * (l_m ^ 2.0)) / Om) - t))) - log(Float64(-1.0 / U))) * 0.5)) * sqrt(2.0)); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64((Float64(-2.0 * Float64(U * Float64(n / Om))) ^ 0.16666666666666666) * cbrt(Float64(l_m * sqrt(2.0)))) ^ 3.0; end return 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 * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Exp[N[(N[(N[Log[N[(n * N[(N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[Log[N[(-1.0 / U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[Power[N[(-2.0 * N[(U * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Power[N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;e^{\left(\log \left(n \cdot \left(\frac{2 \cdot {l\_m}^{2}}{Om} - t\right)\right) - \log \left(\frac{-1}{U}\right)\right) \cdot 0.5} \cdot \sqrt{2}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(-2 \cdot \left(U \cdot \frac{n}{Om}\right)\right)}^{0.16666666666666666} \cdot \sqrt[3]{l\_m \cdot \sqrt{2}}\right)}^{3}\\
\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.5%
Simplified40.7%
Taylor expanded in Om around inf 40.7%
Taylor expanded in n around 0 40.5%
pow1/240.5%
+-commutative40.5%
associate-*r/40.5%
fma-undefine40.5%
pow-to-exp38.1%
Applied egg-rr38.1%
Taylor expanded in U around -inf 46.6%
mul-1-neg46.6%
unsub-neg46.6%
+-commutative46.6%
mul-1-neg46.6%
unsub-neg46.6%
associate-*r/46.6%
Simplified46.6%
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 69.6%
Simplified73.9%
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%
Simplified7.8%
Taylor expanded in Om around inf 16.9%
add-cube-cbrt16.5%
pow316.6%
associate-*l*16.6%
+-commutative16.6%
fma-define16.6%
associate-/l*8.4%
Applied egg-rr8.4%
Taylor expanded in t around 0 7.4%
associate-*r/7.4%
associate-/l*16.6%
Simplified16.6%
Final simplification60.6%
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)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_2 0.0)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(sqrt
(*
(* U -2.0)
(*
(- (/ 2.0 Om) (/ (* n (- U* U)) (pow Om 2.0)))
(* n (pow l_m 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)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = sqrt(((U * -2.0) * (((2.0 / Om) - ((n * (U_42_ - U)) / pow(Om, 2.0))) * (n * pow(l_m, 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)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.sqrt(((U * -2.0) * (((2.0 / Om) - ((n * (U_42_ - U)) / Math.pow(Om, 2.0))) * (n * Math.pow(l_m, 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)) * (U_42_ - U) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.sqrt(((U * -2.0) * (((2.0 / Om) - ((n * (U_42_ - U)) / math.pow(Om, 2.0))) * (n * math.pow(l_m, 2.0))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = sqrt(Float64(Float64(U * -2.0) * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0))) * Float64(n * (l_m ^ 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)) * (U_42_ - U); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt(((U * -2.0) * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om ^ 2.0))) * (n * (l_m ^ 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 * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * -2.0), $MachinePrecision] * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{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 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{{Om}^{2}}\right) \cdot \left(n \cdot {l\_m}^{2}\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 11.5%
Simplified40.7%
Taylor expanded in Om around inf 40.7%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 69.6%
Simplified73.9%
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%
Simplified5.1%
Taylor expanded in l around inf 34.2%
associate-*r*34.2%
associate-*r*34.5%
*-commutative34.5%
associate-*r/34.5%
metadata-eval34.5%
Simplified34.5%
Final simplification63.0%
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)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_2 0.0)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(sqrt
(* (* 2.0 n) (/ (* U (* U* (* n (pow l_m 2.0)))) (pow Om 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)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * ((U * (U_42_ * (n * pow(l_m, 2.0)))) / pow(Om, 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)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((U * (U_42_ * (n * Math.pow(l_m, 2.0)))) / Math.pow(Om, 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)) * (U_42_ - U) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.sqrt(((2.0 * n) * ((U * (U_42_ * (n * math.pow(l_m, 2.0)))) / math.pow(Om, 2.0)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(U * Float64(U_42_ * Float64(n * (l_m ^ 2.0)))) / (Om ^ 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)) * (U_42_ - U); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt(((2.0 * n) * ((U * (U_42_ * (n * (l_m ^ 2.0)))) / (Om ^ 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 * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - 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[(U$42$ * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{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 - 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(U* \cdot \left(n \cdot {l\_m}^{2}\right)\right)}{{Om}^{2}}}\\
\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.5%
Simplified40.7%
Taylor expanded in Om around inf 40.7%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 69.6%
Simplified73.9%
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%
Simplified7.8%
Taylor expanded in U* around inf 26.7%
Final simplification61.7%
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)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_2 0.0)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(* l_m (* (* n (/ (sqrt 2.0) Om)) (sqrt (* U U*))))))))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)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = l_m * ((n * (sqrt(2.0) / Om)) * sqrt((U * U_42_)));
}
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)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = l_m * ((n * (Math.sqrt(2.0) / Om)) * Math.sqrt((U * U_42_)));
}
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)) * (U_42_ - U) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = l_m * ((n * (math.sqrt(2.0) / Om)) * math.sqrt((U * U_42_))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(l_m * Float64(Float64(n * Float64(sqrt(2.0) / Om)) * sqrt(Float64(U * U_42_)))); 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)) * (U_42_ - U); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = l_m * ((n * (sqrt(2.0) / Om)) * sqrt((U * U_42_))); 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 * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[(N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{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 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left(\left(n \cdot \frac{\sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}\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.5%
Simplified40.7%
Taylor expanded in Om around inf 40.7%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 69.6%
Simplified73.9%
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%
Simplified7.8%
Taylor expanded in U* around inf 17.8%
associate-/l*17.8%
Simplified17.8%
pow117.8%
associate-*l*19.9%
associate-/l*20.0%
Applied egg-rr20.0%
Final simplification60.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)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_2 0.0)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(* (* l_m (/ n Om)) (sqrt (* U (* 2.0 U*))))))))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)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
}
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)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * (n / Om)) * Math.sqrt((U * (2.0 * U_42_)));
}
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)) * (U_42_ - U) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = (l_m * (n / Om)) * math.sqrt((U * (2.0 * U_42_))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(l_m * Float64(n / Om)) * sqrt(Float64(U * Float64(2.0 * U_42_)))); 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)) * (U_42_ - U); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_))); 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 * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - 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[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{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 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot \left(2 \cdot U*\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.5%
Simplified40.7%
Taylor expanded in Om around inf 40.7%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 69.6%
Simplified73.9%
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%
Simplified7.8%
Taylor expanded in U around 0 3.4%
associate-/l*1.0%
unpow21.0%
unpow21.0%
times-frac8.2%
unpow28.2%
neg-mul-18.2%
distribute-lft-neg-out8.2%
*-commutative8.2%
Simplified8.2%
add-cube-cbrt8.1%
pow38.1%
Applied egg-rr8.1%
Taylor expanded in n around inf 17.7%
associate-/l*17.7%
rem-cube-cbrt17.8%
*-commutative17.8%
Simplified17.8%
Final simplification60.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* l_m (/ l_m Om)))
(t_2 (pow (/ l_m Om) 2.0))
(t_3 (* (* n t_2) (- U* U)))
(t_4 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_3))))
(if (<= t_4 0.0)
(sqrt (* (* 2.0 n) (* U (- t (fma 2.0 t_1 (* (* t_2 U*) (- n)))))))
(if (<= t_4 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_3 (* 2.0 t_1)))))
(pow
(*
(pow (* -2.0 (* U (/ n Om))) 0.16666666666666666)
(cbrt (* l_m (sqrt 2.0))))
3.0)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = l_m * (l_m / Om);
double t_2 = pow((l_m / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_3);
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - fma(2.0, t_1, ((t_2 * U_42_) * -n))))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_3 - (2.0 * t_1)))));
} else {
tmp = pow((pow((-2.0 * (U * (n / Om))), 0.16666666666666666) * cbrt((l_m * sqrt(2.0)))), 3.0);
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(l_m * Float64(l_m / Om)) t_2 = Float64(l_m / Om) ^ 2.0 t_3 = Float64(Float64(n * t_2) * Float64(U_42_ - U)) t_4 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_3)) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, t_1, Float64(Float64(t_2 * U_42_) * Float64(-n))))))); elseif (t_4 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_3 - Float64(2.0 * t_1))))); else tmp = Float64((Float64(-2.0 * Float64(U * Float64(n / Om))) ^ 0.16666666666666666) * cbrt(Float64(l_m * sqrt(2.0)))) ^ 3.0; end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(n * t$95$2), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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] + t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1 + N[(N[(t$95$2 * U$42$), $MachinePrecision] * (-n)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$3 - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[Power[N[(-2.0 * N[(U * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Power[N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := l\_m \cdot \frac{l\_m}{Om}\\
t_2 := {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_3 := \left(n \cdot t\_2\right) \cdot \left(U* - U\right)\\
t_4 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_3\right)\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, \left(t\_2 \cdot U*\right) \cdot \left(-n\right)\right)\right)\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_3 - 2 \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(-2 \cdot \left(U \cdot \frac{n}{Om}\right)\right)}^{0.16666666666666666} \cdot \sqrt[3]{l\_m \cdot \sqrt{2}}\right)}^{3}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 9.9%
Simplified40.7%
Taylor expanded in U around 0 32.5%
associate-/l*32.5%
unpow232.5%
unpow232.5%
times-frac40.7%
unpow240.7%
neg-mul-140.7%
distribute-lft-neg-out40.7%
*-commutative40.7%
Simplified40.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 69.6%
Simplified73.9%
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%
Simplified3.6%
Taylor expanded in Om around inf 16.4%
add-cube-cbrt16.2%
pow316.2%
associate-*l*16.2%
+-commutative16.2%
fma-define16.2%
associate-/l*7.0%
Applied egg-rr7.0%
Taylor expanded in t around 0 8.2%
associate-*r/8.2%
associate-/l*18.6%
Simplified18.6%
Final simplification60.7%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* l_m (/ l_m Om)))
(t_2 (pow (/ l_m Om) 2.0))
(t_3 (* (* n t_2) (- U* U)))
(t_4 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_3))))
(if (<= t_4 0.0)
(sqrt (* (* 2.0 n) (* U (- t (fma 2.0 t_1 (* (* t_2 U*) (- n)))))))
(if (<= t_4 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_3 (* 2.0 t_1)))))
(sqrt
(*
(* U -2.0)
(*
(+ (/ 2.0 Om) (/ (* n (- U U*)) (pow Om 2.0)))
(* n (pow l_m 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 = l_m * (l_m / Om);
double t_2 = pow((l_m / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_3);
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - fma(2.0, t_1, ((t_2 * U_42_) * -n))))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_3 - (2.0 * t_1)))));
} else {
tmp = sqrt(((U * -2.0) * (((2.0 / Om) + ((n * (U - U_42_)) / pow(Om, 2.0))) * (n * pow(l_m, 2.0)))));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(l_m * Float64(l_m / Om)) t_2 = Float64(l_m / Om) ^ 2.0 t_3 = Float64(Float64(n * t_2) * Float64(U_42_ - U)) t_4 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_3)) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, t_1, Float64(Float64(t_2 * U_42_) * Float64(-n))))))); elseif (t_4 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_3 - Float64(2.0 * t_1))))); else tmp = sqrt(Float64(Float64(U * -2.0) * Float64(Float64(Float64(2.0 / Om) + Float64(Float64(n * Float64(U - U_42_)) / (Om ^ 2.0))) * Float64(n * (l_m ^ 2.0))))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(n * t$95$2), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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] + t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1 + N[(N[(t$95$2 * U$42$), $MachinePrecision] * (-n)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$3 - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * -2.0), $MachinePrecision] * N[(N[(N[(2.0 / Om), $MachinePrecision] + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := l\_m \cdot \frac{l\_m}{Om}\\
t_2 := {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_3 := \left(n \cdot t\_2\right) \cdot \left(U* - U\right)\\
t_4 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_3\right)\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, \left(t\_2 \cdot U*\right) \cdot \left(-n\right)\right)\right)\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_3 - 2 \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left(\left(\frac{2}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right) \cdot \left(n \cdot {l\_m}^{2}\right)\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 9.9%
Simplified40.7%
Taylor expanded in U around 0 32.5%
associate-/l*32.5%
unpow232.5%
unpow232.5%
times-frac40.7%
unpow240.7%
neg-mul-140.7%
distribute-lft-neg-out40.7%
*-commutative40.7%
Simplified40.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 69.6%
Simplified73.9%
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%
Simplified0.5%
Taylor expanded in l around inf 36.0%
associate-*r*36.0%
associate-*r*36.4%
*-commutative36.4%
associate-*r/36.4%
metadata-eval36.4%
Simplified36.4%
Final simplification63.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 (fabs (* U (* n t)))))))
(if (<= t -1.25e-148)
t_1
(if (<= t 1.55e-298)
(sqrt (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)))
(if (<= t 2.9e-117) (* (sqrt (* 2.0 (* n U))) (sqrt t)) t_1)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((2.0 * fabs((U * (n * t)))));
double tmp;
if (t <= -1.25e-148) {
tmp = t_1;
} else if (t <= 1.55e-298) {
tmp = sqrt((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)));
} else if (t <= 2.9e-117) {
tmp = sqrt((2.0 * (n * U))) * sqrt(t);
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = sqrt((2.0d0 * abs((u * (n * t)))))
if (t <= (-1.25d-148)) then
tmp = t_1
else if (t <= 1.55d-298) then
tmp = sqrt(((-4.0d0) * ((u * (n * (l_m ** 2.0d0))) / om)))
else if (t <= 2.9d-117) then
tmp = sqrt((2.0d0 * (n * u))) * sqrt(t)
else
tmp = t_1
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 t_1 = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
double tmp;
if (t <= -1.25e-148) {
tmp = t_1;
} else if (t <= 1.55e-298) {
tmp = Math.sqrt((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)));
} else if (t <= 2.9e-117) {
tmp = Math.sqrt((2.0 * (n * U))) * Math.sqrt(t);
} else {
tmp = t_1;
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((2.0 * math.fabs((U * (n * t))))) tmp = 0 if t <= -1.25e-148: tmp = t_1 elif t <= 1.55e-298: tmp = math.sqrt((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om))) elif t <= 2.9e-117: tmp = math.sqrt((2.0 * (n * U))) * math.sqrt(t) else: tmp = t_1 return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t))))) tmp = 0.0 if (t <= -1.25e-148) tmp = t_1; elseif (t <= 1.55e-298) tmp = sqrt(Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om))); elseif (t <= 2.9e-117) tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(t)); else tmp = t_1; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((2.0 * abs((U * (n * t))))); tmp = 0.0; if (t <= -1.25e-148) tmp = t_1; elseif (t <= 1.55e-298) tmp = sqrt((-4.0 * ((U * (n * (l_m ^ 2.0))) / Om))); elseif (t <= 2.9e-117) tmp = sqrt((2.0 * (n * U))) * sqrt(t); else tmp = t_1; 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[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.25e-148], t$95$1, If[LessEqual[t, 1.55e-298], N[Sqrt[N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 2.9e-117], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{-148}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-298}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-117}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.25e-148 or 2.9000000000000001e-117 < t Initial program 57.6%
Simplified61.3%
Taylor expanded in t around inf 50.9%
associate-*r*49.2%
add-sqr-sqrt49.0%
pow1/249.0%
pow1/251.3%
pow-prod-down34.8%
pow234.8%
associate-*r*35.2%
Applied egg-rr35.2%
unpow1/235.2%
unpow235.2%
rem-sqrt-square53.9%
Simplified53.9%
if -1.25e-148 < t < 1.5500000000000001e-298Initial program 32.3%
Simplified37.4%
Taylor expanded in Om around inf 35.4%
Taylor expanded in l around inf 30.6%
if 1.5500000000000001e-298 < t < 2.9000000000000001e-117Initial program 35.0%
Simplified37.9%
Taylor expanded in t around inf 12.2%
pow1/212.3%
associate-*r*17.3%
unpow-prod-down36.7%
pow1/236.7%
associate-*l*36.7%
pow1/236.7%
Applied egg-rr36.7%
Final simplification47.7%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 (fabs (* U (* n t)))))))
(if (<= t -3.4e-142)
t_1
(if (<= t 4.8e-297)
(sqrt (* -4.0 (* U (/ (* n (pow l_m 2.0)) Om))))
(if (<= t 1.1e-116) (* (sqrt (* 2.0 (* n U))) (sqrt t)) t_1)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((2.0 * fabs((U * (n * t)))));
double tmp;
if (t <= -3.4e-142) {
tmp = t_1;
} else if (t <= 4.8e-297) {
tmp = sqrt((-4.0 * (U * ((n * pow(l_m, 2.0)) / Om))));
} else if (t <= 1.1e-116) {
tmp = sqrt((2.0 * (n * U))) * sqrt(t);
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = sqrt((2.0d0 * abs((u * (n * t)))))
if (t <= (-3.4d-142)) then
tmp = t_1
else if (t <= 4.8d-297) then
tmp = sqrt(((-4.0d0) * (u * ((n * (l_m ** 2.0d0)) / om))))
else if (t <= 1.1d-116) then
tmp = sqrt((2.0d0 * (n * u))) * sqrt(t)
else
tmp = t_1
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 t_1 = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
double tmp;
if (t <= -3.4e-142) {
tmp = t_1;
} else if (t <= 4.8e-297) {
tmp = Math.sqrt((-4.0 * (U * ((n * Math.pow(l_m, 2.0)) / Om))));
} else if (t <= 1.1e-116) {
tmp = Math.sqrt((2.0 * (n * U))) * Math.sqrt(t);
} else {
tmp = t_1;
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((2.0 * math.fabs((U * (n * t))))) tmp = 0 if t <= -3.4e-142: tmp = t_1 elif t <= 4.8e-297: tmp = math.sqrt((-4.0 * (U * ((n * math.pow(l_m, 2.0)) / Om)))) elif t <= 1.1e-116: tmp = math.sqrt((2.0 * (n * U))) * math.sqrt(t) else: tmp = t_1 return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t))))) tmp = 0.0 if (t <= -3.4e-142) tmp = t_1; elseif (t <= 4.8e-297) tmp = sqrt(Float64(-4.0 * Float64(U * Float64(Float64(n * (l_m ^ 2.0)) / Om)))); elseif (t <= 1.1e-116) tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(t)); else tmp = t_1; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((2.0 * abs((U * (n * t))))); tmp = 0.0; if (t <= -3.4e-142) tmp = t_1; elseif (t <= 4.8e-297) tmp = sqrt((-4.0 * (U * ((n * (l_m ^ 2.0)) / Om)))); elseif (t <= 1.1e-116) tmp = sqrt((2.0 * (n * U))) * sqrt(t); else tmp = t_1; 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[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -3.4e-142], t$95$1, If[LessEqual[t, 4.8e-297], N[Sqrt[N[(-4.0 * N[(U * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.1e-116], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-297}:\\
\;\;\;\;\sqrt{-4 \cdot \left(U \cdot \frac{n \cdot {l\_m}^{2}}{Om}\right)}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-116}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.40000000000000029e-142 or 1.10000000000000005e-116 < t Initial program 57.4%
Simplified61.1%
Taylor expanded in t around inf 51.2%
associate-*r*48.9%
add-sqr-sqrt48.7%
pow1/248.7%
pow1/251.0%
pow-prod-down35.0%
pow235.0%
associate-*r*35.4%
Applied egg-rr35.4%
unpow1/235.4%
unpow235.4%
rem-sqrt-square54.1%
Simplified54.1%
if -3.40000000000000029e-142 < t < 4.7999999999999999e-297Initial program 34.0%
Simplified38.9%
Taylor expanded in Om around inf 37.0%
Taylor expanded in l around inf 29.9%
associate-/l*29.8%
Simplified29.8%
if 4.7999999999999999e-297 < t < 1.10000000000000005e-116Initial program 35.0%
Simplified37.9%
Taylor expanded in t around inf 12.2%
pow1/212.3%
associate-*r*17.3%
unpow-prod-down36.7%
pow1/236.7%
associate-*l*36.7%
pow1/236.7%
Applied egg-rr36.7%
Final simplification47.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U -410000000.0) (sqrt (fabs (* 2.0 (* t (* n U))))) (sqrt (* (* 2.0 n) (+ (* -2.0 (/ (* U (pow l_m 2.0)) Om)) (* U t))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -410000000.0) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else {
tmp = sqrt(((2.0 * n) * ((-2.0 * ((U * pow(l_m, 2.0)) / Om)) + (U * 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 (u <= (-410000000.0d0)) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else
tmp = sqrt(((2.0d0 * n) * (((-2.0d0) * ((u * (l_m ** 2.0d0)) / om)) + (u * 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 (U <= -410000000.0) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((-2.0 * ((U * Math.pow(l_m, 2.0)) / Om)) + (U * t))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -410000000.0: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) else: tmp = math.sqrt(((2.0 * n) * ((-2.0 * ((U * math.pow(l_m, 2.0)) / Om)) + (U * t)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -410000000.0) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(-2.0 * Float64(Float64(U * (l_m ^ 2.0)) / Om)) + Float64(U * 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 (U <= -410000000.0) tmp = sqrt(abs((2.0 * (t * (n * U))))); else tmp = sqrt(((2.0 * n) * ((-2.0 * ((U * (l_m ^ 2.0)) / Om)) + (U * t)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -410000000.0], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(-2.0 * N[(N[(U * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -410000000:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(-2 \cdot \frac{U \cdot {l\_m}^{2}}{Om} + U \cdot t\right)}\\
\end{array}
\end{array}
if U < -4.1e8Initial program 57.1%
Simplified52.4%
Taylor expanded in t around inf 37.4%
add-sqr-sqrt37.4%
pow1/237.4%
pow1/242.4%
pow-prod-down28.8%
pow228.8%
associate-*l*28.8%
Applied egg-rr28.8%
unpow1/228.8%
unpow228.8%
rem-sqrt-square43.8%
associate-*r*53.6%
Simplified53.6%
if -4.1e8 < U Initial program 49.2%
Simplified54.8%
Taylor expanded in Om around inf 49.6%
Final simplification50.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 3.5e-164) (sqrt (fabs (* 2.0 (* t (* n U))))) (sqrt (* 2.0 (* U (* n (- 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 (l_m <= 3.5e-164) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else {
tmp = sqrt((2.0 * (U * (n * (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 (l_m <= 3.5d-164) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else
tmp = sqrt((2.0d0 * (u * (n * (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 (l_m <= 3.5e-164) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (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 l_m <= 3.5e-164: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) else: tmp = math.sqrt((2.0 * (U * (n * (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 (l_m <= 3.5e-164) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((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 (l_m <= 3.5e-164) tmp = sqrt(abs((2.0 * (t * (n * U))))); else tmp = sqrt((2.0 * (U * (n * (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[l$95$m, 3.5e-164], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $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 3.5 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 3.5e-164Initial program 50.8%
Simplified55.1%
Taylor expanded in t around inf 42.1%
add-sqr-sqrt42.1%
pow1/242.1%
pow1/243.4%
pow-prod-down27.4%
pow227.4%
associate-*l*27.4%
Applied egg-rr27.4%
unpow1/227.4%
unpow227.4%
rem-sqrt-square44.1%
associate-*r*44.3%
Simplified44.3%
if 3.5e-164 < l Initial program 49.7%
Simplified54.0%
Taylor expanded in n around 0 48.7%
Final simplification45.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 1.28e-163)
(sqrt (fabs (* 2.0 (* t (* n U)))))
(if (<= l_m 7e+254)
(sqrt (* 2.0 (fabs (* U (* n t)))))
(* (* l_m (/ n Om)) (sqrt (* U (* 2.0 U*)))))))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 <= 1.28e-163) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else if (l_m <= 7e+254) {
tmp = sqrt((2.0 * fabs((U * (n * t)))));
} else {
tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
}
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 <= 1.28d-163) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else if (l_m <= 7d+254) then
tmp = sqrt((2.0d0 * abs((u * (n * t)))))
else
tmp = (l_m * (n / om)) * sqrt((u * (2.0d0 * u_42)))
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 <= 1.28e-163) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else if (l_m <= 7e+254) {
tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
} else {
tmp = (l_m * (n / Om)) * Math.sqrt((U * (2.0 * U_42_)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.28e-163: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) elif l_m <= 7e+254: tmp = math.sqrt((2.0 * math.fabs((U * (n * t))))) else: tmp = (l_m * (n / Om)) * math.sqrt((U * (2.0 * U_42_))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.28e-163) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); elseif (l_m <= 7e+254) tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t))))); else tmp = Float64(Float64(l_m * Float64(n / Om)) * sqrt(Float64(U * Float64(2.0 * U_42_)))); 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 <= 1.28e-163) tmp = sqrt(abs((2.0 * (t * (n * U))))); elseif (l_m <= 7e+254) tmp = sqrt((2.0 * abs((U * (n * t))))); else tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_))); 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, 1.28e-163], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 7e+254], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.28 \cdot 10^{-163}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{elif}\;l\_m \leq 7 \cdot 10^{+254}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot \left(2 \cdot U*\right)}\\
\end{array}
\end{array}
if l < 1.28e-163Initial program 50.8%
Simplified55.1%
Taylor expanded in t around inf 42.1%
add-sqr-sqrt42.1%
pow1/242.1%
pow1/243.4%
pow-prod-down27.4%
pow227.4%
associate-*l*27.4%
Applied egg-rr27.4%
unpow1/227.4%
unpow227.4%
rem-sqrt-square44.1%
associate-*r*44.3%
Simplified44.3%
if 1.28e-163 < l < 7.00000000000000034e254Initial program 54.1%
Simplified59.2%
Taylor expanded in t around inf 43.1%
associate-*r*39.1%
add-sqr-sqrt38.9%
pow1/238.9%
pow1/241.5%
pow-prod-down31.0%
pow231.0%
associate-*r*31.2%
Applied egg-rr31.2%
unpow1/231.2%
unpow231.2%
rem-sqrt-square46.6%
Simplified46.6%
if 7.00000000000000034e254 < l Initial program 24.0%
Simplified24.2%
Taylor expanded in U around 0 16.7%
associate-/l*16.7%
unpow216.7%
unpow216.7%
times-frac24.8%
unpow224.8%
neg-mul-124.8%
distribute-lft-neg-out24.8%
*-commutative24.8%
Simplified24.8%
add-cube-cbrt24.8%
pow324.8%
Applied egg-rr24.8%
Taylor expanded in n around inf 24.4%
associate-/l*31.5%
rem-cube-cbrt31.4%
*-commutative31.4%
Simplified31.4%
Final simplification44.3%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 5.5e-165)
(sqrt (fabs (* 2.0 (* t (* n U)))))
(if (<= l_m 2.25e+255)
(pow (* (* n t) (* 2.0 U)) 0.5)
(* (* l_m (/ n Om)) (sqrt (* U (* 2.0 U*)))))))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 <= 5.5e-165) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else if (l_m <= 2.25e+255) {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
}
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 <= 5.5d-165) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else if (l_m <= 2.25d+255) then
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
else
tmp = (l_m * (n / om)) * sqrt((u * (2.0d0 * u_42)))
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 <= 5.5e-165) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else if (l_m <= 2.25e+255) {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = (l_m * (n / Om)) * Math.sqrt((U * (2.0 * U_42_)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 5.5e-165: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) elif l_m <= 2.25e+255: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) else: tmp = (l_m * (n / Om)) * math.sqrt((U * (2.0 * U_42_))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 5.5e-165) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); elseif (l_m <= 2.25e+255) tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; else tmp = Float64(Float64(l_m * Float64(n / Om)) * sqrt(Float64(U * Float64(2.0 * U_42_)))); 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 <= 5.5e-165) tmp = sqrt(abs((2.0 * (t * (n * U))))); elseif (l_m <= 2.25e+255) tmp = ((n * t) * (2.0 * U)) ^ 0.5; else tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_))); 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, 5.5e-165], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 2.25e+255], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5.5 \cdot 10^{-165}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{elif}\;l\_m \leq 2.25 \cdot 10^{+255}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot \left(2 \cdot U*\right)}\\
\end{array}
\end{array}
if l < 5.49999999999999969e-165Initial program 50.8%
Simplified55.1%
Taylor expanded in t around inf 42.1%
add-sqr-sqrt42.1%
pow1/242.1%
pow1/243.4%
pow-prod-down27.4%
pow227.4%
associate-*l*27.4%
Applied egg-rr27.4%
unpow1/227.4%
unpow227.4%
rem-sqrt-square44.1%
associate-*r*44.3%
Simplified44.3%
if 5.49999999999999969e-165 < l < 2.24999999999999982e255Initial program 54.1%
Simplified59.2%
Taylor expanded in t around inf 43.1%
pow1/245.7%
associate-*r*45.7%
Applied egg-rr45.7%
if 2.24999999999999982e255 < l Initial program 24.0%
Simplified24.2%
Taylor expanded in U around 0 16.7%
associate-/l*16.7%
unpow216.7%
unpow216.7%
times-frac24.8%
unpow224.8%
neg-mul-124.8%
distribute-lft-neg-out24.8%
*-commutative24.8%
Simplified24.8%
add-cube-cbrt24.8%
pow324.8%
Applied egg-rr24.8%
Taylor expanded in n around inf 24.4%
associate-/l*31.5%
rem-cube-cbrt31.4%
*-commutative31.4%
Simplified31.4%
Final simplification44.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 6.4e-165)
(sqrt (* 2.0 (* t (* n U))))
(if (<= l_m 1.1e+255)
(pow (* (* n t) (* 2.0 U)) 0.5)
(* (* l_m (/ n Om)) (sqrt (* U (* 2.0 U*)))))))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 <= 6.4e-165) {
tmp = sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 1.1e+255) {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
}
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 <= 6.4d-165) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else if (l_m <= 1.1d+255) then
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
else
tmp = (l_m * (n / om)) * sqrt((u * (2.0d0 * u_42)))
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 <= 6.4e-165) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else if (l_m <= 1.1e+255) {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = (l_m * (n / Om)) * Math.sqrt((U * (2.0 * U_42_)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 6.4e-165: tmp = math.sqrt((2.0 * (t * (n * U)))) elif l_m <= 1.1e+255: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) else: tmp = (l_m * (n / Om)) * math.sqrt((U * (2.0 * U_42_))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 6.4e-165) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); elseif (l_m <= 1.1e+255) tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; else tmp = Float64(Float64(l_m * Float64(n / Om)) * sqrt(Float64(U * Float64(2.0 * U_42_)))); 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 <= 6.4e-165) tmp = sqrt((2.0 * (t * (n * U)))); elseif (l_m <= 1.1e+255) tmp = ((n * t) * (2.0 * U)) ^ 0.5; else tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_))); 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, 6.4e-165], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.1e+255], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 6.4 \cdot 10^{-165}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{elif}\;l\_m \leq 1.1 \cdot 10^{+255}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot \left(2 \cdot U*\right)}\\
\end{array}
\end{array}
if l < 6.40000000000000026e-165Initial program 50.8%
Simplified54.4%
Taylor expanded in t around inf 40.6%
associate-*r*41.8%
Simplified41.8%
if 6.40000000000000026e-165 < l < 1.10000000000000001e255Initial program 54.1%
Simplified59.2%
Taylor expanded in t around inf 43.1%
pow1/245.7%
associate-*r*45.7%
Applied egg-rr45.7%
if 1.10000000000000001e255 < l Initial program 24.0%
Simplified24.2%
Taylor expanded in U around 0 16.7%
associate-/l*16.7%
unpow216.7%
unpow216.7%
times-frac24.8%
unpow224.8%
neg-mul-124.8%
distribute-lft-neg-out24.8%
*-commutative24.8%
Simplified24.8%
add-cube-cbrt24.8%
pow324.8%
Applied egg-rr24.8%
Taylor expanded in n around inf 24.4%
associate-/l*31.5%
rem-cube-cbrt31.4%
*-commutative31.4%
Simplified31.4%
Final simplification42.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 4.7e-164) (sqrt (* 2.0 (* t (* n U)))) (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 (l_m <= 4.7e-164) {
tmp = sqrt((2.0 * (t * (n * U))));
} 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 (l_m <= 4.7d-164) then
tmp = sqrt((2.0d0 * (t * (n * u))))
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 (l_m <= 4.7e-164) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} 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 l_m <= 4.7e-164: tmp = math.sqrt((2.0 * (t * (n * U)))) 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 (l_m <= 4.7e-164) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = Float64(Float64(n * 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 (l_m <= 4.7e-164) tmp = sqrt((2.0 * (t * (n * U)))); 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[l$95$m, 4.7e-164], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 4.7 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 4.6999999999999997e-164Initial program 50.8%
Simplified54.4%
Taylor expanded in t around inf 40.6%
associate-*r*41.8%
Simplified41.8%
if 4.6999999999999997e-164 < l Initial program 49.7%
Simplified54.0%
Taylor expanded in t around inf 37.0%
pow1/239.3%
associate-*r*39.3%
Applied egg-rr39.3%
Final simplification40.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 2e-164) (sqrt (* 2.0 (* t (* n U)))) (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_) {
double tmp;
if (l_m <= 2e-164) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt((2.0 * (U * (n * 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 (l_m <= 2d-164) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt((2.0d0 * (u * (n * 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 (l_m <= 2e-164) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 2e-164: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 2e-164) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * 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 (l_m <= 2e-164) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt((2.0 * (U * (n * t)))); 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, 2e-164], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 1.99999999999999992e-164Initial program 50.8%
Simplified54.4%
Taylor expanded in t around inf 40.6%
associate-*r*41.8%
Simplified41.8%
if 1.99999999999999992e-164 < l Initial program 49.7%
Simplified54.0%
Taylor expanded in t around inf 37.0%
Final simplification40.2%
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 50.4%
Simplified54.3%
Taylor expanded in t around inf 39.3%
herbie shell --seed 2024114
(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*))))))