
(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 18 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 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1))
(t_3 (* (* 2.0 n) U))
(t_4 (sqrt (* t_3 (- t_1 (- (* 2.0 (/ (* l_m l_m) Om)) t))))))
(if (<= t_4 0.0005)
(sqrt (* (* 2.0 n) (* U t_2)))
(if (<= t_4 INFINITY)
(sqrt (* t_3 t_2))
(*
(sqrt (fabs (* U (* n (fma n (/ (- U* U) (pow Om 2.0)) (/ -2.0 Om))))))
(* l_m (sqrt 2.0)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (t - (2.0 * (l_m * (l_m / Om)))) + t_1;
double t_3 = (2.0 * n) * U;
double t_4 = sqrt((t_3 * (t_1 - ((2.0 * ((l_m * l_m) / Om)) - t))));
double tmp;
if (t_4 <= 0.0005) {
tmp = sqrt(((2.0 * n) * (U * t_2)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_3 * t_2));
} else {
tmp = sqrt(fabs((U * (n * fma(n, ((U_42_ - U) / pow(Om, 2.0)), (-2.0 / Om)))))) * (l_m * sqrt(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(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1) t_3 = Float64(Float64(2.0 * n) * U) t_4 = sqrt(Float64(t_3 * Float64(t_1 - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t)))) tmp = 0.0 if (t_4 <= 0.0005) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t_2))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_3 * t_2)); else tmp = Float64(sqrt(abs(Float64(U * Float64(n * fma(n, Float64(Float64(U_42_ - U) / (Om ^ 2.0)), Float64(-2.0 / Om)))))) * Float64(l_m * sqrt(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[(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[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$3 * N[(t$95$1 - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0005], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[Abs[N[(U * N[(n * N[(n * N[(N[(U$42$ - U), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_1\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := \sqrt{t\_3 \cdot \left(t\_1 - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)}\\
\mathbf{if}\;t\_4 \leq 0.0005:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\_2\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(n \cdot \mathsf{fma}\left(n, \frac{U* - U}{{Om}^{2}}, \frac{-2}{Om}\right)\right)\right|} \cdot \left(l\_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 5.0000000000000001e-4Initial program 63.1%
Simplified76.1%
if 5.0000000000000001e-4 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 64.3%
associate-*r/68.8%
*-commutative68.8%
Applied egg-rr68.8%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified7.5%
Taylor expanded in l around inf 25.9%
add-sqr-sqrt25.9%
pow1/225.9%
pow1/226.0%
pow-prod-down26.1%
pow226.1%
associate-*r*26.1%
*-commutative26.1%
associate-/l*26.3%
un-div-inv26.3%
Applied egg-rr26.3%
unpow1/226.3%
unpow226.3%
rem-sqrt-square26.1%
*-commutative26.1%
associate-*l*26.2%
fma-neg26.2%
distribute-neg-frac26.2%
metadata-eval26.2%
Simplified26.2%
Final simplification65.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1))
(t_3 (* (* 2.0 n) U))
(t_4 (sqrt (* t_3 (- t_1 (- (* 2.0 (/ (* l_m l_m) Om)) t))))))
(if (<= t_4 0.0005)
(sqrt (* (* 2.0 n) (* U t_2)))
(if (<= t_4 INFINITY)
(sqrt (* t_3 t_2))
(*
(* l_m (sqrt 2.0))
(sqrt (* U (* n (- (* U* (/ n (pow Om 2.0))) (/ 2.0 Om))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (t - (2.0 * (l_m * (l_m / Om)))) + t_1;
double t_3 = (2.0 * n) * U;
double t_4 = sqrt((t_3 * (t_1 - ((2.0 * ((l_m * l_m) / Om)) - t))));
double tmp;
if (t_4 <= 0.0005) {
tmp = sqrt(((2.0 * n) * (U * t_2)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_3 * t_2));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * ((U_42_ * (n / pow(Om, 2.0))) - (2.0 / Om)))));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (t - (2.0 * (l_m * (l_m / Om)))) + t_1;
double t_3 = (2.0 * n) * U;
double t_4 = Math.sqrt((t_3 * (t_1 - ((2.0 * ((l_m * l_m) / Om)) - t))));
double tmp;
if (t_4 <= 0.0005) {
tmp = Math.sqrt(((2.0 * n) * (U * t_2)));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_3 * t_2));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((U * (n * ((U_42_ * (n / Math.pow(Om, 2.0))) - (2.0 / Om)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = (t - (2.0 * (l_m * (l_m / Om)))) + t_1 t_3 = (2.0 * n) * U t_4 = math.sqrt((t_3 * (t_1 - ((2.0 * ((l_m * l_m) / Om)) - t)))) tmp = 0 if t_4 <= 0.0005: tmp = math.sqrt(((2.0 * n) * (U * t_2))) elif t_4 <= math.inf: tmp = math.sqrt((t_3 * t_2)) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((U * (n * ((U_42_ * (n / math.pow(Om, 2.0))) - (2.0 / Om))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1) t_3 = Float64(Float64(2.0 * n) * U) t_4 = sqrt(Float64(t_3 * Float64(t_1 - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t)))) tmp = 0.0 if (t_4 <= 0.0005) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t_2))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_3 * t_2)); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(U_42_ * Float64(n / (Om ^ 2.0))) - Float64(2.0 / Om)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = (t - (2.0 * (l_m * (l_m / Om)))) + t_1; t_3 = (2.0 * n) * U; t_4 = sqrt((t_3 * (t_1 - ((2.0 * ((l_m * l_m) / Om)) - t)))); tmp = 0.0; if (t_4 <= 0.0005) tmp = sqrt(((2.0 * n) * (U * t_2))); elseif (t_4 <= Inf) tmp = sqrt((t_3 * t_2)); else tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * ((U_42_ * (n / (Om ^ 2.0))) - (2.0 / Om))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$3 * N[(t$95$1 - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0005], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(U$42$ * N[(n / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $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(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_1\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := \sqrt{t\_3 \cdot \left(t\_1 - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)}\\
\mathbf{if}\;t\_4 \leq 0.0005:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\_2\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 5.0000000000000001e-4Initial program 63.1%
Simplified76.1%
if 5.0000000000000001e-4 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 64.3%
associate-*r/68.8%
*-commutative68.8%
Applied egg-rr68.8%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified7.5%
Taylor expanded in l around inf 25.9%
Taylor expanded in U around 0 26.0%
associate-/l*26.2%
associate-*r/26.2%
metadata-eval26.2%
Simplified26.2%
Final simplification65.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_3 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_2))
(t_4 (* t_1 (- t_2 (- (* 2.0 (/ (* l_m l_m) Om)) t)))))
(if (<= t_4 1e-7)
(sqrt (* (* 2.0 n) (* U t_3)))
(if (<= t_4 INFINITY)
(sqrt (* t_1 t_3))
(sqrt
(* (* 2.0 n) (* U (/ (* n (* U* (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 = (2.0 * n) * U;
double t_2 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2;
double t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t));
double tmp;
if (t_4 <= 1e-7) {
tmp = sqrt(((2.0 * n) * (U * t_3)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * t_3));
} else {
tmp = sqrt(((2.0 * n) * (U * ((n * (U_42_ * 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 = (2.0 * n) * U;
double t_2 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2;
double t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t));
double tmp;
if (t_4 <= 1e-7) {
tmp = Math.sqrt(((2.0 * n) * (U * t_3)));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_1 * t_3));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * ((n * (U_42_ * 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 = (2.0 * n) * U t_2 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2 t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t)) tmp = 0 if t_4 <= 1e-7: tmp = math.sqrt(((2.0 * n) * (U * t_3))) elif t_4 <= math.inf: tmp = math.sqrt((t_1 * t_3)) else: tmp = math.sqrt(((2.0 * n) * (U * ((n * (U_42_ * 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(2.0 * n) * U) t_2 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_2) t_4 = Float64(t_1 * Float64(t_2 - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t))) tmp = 0.0 if (t_4 <= 1e-7) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t_3))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_1 * t_3)); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(n * Float64(U_42_ * (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 = (2.0 * n) * U; t_2 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2; t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t)); tmp = 0.0; if (t_4 <= 1e-7) tmp = sqrt(((2.0 * n) * (U * t_3))); elseif (t_4 <= Inf) tmp = sqrt((t_1 * t_3)); else tmp = sqrt(((2.0 * n) * (U * ((n * (U_42_ * (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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * N[(t$95$2 - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 1e-7], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$1 * t$95$3), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(n * N[(U$42$ * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_2\\
t_4 := t\_1 \cdot \left(t\_2 - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)\\
\mathbf{if}\;t\_4 \leq 10^{-7}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\_3\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_1 \cdot t\_3}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \frac{n \cdot \left(U* \cdot {l\_m}^{2}\right)}{{Om}^{2}}\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 9.9999999999999995e-8Initial program 59.5%
Simplified73.1%
if 9.9999999999999995e-8 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < +inf.0Initial program 64.3%
associate-*r/68.8%
*-commutative68.8%
Applied egg-rr68.8%
if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) Initial program 0.0%
Simplified4.6%
Taylor expanded in U* around inf 46.3%
associate-/l*39.2%
associate-*r*39.2%
Simplified39.2%
Final simplification67.2%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_3 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_2))
(t_4 (* t_1 (- t_2 (- (* 2.0 (/ (* l_m l_m) Om)) t)))))
(if (<= t_4 1e-7)
(sqrt (* (* 2.0 n) (* U t_3)))
(if (<= t_4 INFINITY)
(sqrt (* t_1 t_3))
(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 = (2.0 * n) * U;
double t_2 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2;
double t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t));
double tmp;
if (t_4 <= 1e-7) {
tmp = sqrt(((2.0 * n) * (U * t_3)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * t_3));
} 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 = (2.0 * n) * U;
double t_2 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2;
double t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t));
double tmp;
if (t_4 <= 1e-7) {
tmp = Math.sqrt(((2.0 * n) * (U * t_3)));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_1 * t_3));
} 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 = (2.0 * n) * U t_2 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2 t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t)) tmp = 0 if t_4 <= 1e-7: tmp = math.sqrt(((2.0 * n) * (U * t_3))) elif t_4 <= math.inf: tmp = math.sqrt((t_1 * t_3)) 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(2.0 * n) * U) t_2 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_2) t_4 = Float64(t_1 * Float64(t_2 - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t))) tmp = 0.0 if (t_4 <= 1e-7) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t_3))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_1 * t_3)); 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 = (2.0 * n) * U; t_2 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2; t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t)); tmp = 0.0; if (t_4 <= 1e-7) tmp = sqrt(((2.0 * n) * (U * t_3))); elseif (t_4 <= Inf) tmp = sqrt((t_1 * t_3)); 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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * N[(t$95$2 - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 1e-7], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$1 * t$95$3), $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(2 \cdot n\right) \cdot U\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_2\\
t_4 := t\_1 \cdot \left(t\_2 - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)\\
\mathbf{if}\;t\_4 \leq 10^{-7}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\_3\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_1 \cdot t\_3}\\
\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 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 9.9999999999999995e-8Initial program 59.5%
Simplified73.1%
if 9.9999999999999995e-8 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < +inf.0Initial program 64.3%
associate-*r/68.8%
*-commutative68.8%
Applied egg-rr68.8%
if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) Initial program 0.0%
Simplified4.6%
Taylor expanded in U* around inf 46.3%
Final simplification67.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_3 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_2))
(t_4 (* t_1 (- t_2 (- (* 2.0 (/ (* l_m l_m) Om)) t)))))
(if (<= t_4 1e-7)
(sqrt (* (* 2.0 n) (* U t_3)))
(if (<= t_4 INFINITY)
(sqrt (* t_1 t_3))
(pow (* t_1 (+ 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 = (2.0 * n) * U;
double t_2 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2;
double t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t));
double tmp;
if (t_4 <= 1e-7) {
tmp = sqrt(((2.0 * n) * (U * t_3)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * t_3));
} else {
tmp = pow((t_1 * (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 = (2.0 * n) * U;
double t_2 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2;
double t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t));
double tmp;
if (t_4 <= 1e-7) {
tmp = Math.sqrt(((2.0 * n) * (U * t_3)));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_1 * t_3));
} else {
tmp = Math.pow((t_1 * (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 = (2.0 * n) * U t_2 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2 t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t)) tmp = 0 if t_4 <= 1e-7: tmp = math.sqrt(((2.0 * n) * (U * t_3))) elif t_4 <= math.inf: tmp = math.sqrt((t_1 * t_3)) else: tmp = math.pow((t_1 * (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(2.0 * n) * U) t_2 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_2) t_4 = Float64(t_1 * Float64(t_2 - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t))) tmp = 0.0 if (t_4 <= 1e-7) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t_3))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_1 * t_3)); else tmp = Float64(t_1 * 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 = (2.0 * n) * U; t_2 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_3 = (t - (2.0 * (l_m * (l_m / Om)))) + t_2; t_4 = t_1 * (t_2 - ((2.0 * ((l_m * l_m) / Om)) - t)); tmp = 0.0; if (t_4 <= 1e-7) tmp = sqrt(((2.0 * n) * (U * t_3))); elseif (t_4 <= Inf) tmp = sqrt((t_1 * t_3)); else tmp = (t_1 * (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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * N[(t$95$2 - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 1e-7], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$1 * t$95$3), $MachinePrecision]], $MachinePrecision], N[Power[N[(t$95$1 * 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|
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_2\\
t_4 := t\_1 \cdot \left(t\_2 - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)\\
\mathbf{if}\;t\_4 \leq 10^{-7}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\_3\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_1 \cdot t\_3}\\
\mathbf{else}:\\
\;\;\;\;{\left(t\_1 \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 9.9999999999999995e-8Initial program 59.5%
Simplified73.1%
if 9.9999999999999995e-8 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < +inf.0Initial program 64.3%
associate-*r/68.8%
*-commutative68.8%
Applied egg-rr68.8%
if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) Initial program 0.0%
Simplified4.6%
Taylor expanded in n around 0 2.4%
pow1/240.2%
associate-*r*39.0%
cancel-sign-sub-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
Final simplification67.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U 1.25e+157)
(sqrt
(*
(* 2.0 n)
(*
U
(+
(- t (* 2.0 (* l_m (/ l_m Om))))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U))))))
(* (sqrt (* 2.0 (* n t))) (sqrt U))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 1.25e+157) {
tmp = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U))))));
} else {
tmp = sqrt((2.0 * (n * t))) * sqrt(U);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 1.25d+157) then
tmp = sqrt(((2.0d0 * n) * (u * ((t - (2.0d0 * (l_m * (l_m / om)))) + ((n * ((l_m / om) ** 2.0d0)) * (u_42 - u))))))
else
tmp = sqrt((2.0d0 * (n * t))) * sqrt(u)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 1.25e+157) {
tmp = Math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U))))));
} else {
tmp = Math.sqrt((2.0 * (n * t))) * Math.sqrt(U);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= 1.25e+157: tmp = math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)))))) else: tmp = math.sqrt((2.0 * (n * t))) * math.sqrt(U) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= 1.25e+157) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)))))); else tmp = Float64(sqrt(Float64(2.0 * Float64(n * t))) * sqrt(U)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= 1.25e+157) tmp = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U)))))); else tmp = sqrt((2.0 * (n * t))) * sqrt(U); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 1.25e+157], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.25 \cdot 10^{+157}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot t\right)} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < 1.24999999999999994e157Initial program 55.7%
Simplified61.3%
if 1.24999999999999994e157 < U Initial program 57.6%
Simplified48.0%
Taylor expanded in n around 0 48.0%
Taylor expanded in t around inf 49.7%
associate-*r*49.7%
*-commutative49.7%
associate-*l*49.7%
associate-*r*49.7%
*-commutative49.7%
associate-*l*49.7%
Simplified49.7%
*-commutative49.7%
sqrt-prod77.8%
associate-*r*77.8%
*-commutative77.8%
associate-*l*77.8%
Applied egg-rr77.8%
Final simplification62.6%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U -2.9e+119)
(sqrt (fabs (* 2.0 (* t (* n U)))))
(if (<= U 1.3e+157)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(* (sqrt (* 2.0 (* n t))) (sqrt U)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -2.9e+119) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else if (U <= 1.3e+157) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else {
tmp = sqrt((2.0 * (n * t))) * sqrt(U);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= (-2.9d+119)) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else if (u <= 1.3d+157) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else
tmp = sqrt((2.0d0 * (n * t))) * sqrt(u)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -2.9e+119) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else if (U <= 1.3e+157) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else {
tmp = Math.sqrt((2.0 * (n * t))) * Math.sqrt(U);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -2.9e+119: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) elif U <= 1.3e+157: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) else: tmp = math.sqrt((2.0 * (n * t))) * math.sqrt(U) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -2.9e+119) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); elseif (U <= 1.3e+157) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); else tmp = Float64(sqrt(Float64(2.0 * Float64(n * t))) * sqrt(U)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= -2.9e+119) tmp = sqrt(abs((2.0 * (t * (n * U))))); elseif (U <= 1.3e+157) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); else tmp = sqrt((2.0 * (n * t))) * sqrt(U); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -2.9e+119], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 1.3e+157], 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], N[(N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -2.9 \cdot 10^{+119}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{elif}\;U \leq 1.3 \cdot 10^{+157}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot t\right)} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -2.90000000000000007e119Initial program 62.8%
Simplified52.6%
Taylor expanded in n around 0 38.4%
add-sqr-sqrt38.4%
pow1/238.4%
pow1/245.6%
pow-prod-down39.1%
pow239.1%
associate-*r*42.4%
cancel-sign-sub-inv42.4%
metadata-eval42.4%
Applied egg-rr42.4%
unpow1/242.4%
unpow242.4%
rem-sqrt-square55.6%
*-commutative55.6%
associate-*l*48.8%
*-commutative48.8%
+-commutative48.8%
fma-define48.8%
Simplified48.8%
Taylor expanded in l around 0 49.0%
associate-*r*55.8%
associate-*l*55.8%
*-commutative55.8%
associate-*r*55.8%
*-commutative55.8%
associate-*l*55.8%
Simplified55.8%
if -2.90000000000000007e119 < U < 1.30000000000000005e157Initial program 54.7%
Simplified58.3%
Taylor expanded in n around 0 49.7%
if 1.30000000000000005e157 < U Initial program 57.6%
Simplified48.0%
Taylor expanded in n around 0 48.0%
Taylor expanded in t around inf 49.7%
associate-*r*49.7%
*-commutative49.7%
associate-*l*49.7%
associate-*r*49.7%
*-commutative49.7%
associate-*l*49.7%
Simplified49.7%
*-commutative49.7%
sqrt-prod77.8%
associate-*r*77.8%
*-commutative77.8%
associate-*l*77.8%
Applied egg-rr77.8%
Final simplification52.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U -6e+81)
(sqrt (fabs (* 2.0 (* t (* n U)))))
(if (<= U 1.02e+157)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(* (sqrt (* 2.0 (* n t))) (sqrt U)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -6e+81) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else if (U <= 1.02e+157) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else {
tmp = sqrt((2.0 * (n * t))) * sqrt(U);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= (-6d+81)) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else if (u <= 1.02d+157) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))))
else
tmp = sqrt((2.0d0 * (n * t))) * sqrt(u)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -6e+81) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else if (U <= 1.02e+157) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else {
tmp = Math.sqrt((2.0 * (n * t))) * Math.sqrt(U);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -6e+81: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) elif U <= 1.02e+157: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) else: tmp = math.sqrt((2.0 * (n * t))) * math.sqrt(U) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -6e+81) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); elseif (U <= 1.02e+157) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); else tmp = Float64(sqrt(Float64(2.0 * Float64(n * t))) * sqrt(U)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= -6e+81) tmp = sqrt(abs((2.0 * (t * (n * U))))); elseif (U <= 1.02e+157) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); else tmp = sqrt((2.0 * (n * t))) * sqrt(U); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -6e+81], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 1.02e+157], 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], N[(N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -6 \cdot 10^{+81}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{elif}\;U \leq 1.02 \cdot 10^{+157}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot t\right)} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -5.99999999999999995e81Initial program 63.7%
Simplified50.8%
Taylor expanded in n around 0 37.8%
add-sqr-sqrt37.8%
pow1/237.8%
pow1/243.2%
pow-prod-down35.9%
pow235.9%
associate-*r*41.1%
cancel-sign-sub-inv41.1%
metadata-eval41.1%
Applied egg-rr41.1%
unpow1/241.1%
unpow241.1%
rem-sqrt-square56.3%
*-commutative56.3%
associate-*l*51.1%
*-commutative51.1%
+-commutative51.1%
fma-define51.1%
Simplified51.1%
Taylor expanded in l around 0 48.3%
associate-*r*53.5%
associate-*l*53.5%
*-commutative53.5%
associate-*r*53.5%
*-commutative53.5%
associate-*l*53.5%
Simplified53.5%
if -5.99999999999999995e81 < U < 1.02000000000000003e157Initial program 54.2%
Simplified63.3%
Taylor expanded in n around 0 51.9%
if 1.02000000000000003e157 < U Initial program 57.6%
Simplified48.0%
Taylor expanded in n around 0 48.0%
Taylor expanded in t around inf 49.7%
associate-*r*49.7%
*-commutative49.7%
associate-*l*49.7%
associate-*r*49.7%
*-commutative49.7%
associate-*l*49.7%
Simplified49.7%
*-commutative49.7%
sqrt-prod77.8%
associate-*r*77.8%
*-commutative77.8%
associate-*l*77.8%
Applied egg-rr77.8%
Final simplification54.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 4.1e-251)
(* (sqrt 2.0) (sqrt (* t (* n U))))
(if (<= l_m 8.5e+161)
(sqrt (* 2.0 (fabs (* U (* n t)))))
(* (* l_m (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) 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.1e-251) {
tmp = sqrt(2.0) * sqrt((t * (n * U)));
} else if (l_m <= 8.5e+161) {
tmp = sqrt((2.0 * fabs((U * (n * t)))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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.1d-251) then
tmp = sqrt(2.0d0) * sqrt((t * (n * u)))
else if (l_m <= 8.5d+161) then
tmp = sqrt((2.0d0 * abs((u * (n * t)))))
else
tmp = (l_m * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / 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.1e-251) {
tmp = Math.sqrt(2.0) * Math.sqrt((t * (n * U)));
} else if (l_m <= 8.5e+161) {
tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 4.1e-251: tmp = math.sqrt(2.0) * math.sqrt((t * (n * U))) elif l_m <= 8.5e+161: tmp = math.sqrt((2.0 * math.fabs((U * (n * t))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 4.1e-251) tmp = Float64(sqrt(2.0) * sqrt(Float64(t * Float64(n * U)))); elseif (l_m <= 8.5e+161) tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / 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.1e-251) tmp = sqrt(2.0) * sqrt((t * (n * U))); elseif (l_m <= 8.5e+161) tmp = sqrt((2.0 * abs((U * (n * t))))); else tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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.1e-251], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 8.5e+161], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 4.1 \cdot 10^{-251}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{t \cdot \left(n \cdot U\right)}\\
\mathbf{elif}\;l\_m \leq 8.5 \cdot 10^{+161}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 4.0999999999999998e-251Initial program 56.8%
Simplified56.9%
Taylor expanded in l around 0 40.9%
*-commutative40.9%
associate-*r*42.6%
*-commutative42.6%
Simplified42.6%
if 4.0999999999999998e-251 < l < 8.50000000000000007e161Initial program 65.7%
Simplified67.3%
Taylor expanded in l around 0 52.6%
associate-*r*46.0%
*-commutative46.0%
Simplified46.0%
add-sqr-sqrt45.9%
sqrt-unprod37.1%
pow237.1%
associate-*l*34.7%
Applied egg-rr34.7%
unpow234.7%
rem-sqrt-square51.9%
associate-*r*47.8%
*-commutative47.8%
associate-*r*54.4%
Simplified54.4%
if 8.50000000000000007e161 < l Initial program 11.5%
Simplified30.2%
Taylor expanded in l around inf 53.5%
Taylor expanded in n around 0 39.0%
Final simplification46.0%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= t -2.3e+89) (* (sqrt 2.0) (sqrt (* U (* n t)))) (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 tmp;
if (t <= -2.3e+89) {
tmp = sqrt(2.0) * sqrt((U * (n * t)));
} else {
tmp = pow((((2.0 * n) * U) * (t + (-2.0 * (pow(l_m, 2.0) / Om)))), 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 (t <= (-2.3d+89)) then
tmp = sqrt(2.0d0) * sqrt((u * (n * t)))
else
tmp = (((2.0d0 * n) * u) * (t + ((-2.0d0) * ((l_m ** 2.0d0) / om)))) ** 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 (t <= -2.3e+89) {
tmp = Math.sqrt(2.0) * Math.sqrt((U * (n * t)));
} 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_): tmp = 0 if t <= -2.3e+89: tmp = math.sqrt(2.0) * math.sqrt((U * (n * t))) 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_) tmp = 0.0 if (t <= -2.3e+89) tmp = Float64(sqrt(2.0) * sqrt(Float64(U * Float64(n * t)))); else tmp = Float64(Float64(Float64(2.0 * 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_) tmp = 0.0; if (t <= -2.3e+89) tmp = sqrt(2.0) * sqrt((U * (n * t))); 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$_] := If[LessEqual[t, -2.3e+89], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $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|
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+89}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{U \cdot \left(n \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if t < -2.2999999999999999e89Initial program 48.7%
Simplified54.6%
Taylor expanded in l around 0 60.0%
if -2.2999999999999999e89 < t Initial program 57.7%
Simplified61.3%
Taylor expanded in n around 0 49.6%
pow1/256.6%
associate-*r*55.1%
cancel-sign-sub-inv55.1%
metadata-eval55.1%
Applied egg-rr55.1%
Final simplification56.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (or (<= U -2.8e-90) (not (<= U 1.15e-137))) (sqrt (fabs (* 2.0 (* t (* n U))))) (sqrt (* (* 2.0 n) (* 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 <= -2.8e-90) || !(U <= 1.15e-137)) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else {
tmp = sqrt(((2.0 * n) * (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 <= (-2.8d-90)) .or. (.not. (u <= 1.15d-137))) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else
tmp = sqrt(((2.0d0 * n) * (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 <= -2.8e-90) || !(U <= 1.15e-137)) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (U <= -2.8e-90) or not (U <= 1.15e-137): tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) else: tmp = math.sqrt(((2.0 * n) * (U * t))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if ((U <= -2.8e-90) || !(U <= 1.15e-137)) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); else tmp = sqrt(Float64(Float64(2.0 * n) * 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 <= -2.8e-90) || ~((U <= 1.15e-137))) tmp = sqrt(abs((2.0 * (t * (n * U))))); else tmp = sqrt(((2.0 * n) * (U * t))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[Or[LessEqual[U, -2.8e-90], N[Not[LessEqual[U, 1.15e-137]], $MachinePrecision]], 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[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -2.8 \cdot 10^{-90} \lor \neg \left(U \leq 1.15 \cdot 10^{-137}\right):\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\end{array}
\end{array}
if U < -2.7999999999999999e-90 or 1.15000000000000004e-137 < U Initial program 65.0%
Simplified62.9%
Taylor expanded in n around 0 52.7%
add-sqr-sqrt52.7%
pow1/252.7%
pow1/258.7%
pow-prod-down43.0%
pow243.0%
associate-*r*44.1%
cancel-sign-sub-inv44.1%
metadata-eval44.1%
Applied egg-rr44.1%
unpow1/244.1%
unpow244.1%
rem-sqrt-square62.3%
*-commutative62.3%
associate-*l*59.8%
*-commutative59.8%
+-commutative59.8%
fma-define59.8%
Simplified59.8%
Taylor expanded in l around 0 47.1%
associate-*r*49.6%
associate-*l*49.6%
*-commutative49.6%
associate-*r*49.6%
*-commutative49.6%
associate-*l*49.6%
Simplified49.6%
if -2.7999999999999999e-90 < U < 1.15000000000000004e-137Initial program 38.4%
Simplified55.3%
Taylor expanded in t around inf 41.5%
Final simplification46.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U -7.5e-92)
(sqrt (fabs (* 2.0 (* t (* n U)))))
(if (<= U 9e-309)
(sqrt (* (* 2.0 n) (* U t)))
(* (sqrt (* 2.0 U)) (sqrt (* 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 (U <= -7.5e-92) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else if (U <= 9e-309) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = sqrt((2.0 * U)) * sqrt((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 (u <= (-7.5d-92)) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else if (u <= 9d-309) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = sqrt((2.0d0 * u)) * sqrt((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 (U <= -7.5e-92) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else if (U <= 9e-309) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -7.5e-92: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) elif U <= 9e-309: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -7.5e-92) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); elseif (U <= 9e-309) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(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 (U <= -7.5e-92) tmp = sqrt(abs((2.0 * (t * (n * U))))); elseif (U <= 9e-309) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = sqrt((2.0 * U)) * sqrt((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[U, -7.5e-92], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 9e-309], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -7.5 \cdot 10^{-92}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{elif}\;U \leq 9 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\end{array}
\end{array}
if U < -7.5000000000000005e-92Initial program 63.8%
Simplified57.5%
Taylor expanded in n around 0 45.8%
add-sqr-sqrt45.8%
pow1/245.8%
pow1/249.8%
pow-prod-down34.3%
pow234.3%
associate-*r*36.9%
cancel-sign-sub-inv36.9%
metadata-eval36.9%
Applied egg-rr36.9%
unpow1/236.9%
unpow236.9%
rem-sqrt-square56.5%
*-commutative56.5%
associate-*l*54.0%
*-commutative54.0%
+-commutative54.0%
fma-define54.0%
Simplified54.0%
Taylor expanded in l around 0 46.0%
associate-*r*48.6%
associate-*l*48.6%
*-commutative48.6%
associate-*r*48.6%
*-commutative48.6%
associate-*l*48.6%
Simplified48.6%
if -7.5000000000000005e-92 < U < 9.0000000000000021e-309Initial program 37.3%
Simplified55.2%
Taylor expanded in t around inf 39.3%
if 9.0000000000000021e-309 < U Initial program 59.7%
Simplified62.0%
Taylor expanded in l around 0 44.7%
pow1/245.6%
associate-*r*45.6%
unpow-prod-down55.1%
pow1/254.2%
Applied egg-rr54.2%
unpow1/254.2%
Simplified54.2%
Final simplification49.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.55e-248) (* (sqrt 2.0) (sqrt (* t (* n U)))) (sqrt (* 2.0 (fabs (* 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 <= 1.55e-248) {
tmp = sqrt(2.0) * sqrt((t * (n * U)));
} else {
tmp = sqrt((2.0 * fabs((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 <= 1.55d-248) then
tmp = sqrt(2.0d0) * sqrt((t * (n * u)))
else
tmp = sqrt((2.0d0 * abs((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 <= 1.55e-248) {
tmp = Math.sqrt(2.0) * Math.sqrt((t * (n * U)));
} else {
tmp = Math.sqrt((2.0 * Math.abs((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 <= 1.55e-248: tmp = math.sqrt(2.0) * math.sqrt((t * (n * U))) else: tmp = math.sqrt((2.0 * math.fabs((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 <= 1.55e-248) tmp = Float64(sqrt(2.0) * sqrt(Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * abs(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 <= 1.55e-248) tmp = sqrt(2.0) * sqrt((t * (n * U))); else tmp = sqrt((2.0 * abs((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, 1.55e-248], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.55 \cdot 10^{-248}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{t \cdot \left(n \cdot U\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\
\end{array}
\end{array}
if l < 1.5500000000000001e-248Initial program 56.5%
Simplified56.6%
Taylor expanded in l around 0 40.6%
*-commutative40.6%
associate-*r*42.4%
*-commutative42.4%
Simplified42.4%
if 1.5500000000000001e-248 < l Initial program 54.8%
Simplified60.1%
Taylor expanded in l around 0 43.5%
associate-*r*39.2%
*-commutative39.2%
Simplified39.2%
add-sqr-sqrt39.1%
sqrt-unprod34.2%
pow234.2%
associate-*l*32.3%
Applied egg-rr32.3%
unpow232.3%
rem-sqrt-square45.1%
associate-*r*41.9%
*-commutative41.9%
associate-*r*46.2%
Simplified46.2%
Final simplification43.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (fabs (* 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 * fabs((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 * abs((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 * Math.abs((U * (n * t)))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * math.fabs((U * (n * t)))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * abs(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 * abs((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[Abs[N[(U * N[(n * t), $MachinePrecision]), $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 55.8%
Simplified57.9%
Taylor expanded in l around 0 41.5%
associate-*r*40.9%
*-commutative40.9%
Simplified40.9%
add-sqr-sqrt40.8%
sqrt-unprod30.8%
pow230.8%
associate-*l*30.6%
Applied egg-rr30.6%
unpow230.6%
rem-sqrt-square44.1%
associate-*r*43.5%
*-commutative43.5%
associate-*r*43.8%
Simplified43.8%
Final simplification43.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (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_) {
return pow(((n * t) * (2.0 * U)), 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 = ((n * t) * (2.0d0 * u)) ** 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(((n * t) * (2.0 * U)), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow(((n * t) * (2.0 * U)), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = ((n * t) * (2.0 * U)) ^ 0.5; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}
\end{array}
Initial program 55.8%
Simplified57.9%
Taylor expanded in l around 0 41.5%
pow1/243.1%
associate-*r*43.1%
Applied egg-rr43.1%
Final simplification43.1%
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 55.8%
Simplified57.9%
Taylor expanded in l around 0 41.5%
Final simplification41.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* U (* n (* 2.0 t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((U * (n * (2.0 * 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((u * (n * (2.0d0 * 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((U * (n * (2.0 * t))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((U * (n * (2.0 * t))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(U * Float64(n * Float64(2.0 * t)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((U * (n * (2.0 * t)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(U * N[(n * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{U \cdot \left(n \cdot \left(2 \cdot t\right)\right)}
\end{array}
Initial program 55.8%
Simplified60.3%
Taylor expanded in n around 0 49.6%
Taylor expanded in t around inf 41.5%
associate-*r*41.5%
*-commutative41.5%
associate-*l*41.5%
associate-*r*41.5%
*-commutative41.5%
associate-*l*41.5%
Simplified41.5%
Final simplification41.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* 2.0 n) (* U 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 * n) * (U * 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 * n) * (u * 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 * n) * (U * t)));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt(((2.0 * n) * (U * t)))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * t))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * t))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}
\end{array}
Initial program 55.8%
Simplified60.3%
Taylor expanded in t around inf 41.8%
Final simplification41.8%
herbie shell --seed 2024050
(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*))))))