
(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 16 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 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(if (<= t_2 4e-322)
(exp (* (- (log (* t (* U -2.0))) (log (/ -1.0 n))) 0.5))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
l_m
(sqrt
(+
(* -4.0 (/ (* n U) Om))
(*
2.0
(*
U
(* (pow n 2.0) (- (/ U* (pow Om 2.0)) (/ U (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 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_2 <= 4e-322) {
tmp = exp(((log((t * (U * -2.0))) - log((-1.0 / n))) * 0.5));
} 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 * sqrt(((-4.0 * ((n * U) / Om)) + (2.0 * (U * (pow(n, 2.0) * ((U_42_ / pow(Om, 2.0)) - (U / 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 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_2 <= 4e-322) {
tmp = Math.exp(((Math.log((t * (U * -2.0))) - Math.log((-1.0 / n))) * 0.5));
} 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 * Math.sqrt(((-4.0 * ((n * U) / Om)) + (2.0 * (U * (Math.pow(n, 2.0) * ((U_42_ / Math.pow(Om, 2.0)) - (U / 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 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) tmp = 0 if t_2 <= 4e-322: tmp = math.exp(((math.log((t * (U * -2.0))) - math.log((-1.0 / n))) * 0.5)) 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 * math.sqrt(((-4.0 * ((n * U) / Om)) + (2.0 * (U * (math.pow(n, 2.0) * ((U_42_ / math.pow(Om, 2.0)) - (U / 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 = 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 <= 4e-322) tmp = exp(Float64(Float64(log(Float64(t * Float64(U * -2.0))) - log(Float64(-1.0 / n))) * 0.5)); 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 * sqrt(Float64(Float64(-4.0 * Float64(Float64(n * U) / Om)) + Float64(2.0 * Float64(U * Float64((n ^ 2.0) * Float64(Float64(U_42_ / (Om ^ 2.0)) - Float64(U / (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 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); tmp = 0.0; if (t_2 <= 4e-322) tmp = exp(((log((t * (U * -2.0))) - log((-1.0 / n))) * 0.5)); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = l_m * sqrt(((-4.0 * ((n * U) / Om)) + (2.0 * (U * ((n ^ 2.0) * ((U_42_ / (Om ^ 2.0)) - (U / (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[(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]}, If[LessEqual[t$95$2, 4e-322], N[Exp[N[(N[(N[Log[N[(t * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[Log[N[(-1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $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[Sqrt[N[(N[(-4.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(U * N[(N[Power[n, 2.0], $MachinePrecision] * N[(N[(U$42$ / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(U / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := \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 4 \cdot 10^{-322}:\\
\;\;\;\;e^{\left(\log \left(t \cdot \left(U \cdot -2\right)\right) - \log \left(\frac{-1}{n}\right)\right) \cdot 0.5}\\
\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 \sqrt{-4 \cdot \frac{n \cdot U}{Om} + 2 \cdot \left(U \cdot \left({n}^{2} \cdot \left(\frac{U*}{{Om}^{2}} - \frac{U}{{Om}^{2}}\right)\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*)))) < 4.00193e-322Initial program 8.1%
Simplified28.4%
Taylor expanded in t around inf 25.7%
pow1/225.9%
pow-to-exp24.6%
associate-*r*24.9%
Applied egg-rr24.9%
Taylor expanded in n around -inf 44.2%
mul-1-neg44.2%
unsub-neg44.2%
associate-*r*44.2%
Simplified44.2%
if 4.00193e-322 < (*.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.2%
Simplified74.0%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified10.3%
Applied egg-rr0.0%
Taylor expanded in l around inf 15.8%
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 2e-161)
(exp (* (- (log (* t (* U -2.0))) (log (/ -1.0 n))) 0.5))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(sqrt
(fabs (* 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 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 <= 2e-161) {
tmp = exp(((log((t * (U * -2.0))) - log((-1.0 / n))) * 0.5));
} 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(fabs((2.0 * (U * (n * (t + ((-2.0 * pow(l_m, 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)) * (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 <= 2e-161) {
tmp = Math.exp(((Math.log((t * (U * -2.0))) - Math.log((-1.0 / n))) * 0.5));
} 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(Math.abs((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_): 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 <= 2e-161: tmp = math.exp(((math.log((t * (U * -2.0))) - math.log((-1.0 / n))) * 0.5)) 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(math.fabs((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_) 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 <= 2e-161) tmp = exp(Float64(Float64(log(Float64(t * Float64(U * -2.0))) - log(Float64(-1.0 / n))) * 0.5)); 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(abs(Float64(2.0 * Float64(U * Float64(n * 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_) 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 <= 2e-161) tmp = exp(((log((t * (U * -2.0))) - log((-1.0 / n))) * 0.5)); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt(abs((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$_] := 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, 2e-161], N[Exp[N[(N[(N[Log[N[(t * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[Log[N[(-1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $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[Abs[N[(2.0 * N[(U * N[(n * N[(t + N[(N[(-2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $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 2 \cdot 10^{-161}:\\
\;\;\;\;e^{\left(\log \left(t \cdot \left(U \cdot -2\right)\right) - \log \left(\frac{-1}{n}\right)\right) \cdot 0.5}\\
\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 \left(U \cdot \left(n \cdot \left(t + \frac{-2 \cdot {l\_m}^{2}}{Om}\right)\right)\right)\right|}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 2.00000000000000006e-161Initial program 9.8%
Simplified30.6%
Taylor expanded in t around inf 23.7%
pow1/223.7%
pow-to-exp22.9%
associate-*r*23.3%
Applied egg-rr23.3%
Taylor expanded in n around -inf 44.1%
mul-1-neg44.1%
unsub-neg44.1%
associate-*r*44.1%
Simplified44.1%
if 2.00000000000000006e-161 < (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.2%
Simplified74.0%
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%
Simplified11.2%
Taylor expanded in n around 0 8.3%
associate-*r/8.3%
Simplified8.3%
add-sqr-sqrt8.3%
pow1/28.3%
pow1/224.8%
pow-prod-down25.0%
pow225.0%
associate-*r*20.0%
associate-*r*20.0%
associate-/l*20.0%
Applied egg-rr20.0%
unpow1/220.0%
unpow220.0%
rem-sqrt-square22.1%
associate-*l*22.1%
*-commutative22.1%
associate-*r*27.1%
cancel-sign-sub-inv27.1%
metadata-eval27.1%
associate-*r/27.1%
Simplified27.1%
Final simplification62.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 2e-161)
(exp (* (- (log (* t (* U -2.0))) (log (/ -1.0 n))) 0.5))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ (pow l_m 2.0) Om))))) 0.5)))))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 <= 2e-161) {
tmp = exp(((log((t * (U * -2.0))) - log((-1.0 / n))) * 0.5));
} 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((2.0 * ((n * U) * (t + (-2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
}
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 <= 2e-161) {
tmp = Math.exp(((Math.log((t * (U * -2.0))) - Math.log((-1.0 / n))) * 0.5));
} 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((2.0 * ((n * U) * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
}
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 <= 2e-161: tmp = math.exp(((math.log((t * (U * -2.0))) - math.log((-1.0 / n))) * 0.5)) 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.pow((2.0 * ((n * U) * (t + (-2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5) 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 <= 2e-161) tmp = exp(Float64(Float64(log(Float64(t * Float64(U * -2.0))) - log(Float64(-1.0 / n))) * 0.5)); 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(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5; 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 <= 2e-161) tmp = exp(((log((t * (U * -2.0))) - log((-1.0 / n))) * 0.5)); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = (2.0 * ((n * U) * (t + (-2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5; 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, 2e-161], N[Exp[N[(N[(N[Log[N[(t * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[Log[N[(-1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $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[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $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 2 \cdot 10^{-161}:\\
\;\;\;\;e^{\left(\log \left(t \cdot \left(U \cdot -2\right)\right) - \log \left(\frac{-1}{n}\right)\right) \cdot 0.5}\\
\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(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\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*))))) < 2.00000000000000006e-161Initial program 9.8%
Simplified30.6%
Taylor expanded in t around inf 23.7%
pow1/223.7%
pow-to-exp22.9%
associate-*r*23.3%
Applied egg-rr23.3%
Taylor expanded in n around -inf 44.1%
mul-1-neg44.1%
unsub-neg44.1%
associate-*r*44.1%
Simplified44.1%
if 2.00000000000000006e-161 < (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.2%
Simplified74.0%
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%
Simplified11.2%
Taylor expanded in n around 0 10.3%
associate-*r/10.3%
Simplified10.3%
pow1/226.8%
Applied egg-rr22.1%
Final simplification61.1%
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 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(if (<= t_2 4e-322)
(exp (* (- (log (* t (* U -2.0))) (log (/ -1.0 n))) 0.5))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(sqrt
(*
(* U -2.0)
(*
(pow l_m 2.0)
(* n (- (/ 2.0 Om) (* n (/ (- U* U) (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 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_2 <= 4e-322) {
tmp = exp(((log((t * (U * -2.0))) - log((-1.0 / n))) * 0.5));
} 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) * (pow(l_m, 2.0) * (n * ((2.0 / Om) - (n * ((U_42_ - U) / 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 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_2 <= 4e-322) {
tmp = Math.exp(((Math.log((t * (U * -2.0))) - Math.log((-1.0 / n))) * 0.5));
} 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) * (Math.pow(l_m, 2.0) * (n * ((2.0 / Om) - (n * ((U_42_ - U) / 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 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) tmp = 0 if t_2 <= 4e-322: tmp = math.exp(((math.log((t * (U * -2.0))) - math.log((-1.0 / n))) * 0.5)) 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) * (math.pow(l_m, 2.0) * (n * ((2.0 / Om) - (n * ((U_42_ - U) / 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 = 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 <= 4e-322) tmp = exp(Float64(Float64(log(Float64(t * Float64(U * -2.0))) - log(Float64(-1.0 / n))) * 0.5)); 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((l_m ^ 2.0) * Float64(n * Float64(Float64(2.0 / Om) - Float64(n * Float64(Float64(U_42_ - U) / (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 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); tmp = 0.0; if (t_2 <= 4e-322) tmp = exp(((log((t * (U * -2.0))) - log((-1.0 / n))) * 0.5)); 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) * ((l_m ^ 2.0) * (n * ((2.0 / Om) - (n * ((U_42_ - U) / (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[(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]}, If[LessEqual[t$95$2, 4e-322], N[Exp[N[(N[(N[Log[N[(t * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[Log[N[(-1.0 / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $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[Power[l$95$m, 2.0], $MachinePrecision] * N[(n * N[(N[(2.0 / Om), $MachinePrecision] - N[(n * N[(N[(U$42$ - U), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := \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 4 \cdot 10^{-322}:\\
\;\;\;\;e^{\left(\log \left(t \cdot \left(U \cdot -2\right)\right) - \log \left(\frac{-1}{n}\right)\right) \cdot 0.5}\\
\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({l\_m}^{2} \cdot \left(n \cdot \left(\frac{2}{Om} - n \cdot \frac{U* - U}{{Om}^{2}}\right)\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*)))) < 4.00193e-322Initial program 8.1%
Simplified28.4%
Taylor expanded in t around inf 25.7%
pow1/225.9%
pow-to-exp24.6%
associate-*r*24.9%
Applied egg-rr24.9%
Taylor expanded in n around -inf 44.2%
mul-1-neg44.2%
unsub-neg44.2%
associate-*r*44.2%
Simplified44.2%
if 4.00193e-322 < (*.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.2%
Simplified74.0%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified10.3%
Taylor expanded in l around inf 29.6%
associate-*r*29.6%
associate-*r/29.6%
metadata-eval29.6%
associate-/l*27.2%
Simplified27.2%
Final simplification62.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)) (- U* U)))
(t_2 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(if (<= t_2 0.0)
(sqrt (* 2.0 (* U (* n (- 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 = ((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 * (U * (n * (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 = ((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 * (U * (n * (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 = ((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 * (U * (n * (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 = 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(2.0 * Float64(U * Float64(n * Float64(t - Float64(Float64(2.0 * (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(Float64(n * 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 = ((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 * (U * (n * (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[(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]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $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[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $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 := \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{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)\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 \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}\\
\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 7.4%
Simplified28.3%
Taylor expanded in n around 0 33.8%
associate-*r/33.8%
Simplified33.8%
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.0%
Simplified73.7%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified10.3%
Taylor expanded in U* around inf 11.8%
associate-/l*14.0%
Simplified14.0%
Final simplification58.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(sqrt
(*
(* 2.0 (* n U))
(+
t
(- (* n (* (pow (/ l_m Om) 2.0) (- U* U))) (* 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_) {
return sqrt(((2.0 * (n * U)) * (t + ((n * (pow((l_m / Om), 2.0) * (U_42_ - U))) - (2.0 * (l_m * (l_m / Om)))))));
}
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 * (n * u)) * (t + ((n * (((l_m / om) ** 2.0d0) * (u_42 - u))) - (2.0d0 * (l_m * (l_m / om)))))))
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 * (n * U)) * (t + ((n * (Math.pow((l_m / Om), 2.0) * (U_42_ - U))) - (2.0 * (l_m * (l_m / Om)))))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt(((2.0 * (n * U)) * (t + ((n * (math.pow((l_m / Om), 2.0) * (U_42_ - U))) - (2.0 * (l_m * (l_m / Om)))))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * Float64(U_42_ - U))) - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt(((2.0 * (n * U)) * (t + ((n * (((l_m / Om) ^ 2.0) * (U_42_ - U))) - (2.0 * (l_m * (l_m / Om))))))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(n \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right) - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}
\end{array}
Initial program 49.8%
Simplified53.6%
sub-neg53.6%
distribute-lft-in45.0%
Applied egg-rr45.0%
distribute-lft-out53.6%
sub-neg53.6%
associate-*r*53.2%
*-commutative53.2%
Simplified53.2%
Final simplification53.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 5.8e-77) (sqrt (fabs (* t (* 2.0 (* 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 <= 5.8e-77) {
tmp = sqrt(fabs((t * (2.0 * (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 <= 5.8d-77) then
tmp = sqrt(abs((t * (2.0d0 * (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 <= 5.8e-77) {
tmp = Math.sqrt(Math.abs((t * (2.0 * (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 <= 5.8e-77: tmp = math.sqrt(math.fabs((t * (2.0 * (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 <= 5.8e-77) tmp = sqrt(abs(Float64(t * Float64(2.0 * Float64(n * U))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * 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 (l_m <= 5.8e-77) tmp = sqrt(abs((t * (2.0 * (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, 5.8e-77], N[Sqrt[N[Abs[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5.8 \cdot 10^{-77}:\\
\;\;\;\;\sqrt{\left|t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 5.7999999999999997e-77Initial program 54.6%
Simplified54.2%
Taylor expanded in t around inf 33.5%
add-sqr-sqrt33.5%
pow1/233.5%
pow1/235.1%
pow-prod-down24.5%
pow224.5%
associate-*r*24.5%
Applied egg-rr24.5%
unpow1/224.5%
unpow224.5%
rem-sqrt-square36.0%
associate-*r*42.3%
associate-*r*42.3%
Simplified42.3%
if 5.7999999999999997e-77 < l Initial program 38.0%
Simplified48.8%
Taylor expanded in n around 0 38.8%
associate-*r/38.8%
Simplified38.8%
Final simplification41.3%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 4.3e+92) (sqrt (fabs (* t (* 2.0 (* n U))))) (sqrt (/ (* (* U -4.0) (* n (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 <= 4.3e+92) {
tmp = sqrt(fabs((t * (2.0 * (n * U)))));
} else {
tmp = sqrt((((U * -4.0) * (n * 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 <= 4.3d+92) then
tmp = sqrt(abs((t * (2.0d0 * (n * u)))))
else
tmp = sqrt((((u * (-4.0d0)) * (n * (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 <= 4.3e+92) {
tmp = Math.sqrt(Math.abs((t * (2.0 * (n * U)))));
} else {
tmp = Math.sqrt((((U * -4.0) * (n * 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 <= 4.3e+92: tmp = math.sqrt(math.fabs((t * (2.0 * (n * U))))) else: tmp = math.sqrt((((U * -4.0) * (n * 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 <= 4.3e+92) tmp = sqrt(abs(Float64(t * Float64(2.0 * Float64(n * U))))); else tmp = sqrt(Float64(Float64(Float64(U * -4.0) * Float64(n * (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 <= 4.3e+92) tmp = sqrt(abs((t * (2.0 * (n * U))))); else tmp = sqrt((((U * -4.0) * (n * (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, 4.3e+92], N[Sqrt[N[Abs[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * -4.0), $MachinePrecision] * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 4.3 \cdot 10^{+92}:\\
\;\;\;\;\sqrt{\left|t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(U \cdot -4\right) \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}}\\
\end{array}
\end{array}
if l < 4.2999999999999998e92Initial program 54.7%
Simplified53.6%
Taylor expanded in t around inf 33.7%
add-sqr-sqrt33.7%
pow1/233.7%
pow1/235.5%
pow-prod-down24.7%
pow224.7%
associate-*r*24.7%
Applied egg-rr24.7%
unpow1/224.7%
unpow224.7%
rem-sqrt-square36.4%
associate-*r*42.1%
associate-*r*42.1%
Simplified42.1%
if 4.2999999999999998e92 < l Initial program 22.4%
Simplified47.3%
Taylor expanded in n around 0 30.4%
associate-*r/30.4%
Simplified30.4%
Taylor expanded in t around 0 25.4%
associate-*r/25.4%
associate-*r*25.4%
*-commutative25.4%
Simplified25.4%
Final simplification39.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.4e+93) (sqrt (fabs (* t (* 2.0 (* n U))))) (sqrt (* -4.0 (* U (* (pow l_m 2.0) (/ n 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 <= 1.4e+93) {
tmp = sqrt(fabs((t * (2.0 * (n * U)))));
} else {
tmp = sqrt((-4.0 * (U * (pow(l_m, 2.0) * (n / 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 <= 1.4d+93) then
tmp = sqrt(abs((t * (2.0d0 * (n * u)))))
else
tmp = sqrt(((-4.0d0) * (u * ((l_m ** 2.0d0) * (n / 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 <= 1.4e+93) {
tmp = Math.sqrt(Math.abs((t * (2.0 * (n * U)))));
} else {
tmp = Math.sqrt((-4.0 * (U * (Math.pow(l_m, 2.0) * (n / Om)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.4e+93: tmp = math.sqrt(math.fabs((t * (2.0 * (n * U))))) else: tmp = math.sqrt((-4.0 * (U * (math.pow(l_m, 2.0) * (n / Om))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.4e+93) tmp = sqrt(abs(Float64(t * Float64(2.0 * Float64(n * U))))); else tmp = sqrt(Float64(-4.0 * Float64(U * Float64((l_m ^ 2.0) * Float64(n / 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 <= 1.4e+93) tmp = sqrt(abs((t * (2.0 * (n * U))))); else tmp = sqrt((-4.0 * (U * ((l_m ^ 2.0) * (n / 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, 1.4e+93], N[Sqrt[N[Abs[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(U * N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.4 \cdot 10^{+93}:\\
\;\;\;\;\sqrt{\left|t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \left(U \cdot \left({l\_m}^{2} \cdot \frac{n}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 1.39999999999999994e93Initial program 54.7%
Simplified53.6%
Taylor expanded in t around inf 33.7%
add-sqr-sqrt33.7%
pow1/233.7%
pow1/235.5%
pow-prod-down24.7%
pow224.7%
associate-*r*24.7%
Applied egg-rr24.7%
unpow1/224.7%
unpow224.7%
rem-sqrt-square36.4%
associate-*r*42.1%
associate-*r*42.1%
Simplified42.1%
if 1.39999999999999994e93 < l Initial program 22.4%
Simplified47.3%
Taylor expanded in n around 0 30.4%
associate-*r/30.4%
Simplified30.4%
Taylor expanded in t around 0 25.4%
associate-/l*23.0%
associate-*r/17.6%
Simplified17.6%
Final simplification38.3%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (pow (* (* 2.0 (* n U)) (- t (* 2.0 (/ (pow l_m 2.0) Om)))) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return pow(((2.0 * (n * U)) * (t - (2.0 * (pow(l_m, 2.0) / Om)))), 0.5);
}
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 = ((2.0d0 * (n * u)) * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))) ** 0.5d0
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.pow(((2.0 * (n * U)) * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow(((2.0 * (n * U)) * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = ((2.0 * (n * U)) * (t - (2.0 * ((l_m ^ 2.0) / Om)))) ^ 0.5; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}^{0.5}
\end{array}
Initial program 49.8%
Simplified52.6%
Taylor expanded in n around 0 43.2%
associate-*r/43.2%
Simplified43.2%
pow1/246.7%
associate-*r*47.8%
associate-*r*47.8%
associate-/l*47.8%
Applied egg-rr47.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ (pow l_m 2.0) Om))))) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return pow((2.0 * ((n * U) * (t + (-2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
}
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 = (2.0d0 * ((n * u) * (t + ((-2.0d0) * ((l_m ** 2.0d0) / om))))) ** 0.5d0
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.pow((2.0 * ((n * U) * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow((2.0 * ((n * U) * (t + (-2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = (2.0 * ((n * U) * (t + (-2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}
\end{array}
Initial program 49.8%
Simplified52.6%
Taylor expanded in n around 0 42.5%
associate-*r/42.5%
Simplified42.5%
pow1/246.0%
Applied egg-rr47.7%
Final simplification47.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (fabs (* t (* 2.0 (* n U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt(fabs((t * (2.0 * (n * U)))));
}
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(abs((t * (2.0d0 * (n * u)))))
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(Math.abs((t * (2.0 * (n * U)))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt(math.fabs((t * (2.0 * (n * U)))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(abs(Float64(t * Float64(2.0 * Float64(n * U))))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt(abs((t * (2.0 * (n * U))))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[Abs[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left|t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right|}
\end{array}
Initial program 49.8%
Simplified52.6%
Taylor expanded in t around inf 31.3%
add-sqr-sqrt31.3%
pow1/231.3%
pow1/233.4%
pow-prod-down24.0%
pow224.0%
associate-*r*24.0%
Applied egg-rr24.0%
unpow1/224.0%
unpow224.0%
rem-sqrt-square34.2%
associate-*r*37.9%
associate-*r*37.9%
Simplified37.9%
Final simplification37.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 3.5e+19) (sqrt (* t (* n (* 2.0 U)))) (pow (* (* 2.0 U) (* n t)) 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 <= 3.5e+19) {
tmp = sqrt((t * (n * (2.0 * U))));
} else {
tmp = pow(((2.0 * U) * (n * t)), 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 <= 3.5d+19) then
tmp = sqrt((t * (n * (2.0d0 * u))))
else
tmp = ((2.0d0 * u) * (n * t)) ** 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 <= 3.5e+19) {
tmp = Math.sqrt((t * (n * (2.0 * U))));
} else {
tmp = Math.pow(((2.0 * U) * (n * t)), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 3.5e+19: tmp = math.sqrt((t * (n * (2.0 * U)))) else: tmp = math.pow(((2.0 * U) * (n * t)), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 3.5e+19) tmp = sqrt(Float64(t * Float64(n * Float64(2.0 * U)))); else tmp = Float64(Float64(2.0 * U) * Float64(n * t)) ^ 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 <= 3.5e+19) tmp = sqrt((t * (n * (2.0 * U)))); else tmp = ((2.0 * U) * (n * t)) ^ 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, 3.5e+19], N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 3.5 \cdot 10^{+19}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 3.5e19Initial program 54.9%
Simplified54.2%
Taylor expanded in t around inf 35.0%
associate-*r*35.0%
associate-*l*40.2%
*-commutative40.2%
*-commutative40.2%
*-commutative40.2%
Simplified40.2%
if 3.5e19 < l Initial program 29.2%
Simplified46.3%
Taylor expanded in t around inf 16.7%
pow1/220.9%
associate-*r*20.9%
Applied egg-rr20.9%
Final simplification36.3%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 5.6e-64) (sqrt (* t (* n (* 2.0 U)))) (pow (* 2.0 (* n (* U t))) 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 <= 5.6e-64) {
tmp = sqrt((t * (n * (2.0 * U))));
} else {
tmp = pow((2.0 * (n * (U * t))), 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 <= 5.6d-64) then
tmp = sqrt((t * (n * (2.0d0 * u))))
else
tmp = (2.0d0 * (n * (u * t))) ** 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 <= 5.6e-64) {
tmp = Math.sqrt((t * (n * (2.0 * U))));
} else {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 5.6e-64: tmp = math.sqrt((t * (n * (2.0 * U)))) else: tmp = math.pow((2.0 * (n * (U * t))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 5.6e-64) tmp = sqrt(Float64(t * Float64(n * Float64(2.0 * U)))); else tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 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 <= 5.6e-64) tmp = sqrt((t * (n * (2.0 * U)))); else tmp = (2.0 * (n * (U * t))) ^ 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, 5.6e-64], N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5.6 \cdot 10^{-64}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 5.60000000000000008e-64Initial program 54.9%
Simplified53.6%
Taylor expanded in t around inf 34.0%
associate-*r*34.1%
associate-*l*39.2%
*-commutative39.2%
*-commutative39.2%
*-commutative39.2%
Simplified39.2%
if 5.60000000000000008e-64 < l Initial program 36.2%
Simplified50.0%
Taylor expanded in t around inf 24.1%
pow1/227.1%
associate-*l*27.1%
Applied egg-rr27.1%
Final simplification35.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* t (* n (* 2.0 U)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((t * (n * (2.0 * U))));
}
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((t * (n * (2.0d0 * u))))
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((t * (n * (2.0 * U))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((t * (n * (2.0 * U))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(t * Float64(n * Float64(2.0 * U)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((t * (n * (2.0 * U)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}
\end{array}
Initial program 49.8%
Simplified52.6%
Taylor expanded in t around inf 31.3%
associate-*r*31.4%
associate-*l*34.3%
*-commutative34.3%
*-commutative34.3%
*-commutative34.3%
Simplified34.3%
Final simplification34.3%
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 49.8%
Simplified52.6%
Taylor expanded in t around inf 31.3%
herbie shell --seed 2024103
(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*))))))