
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))))
(if (<= t_3 5e+287)
(sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
(if (<= t_3 INFINITY)
(fabs (* (* n (sqrt 2.0)) (* (/ l_m Om) (sqrt (* U (- U* U))))))
(*
(sqrt (* U (* n (- (/ (* 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 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om))));
} else if (t_3 <= 5e+287) {
tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = fabs(((n * sqrt(2.0)) * ((l_m / Om) * sqrt((U * (U_42_ - U))))));
} else {
tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) - (2.0 / Om))))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om))));
} else if (t_3 <= 5e+287) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.abs(((n * Math.sqrt(2.0)) * ((l_m / Om) * Math.sqrt((U * (U_42_ - U))))));
} else {
tmp = Math.sqrt((U * (n * (((n * (U_42_ - U)) / Math.pow(Om, 2.0)) - (2.0 / Om))))) * (l_m * Math.sqrt(2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = (2.0 * n) * U t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) elif t_3 <= 5e+287: tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))) elif t_3 <= math.inf: tmp = math.fabs(((n * math.sqrt(2.0)) * ((l_m / Om) * math.sqrt((U * (U_42_ - U)))))) else: tmp = math.sqrt((U * (n * (((n * (U_42_ - U)) / math.pow(Om, 2.0)) - (2.0 / Om))))) * (l_m * math.sqrt(2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om))))); elseif (t_3 <= 5e+287) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1))); elseif (t_3 <= Inf) tmp = abs(Float64(Float64(n * sqrt(2.0)) * Float64(Float64(l_m / Om) * sqrt(Float64(U * Float64(U_42_ - U)))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) - Float64(2.0 / Om))))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = (2.0 * n) * U; t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))); elseif (t_3 <= 5e+287) tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))); elseif (t_3 <= Inf) tmp = abs(((n * sqrt(2.0)) * ((l_m / Om) * sqrt((U * (U_42_ - U)))))); else tmp = sqrt((U * (n * (((n * (U_42_ - U)) / (Om ^ 2.0)) - (2.0 / Om))))) * (l_m * sqrt(2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * 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$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+287], N[Sqrt[N[(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]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Abs[N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * N[Sqrt[N[(U * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $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(2 \cdot n\right) \cdot U\\
t_3 := t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \frac{2 \cdot {l_m}^{2}}{Om}\right)}\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\left|\left(n \cdot \sqrt{2}\right) \cdot \left(\frac{l_m}{Om} \cdot \sqrt{U \cdot \left(U* - U\right)}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(l_m \cdot \sqrt{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*)))) < 0.0Initial program 8.3%
Simplified39.2%
Taylor expanded in n around 0 42.2%
sqrt-prod43.6%
associate-*r/43.6%
Applied egg-rr43.6%
*-commutative43.6%
Simplified43.6%
if 0.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*)))) < 5e287Initial program 99.0%
associate-*l/99.0%
Applied egg-rr99.0%
if 5e287 < (*.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 30.9%
Simplified43.0%
Taylor expanded in n around inf 22.6%
associate-/l*20.3%
Simplified20.3%
add-sqr-sqrt20.2%
sqrt-unprod28.8%
pow228.8%
associate-/l*31.0%
*-commutative31.0%
associate-/l*28.8%
associate-/r/31.0%
Applied egg-rr31.0%
unpow231.0%
rem-sqrt-square48.2%
*-commutative48.2%
*-commutative48.2%
associate-*l*50.3%
Simplified50.3%
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%
Simplified2.8%
Taylor expanded in l around inf 20.9%
associate-*r/20.9%
metadata-eval20.9%
Simplified20.9%
Final simplification63.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(if (<= t_3 0.0)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_3 5e+287)
(sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
(fabs (* (* n (sqrt 2.0)) (* (/ l_m Om) (sqrt (* U (- 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;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_3 <= 5e+287) {
tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = fabs(((n * sqrt(2.0)) * ((l_m / Om) * sqrt((U * (U_42_ - 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (n * ((l_m / om) ** 2.0d0)) * (u_42 - u)
t_2 = (2.0d0 * n) * u
t_3 = t_2 * ((t - (2.0d0 * ((l_m * l_m) / om))) + t_1)
if (t_3 <= 0.0d0) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))))
else if (t_3 <= 5d+287) then
tmp = sqrt((t_2 * ((t - (2.0d0 * (l_m * (l_m / om)))) + t_1)))
else
tmp = abs(((n * sqrt(2.0d0)) * ((l_m / om) * sqrt((u * (u_42 - 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 t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_3 <= 5e+287) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = Math.abs(((n * Math.sqrt(2.0)) * ((l_m / Om) * Math.sqrt((U * (U_42_ - U))))));
}
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_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_3 <= 5e+287: tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))) else: tmp = math.fabs(((n * math.sqrt(2.0)) * ((l_m / Om) * math.sqrt((U * (U_42_ - U)))))) 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(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_3 <= 5e+287) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1))); else tmp = abs(Float64(Float64(n * sqrt(2.0)) * Float64(Float64(l_m / Om) * sqrt(Float64(U * Float64(U_42_ - U)))))); 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_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_3 <= 5e+287) tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))); else tmp = abs(((n * sqrt(2.0)) * ((l_m / Om) * sqrt((U * (U_42_ - U)))))); 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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * 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$3, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 5e+287], N[Sqrt[N[(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]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * N[Sqrt[N[(U * N[(U$42$ - U), $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(2 \cdot n\right) \cdot U\\
t_3 := t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left|\left(n \cdot \sqrt{2}\right) \cdot \left(\frac{l_m}{Om} \cdot \sqrt{U \cdot \left(U* - U\right)}\right)\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*)))) < 0.0Initial program 8.3%
Simplified39.2%
Taylor expanded in n around 0 42.2%
if 0.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*)))) < 5e287Initial program 99.0%
associate-*l/99.0%
Applied egg-rr99.0%
if 5e287 < (*.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 21.4%
Simplified30.7%
Taylor expanded in n around inf 24.1%
associate-/l*23.2%
Simplified23.2%
add-sqr-sqrt23.0%
sqrt-unprod34.1%
pow234.1%
associate-/l*35.6%
*-commutative35.6%
associate-/l*34.1%
associate-/r/34.8%
Applied egg-rr34.8%
unpow234.8%
rem-sqrt-square48.2%
*-commutative48.2%
*-commutative48.2%
associate-*l*49.7%
Simplified49.7%
Final simplification67.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_3 (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (/ (* 2.0 (pow l_m 2.0)) Om)))))
(if (<= t_3 5e+287)
(sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
(fabs (* (* n (sqrt 2.0)) (* (/ l_m Om) (sqrt (* U (- 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;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * pow(l_m, 2.0)) / Om))));
} else if (t_3 <= 5e+287) {
tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = fabs(((n * sqrt(2.0)) * ((l_m / Om) * sqrt((U * (U_42_ - 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (n * ((l_m / om) ** 2.0d0)) * (u_42 - u)
t_2 = (2.0d0 * n) * u
t_3 = t_2 * ((t - (2.0d0 * ((l_m * l_m) / om))) + t_1)
if (t_3 <= 0.0d0) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * (t - ((2.0d0 * (l_m ** 2.0d0)) / om))))
else if (t_3 <= 5d+287) then
tmp = sqrt((t_2 * ((t - (2.0d0 * (l_m * (l_m / om)))) + t_1)))
else
tmp = abs(((n * sqrt(2.0d0)) * ((l_m / om) * sqrt((u * (u_42 - 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 t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om))));
} else if (t_3 <= 5e+287) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = Math.abs(((n * Math.sqrt(2.0)) * ((l_m / Om) * Math.sqrt((U * (U_42_ - U))))));
}
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_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - ((2.0 * math.pow(l_m, 2.0)) / Om)))) elif t_3 <= 5e+287: tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))) else: tmp = math.fabs(((n * math.sqrt(2.0)) * ((l_m / Om) * math.sqrt((U * (U_42_ - U)))))) 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(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om))))); elseif (t_3 <= 5e+287) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1))); else tmp = abs(Float64(Float64(n * sqrt(2.0)) * Float64(Float64(l_m / Om) * sqrt(Float64(U * Float64(U_42_ - U)))))); 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_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * (l_m ^ 2.0)) / Om)))); elseif (t_3 <= 5e+287) tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))); else tmp = abs(((n * sqrt(2.0)) * ((l_m / Om) * sqrt((U * (U_42_ - U)))))); 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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * 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$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+287], N[Sqrt[N[(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]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * N[Sqrt[N[(U * N[(U$42$ - U), $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(2 \cdot n\right) \cdot U\\
t_3 := t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \frac{2 \cdot {l_m}^{2}}{Om}\right)}\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left|\left(n \cdot \sqrt{2}\right) \cdot \left(\frac{l_m}{Om} \cdot \sqrt{U \cdot \left(U* - U\right)}\right)\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*)))) < 0.0Initial program 8.3%
Simplified39.2%
Taylor expanded in n around 0 42.2%
sqrt-prod43.6%
associate-*r/43.6%
Applied egg-rr43.6%
*-commutative43.6%
Simplified43.6%
if 0.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*)))) < 5e287Initial program 99.0%
associate-*l/99.0%
Applied egg-rr99.0%
if 5e287 < (*.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 21.4%
Simplified30.7%
Taylor expanded in n around inf 24.1%
associate-/l*23.2%
Simplified23.2%
add-sqr-sqrt23.0%
sqrt-unprod34.1%
pow234.1%
associate-/l*35.6%
*-commutative35.6%
associate-/l*34.1%
associate-/r/34.8%
Applied egg-rr34.8%
unpow234.8%
rem-sqrt-square48.2%
*-commutative48.2%
*-commutative48.2%
associate-*l*49.7%
Simplified49.7%
Final simplification67.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(if (<= t_3 0.0)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
(/ (* (sqrt (* U (- U* U))) (* (sqrt 2.0) (* n l_m))) 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 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = (sqrt((U * (U_42_ - U))) * (sqrt(2.0) * (n * l_m))) / 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 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
} else {
tmp = (Math.sqrt((U * (U_42_ - U))) * (Math.sqrt(2.0) * (n * l_m))) / 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 = (2.0 * n) * U t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))) else: tmp = (math.sqrt((U * (U_42_ - U))) * (math.sqrt(2.0) * (n * l_m))) / 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(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1))); else tmp = Float64(Float64(sqrt(Float64(U * Float64(U_42_ - U))) * Float64(sqrt(2.0) * Float64(n * l_m))) / 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 = (2.0 * n) * U; t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))); else tmp = (sqrt((U * (U_42_ - U))) * (sqrt(2.0) * (n * l_m))) / 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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * 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$3, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(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]), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[N[(U * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(n * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $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(2 \cdot n\right) \cdot U\\
t_3 := t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{U \cdot \left(U* - U\right)} \cdot \left(\sqrt{2} \cdot \left(n \cdot l_m\right)\right)}{Om}\\
\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*)))) < 0.0Initial program 8.3%
Simplified39.2%
Taylor expanded in n around 0 42.2%
if 0.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*)))) < +inf.0Initial program 67.0%
associate-*l/73.3%
Applied egg-rr73.3%
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%
Simplified2.8%
Taylor expanded in n around inf 27.4%
associate-*l/27.4%
associate-*r*27.5%
Applied egg-rr27.5%
Final simplification62.2%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= t 1.35e+42)
(sqrt
(*
(* 2.0 n)
(*
U
(+
(- t (/ (* 2.0 (* l_m l_m)) Om))
(* n (* (pow (/ l_m Om) 2.0) (- U* U)))))))
(sqrt (fabs (* U (* 2.0 (* 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 (t <= 1.35e+42) {
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(fabs((U * (2.0 * (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 (t <= 1.35d+42) 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(abs((u * (2.0d0 * (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 (t <= 1.35e+42) {
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(Math.abs((U * (2.0 * (n * t)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= 1.35e+42: 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(math.fabs((U * (2.0 * (n * t))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= 1.35e+42) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(Float64(2.0 * Float64(l_m * l_m)) / Om)) + Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * Float64(U_42_ - U))))))); else tmp = sqrt(abs(Float64(U * Float64(2.0 * 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 (t <= 1.35e+42) 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(abs((U * (2.0 * (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[t, 1.35e+42], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(N[(2.0 * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(U * N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.35 \cdot 10^{+42}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(l_m \cdot l_m\right)}{Om}\right) + n \cdot \left({\left(\frac{l_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\
\end{array}
\end{array}
if t < 1.35e42Initial program 51.2%
Simplified50.6%
if 1.35e42 < t Initial program 41.4%
Simplified48.2%
Taylor expanded in t around inf 46.8%
pow146.8%
associate-*l*46.8%
associate-*l*43.4%
metadata-eval43.4%
pow-prod-up43.4%
pow-prod-down28.6%
pow228.6%
associate-*l*33.7%
associate-*l*33.7%
*-commutative33.7%
Applied egg-rr33.7%
unpow1/233.7%
unpow233.7%
rem-sqrt-square47.5%
associate-*r*57.9%
associate-*r*57.9%
Simplified57.9%
Final simplification52.2%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 1.9e+31)
(sqrt (fabs (* U (* 2.0 (* n t)))))
(if (<= l_m 1.25e+145)
(sqrt (* -4.0 (/ U (/ Om (* n (pow l_m 2.0))))))
(if (or (<= l_m 1.05e+249) (not (<= l_m 1.4e+272)))
(* (sqrt (* U (- U* U))) (/ l_m (/ Om (* n (sqrt 2.0)))))
(* (sqrt (* U U*)) (/ (* l_m (* n (- (sqrt 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 <= 1.9e+31) {
tmp = sqrt(fabs((U * (2.0 * (n * t)))));
} else if (l_m <= 1.25e+145) {
tmp = sqrt((-4.0 * (U / (Om / (n * pow(l_m, 2.0))))));
} else if ((l_m <= 1.05e+249) || !(l_m <= 1.4e+272)) {
tmp = sqrt((U * (U_42_ - U))) * (l_m / (Om / (n * sqrt(2.0))));
} else {
tmp = sqrt((U * U_42_)) * ((l_m * (n * -sqrt(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 <= 1.9d+31) then
tmp = sqrt(abs((u * (2.0d0 * (n * t)))))
else if (l_m <= 1.25d+145) then
tmp = sqrt(((-4.0d0) * (u / (om / (n * (l_m ** 2.0d0))))))
else if ((l_m <= 1.05d+249) .or. (.not. (l_m <= 1.4d+272))) then
tmp = sqrt((u * (u_42 - u))) * (l_m / (om / (n * sqrt(2.0d0))))
else
tmp = sqrt((u * u_42)) * ((l_m * (n * -sqrt(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 <= 1.9e+31) {
tmp = Math.sqrt(Math.abs((U * (2.0 * (n * t)))));
} else if (l_m <= 1.25e+145) {
tmp = Math.sqrt((-4.0 * (U / (Om / (n * Math.pow(l_m, 2.0))))));
} else if ((l_m <= 1.05e+249) || !(l_m <= 1.4e+272)) {
tmp = Math.sqrt((U * (U_42_ - U))) * (l_m / (Om / (n * Math.sqrt(2.0))));
} else {
tmp = Math.sqrt((U * U_42_)) * ((l_m * (n * -Math.sqrt(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 <= 1.9e+31: tmp = math.sqrt(math.fabs((U * (2.0 * (n * t))))) elif l_m <= 1.25e+145: tmp = math.sqrt((-4.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))) elif (l_m <= 1.05e+249) or not (l_m <= 1.4e+272): tmp = math.sqrt((U * (U_42_ - U))) * (l_m / (Om / (n * math.sqrt(2.0)))) else: tmp = math.sqrt((U * U_42_)) * ((l_m * (n * -math.sqrt(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 <= 1.9e+31) tmp = sqrt(abs(Float64(U * Float64(2.0 * Float64(n * t))))); elseif (l_m <= 1.25e+145) tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))); elseif ((l_m <= 1.05e+249) || !(l_m <= 1.4e+272)) tmp = Float64(sqrt(Float64(U * Float64(U_42_ - U))) * Float64(l_m / Float64(Om / Float64(n * sqrt(2.0))))); else tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(Float64(l_m * Float64(n * Float64(-sqrt(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 <= 1.9e+31) tmp = sqrt(abs((U * (2.0 * (n * t))))); elseif (l_m <= 1.25e+145) tmp = sqrt((-4.0 * (U / (Om / (n * (l_m ^ 2.0)))))); elseif ((l_m <= 1.05e+249) || ~((l_m <= 1.4e+272))) tmp = sqrt((U * (U_42_ - U))) * (l_m / (Om / (n * sqrt(2.0)))); else tmp = sqrt((U * U_42_)) * ((l_m * (n * -sqrt(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, 1.9e+31], N[Sqrt[N[Abs[N[(U * N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.25e+145], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l$95$m, 1.05e+249], N[Not[LessEqual[l$95$m, 1.4e+272]], $MachinePrecision]], N[(N[Sqrt[N[(U * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m / N[(Om / N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(N[(l$95$m * N[(n * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 1.9 \cdot 10^{+31}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;l_m \leq 1.25 \cdot 10^{+145}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\
\mathbf{elif}\;l_m \leq 1.05 \cdot 10^{+249} \lor \neg \left(l_m \leq 1.4 \cdot 10^{+272}\right):\\
\;\;\;\;\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{l_m}{\frac{Om}{n \cdot \sqrt{2}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \frac{l_m \cdot \left(n \cdot \left(-\sqrt{2}\right)\right)}{Om}\\
\end{array}
\end{array}
if l < 1.9000000000000001e31Initial program 53.9%
Simplified58.0%
Taylor expanded in t around inf 43.7%
pow143.7%
associate-*l*43.7%
associate-*l*45.1%
metadata-eval45.1%
pow-prod-up45.1%
pow-prod-down31.7%
pow231.7%
associate-*l*32.2%
associate-*l*32.2%
*-commutative32.2%
Applied egg-rr32.2%
unpow1/232.2%
unpow232.2%
rem-sqrt-square44.4%
associate-*r*47.7%
associate-*r*47.7%
Simplified47.7%
if 1.9000000000000001e31 < l < 1.24999999999999992e145Initial program 43.9%
Simplified33.8%
Taylor expanded in n around 0 33.8%
Taylor expanded in t around 0 43.6%
associate-/l*47.9%
*-commutative47.9%
Simplified47.9%
if 1.24999999999999992e145 < l < 1.0499999999999999e249 or 1.4e272 < l Initial program 17.8%
Simplified33.3%
Taylor expanded in n around inf 36.7%
associate-/l*40.3%
Simplified40.3%
if 1.0499999999999999e249 < l < 1.4e272Initial program 20.7%
Simplified40.0%
Taylor expanded in U* around inf 21.2%
Taylor expanded in n around -inf 40.5%
Final simplification46.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (sqrt (* U U*))) (t_2 (* n (sqrt 2.0))))
(if (<= l_m 3.6e+28)
(sqrt (fabs (* U (* 2.0 (* n t)))))
(if (<= l_m 1.9e+131)
(sqrt (* -4.0 (/ U (/ Om (* n (pow l_m 2.0))))))
(if (<= l_m 2.5e+248)
(* t_1 (* (/ l_m Om) t_2))
(if (<= l_m 1.95e+272)
(* t_1 (* t_2 (/ (- l_m) Om)))
(* (/ (* l_m t_2) Om) t_1)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((U * U_42_));
double t_2 = n * sqrt(2.0);
double tmp;
if (l_m <= 3.6e+28) {
tmp = sqrt(fabs((U * (2.0 * (n * t)))));
} else if (l_m <= 1.9e+131) {
tmp = sqrt((-4.0 * (U / (Om / (n * pow(l_m, 2.0))))));
} else if (l_m <= 2.5e+248) {
tmp = t_1 * ((l_m / Om) * t_2);
} else if (l_m <= 1.95e+272) {
tmp = t_1 * (t_2 * (-l_m / Om));
} else {
tmp = ((l_m * t_2) / Om) * t_1;
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((u * u_42))
t_2 = n * sqrt(2.0d0)
if (l_m <= 3.6d+28) then
tmp = sqrt(abs((u * (2.0d0 * (n * t)))))
else if (l_m <= 1.9d+131) then
tmp = sqrt(((-4.0d0) * (u / (om / (n * (l_m ** 2.0d0))))))
else if (l_m <= 2.5d+248) then
tmp = t_1 * ((l_m / om) * t_2)
else if (l_m <= 1.95d+272) then
tmp = t_1 * (t_2 * (-l_m / om))
else
tmp = ((l_m * t_2) / om) * t_1
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((U * U_42_));
double t_2 = n * Math.sqrt(2.0);
double tmp;
if (l_m <= 3.6e+28) {
tmp = Math.sqrt(Math.abs((U * (2.0 * (n * t)))));
} else if (l_m <= 1.9e+131) {
tmp = Math.sqrt((-4.0 * (U / (Om / (n * Math.pow(l_m, 2.0))))));
} else if (l_m <= 2.5e+248) {
tmp = t_1 * ((l_m / Om) * t_2);
} else if (l_m <= 1.95e+272) {
tmp = t_1 * (t_2 * (-l_m / Om));
} else {
tmp = ((l_m * t_2) / Om) * t_1;
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((U * U_42_)) t_2 = n * math.sqrt(2.0) tmp = 0 if l_m <= 3.6e+28: tmp = math.sqrt(math.fabs((U * (2.0 * (n * t))))) elif l_m <= 1.9e+131: tmp = math.sqrt((-4.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))) elif l_m <= 2.5e+248: tmp = t_1 * ((l_m / Om) * t_2) elif l_m <= 1.95e+272: tmp = t_1 * (t_2 * (-l_m / Om)) else: tmp = ((l_m * t_2) / Om) * t_1 return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(U * U_42_)) t_2 = Float64(n * sqrt(2.0)) tmp = 0.0 if (l_m <= 3.6e+28) tmp = sqrt(abs(Float64(U * Float64(2.0 * Float64(n * t))))); elseif (l_m <= 1.9e+131) tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))); elseif (l_m <= 2.5e+248) tmp = Float64(t_1 * Float64(Float64(l_m / Om) * t_2)); elseif (l_m <= 1.95e+272) tmp = Float64(t_1 * Float64(t_2 * Float64(Float64(-l_m) / Om))); else tmp = Float64(Float64(Float64(l_m * t_2) / Om) * t_1); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((U * U_42_)); t_2 = n * sqrt(2.0); tmp = 0.0; if (l_m <= 3.6e+28) tmp = sqrt(abs((U * (2.0 * (n * t))))); elseif (l_m <= 1.9e+131) tmp = sqrt((-4.0 * (U / (Om / (n * (l_m ^ 2.0)))))); elseif (l_m <= 2.5e+248) tmp = t_1 * ((l_m / Om) * t_2); elseif (l_m <= 1.95e+272) tmp = t_1 * (t_2 * (-l_m / Om)); else tmp = ((l_m * t_2) / Om) * t_1; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l$95$m, 3.6e+28], N[Sqrt[N[Abs[N[(U * N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.9e+131], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 2.5e+248], N[(t$95$1 * N[(N[(l$95$m / Om), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.95e+272], N[(t$95$1 * N[(t$95$2 * N[((-l$95$m) / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l$95$m * t$95$2), $MachinePrecision] / Om), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{U \cdot U*}\\
t_2 := n \cdot \sqrt{2}\\
\mathbf{if}\;l_m \leq 3.6 \cdot 10^{+28}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;l_m \leq 1.9 \cdot 10^{+131}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\
\mathbf{elif}\;l_m \leq 2.5 \cdot 10^{+248}:\\
\;\;\;\;t_1 \cdot \left(\frac{l_m}{Om} \cdot t_2\right)\\
\mathbf{elif}\;l_m \leq 1.95 \cdot 10^{+272}:\\
\;\;\;\;t_1 \cdot \left(t_2 \cdot \frac{-l_m}{Om}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{l_m \cdot t_2}{Om} \cdot t_1\\
\end{array}
\end{array}
if l < 3.5999999999999999e28Initial program 53.9%
Simplified58.0%
Taylor expanded in t around inf 43.7%
pow143.7%
associate-*l*43.7%
associate-*l*45.1%
metadata-eval45.1%
pow-prod-up45.1%
pow-prod-down31.7%
pow231.7%
associate-*l*32.2%
associate-*l*32.2%
*-commutative32.2%
Applied egg-rr32.2%
unpow1/232.2%
unpow232.2%
rem-sqrt-square44.4%
associate-*r*47.7%
associate-*r*47.7%
Simplified47.7%
if 3.5999999999999999e28 < l < 1.9000000000000002e131Initial program 45.2%
Simplified39.1%
Taylor expanded in n around 0 39.6%
Taylor expanded in t around 0 45.3%
associate-/l*50.4%
*-commutative50.4%
Simplified50.4%
if 1.9000000000000002e131 < l < 2.4999999999999998e248Initial program 18.6%
Simplified35.6%
Taylor expanded in U* around inf 22.6%
Taylor expanded in n around 0 35.0%
associate-/l*42.5%
*-commutative42.5%
associate-/r/38.8%
Simplified38.8%
if 2.4999999999999998e248 < l < 1.95e272Initial program 20.7%
Simplified40.0%
Taylor expanded in U* around inf 21.2%
Taylor expanded in n around -inf 40.5%
mul-1-neg40.5%
associate-/l*40.5%
*-commutative40.5%
distribute-rgt-neg-in40.5%
associate-/r/39.7%
Simplified39.7%
if 1.95e272 < l Initial program 27.4%
Simplified26.1%
Taylor expanded in U* around inf 26.1%
Taylor expanded in n around 0 25.6%
Final simplification46.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (sqrt (* U U*))) (t_2 (* n (sqrt 2.0))))
(if (<= l_m 9.2e+31)
(sqrt (fabs (* U (* 2.0 (* n t)))))
(if (<= l_m 9.5e+129)
(sqrt (* -4.0 (/ U (/ Om (* n (pow l_m 2.0))))))
(if (<= l_m 1.45e+248)
(* t_1 (* (/ l_m Om) t_2))
(if (<= l_m 1.95e+272)
(* t_1 (/ (* l_m (* n (- (sqrt 2.0)))) Om))
(* (/ (* l_m t_2) Om) t_1)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((U * U_42_));
double t_2 = n * sqrt(2.0);
double tmp;
if (l_m <= 9.2e+31) {
tmp = sqrt(fabs((U * (2.0 * (n * t)))));
} else if (l_m <= 9.5e+129) {
tmp = sqrt((-4.0 * (U / (Om / (n * pow(l_m, 2.0))))));
} else if (l_m <= 1.45e+248) {
tmp = t_1 * ((l_m / Om) * t_2);
} else if (l_m <= 1.95e+272) {
tmp = t_1 * ((l_m * (n * -sqrt(2.0))) / Om);
} else {
tmp = ((l_m * t_2) / Om) * t_1;
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((u * u_42))
t_2 = n * sqrt(2.0d0)
if (l_m <= 9.2d+31) then
tmp = sqrt(abs((u * (2.0d0 * (n * t)))))
else if (l_m <= 9.5d+129) then
tmp = sqrt(((-4.0d0) * (u / (om / (n * (l_m ** 2.0d0))))))
else if (l_m <= 1.45d+248) then
tmp = t_1 * ((l_m / om) * t_2)
else if (l_m <= 1.95d+272) then
tmp = t_1 * ((l_m * (n * -sqrt(2.0d0))) / om)
else
tmp = ((l_m * t_2) / om) * t_1
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((U * U_42_));
double t_2 = n * Math.sqrt(2.0);
double tmp;
if (l_m <= 9.2e+31) {
tmp = Math.sqrt(Math.abs((U * (2.0 * (n * t)))));
} else if (l_m <= 9.5e+129) {
tmp = Math.sqrt((-4.0 * (U / (Om / (n * Math.pow(l_m, 2.0))))));
} else if (l_m <= 1.45e+248) {
tmp = t_1 * ((l_m / Om) * t_2);
} else if (l_m <= 1.95e+272) {
tmp = t_1 * ((l_m * (n * -Math.sqrt(2.0))) / Om);
} else {
tmp = ((l_m * t_2) / Om) * t_1;
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((U * U_42_)) t_2 = n * math.sqrt(2.0) tmp = 0 if l_m <= 9.2e+31: tmp = math.sqrt(math.fabs((U * (2.0 * (n * t))))) elif l_m <= 9.5e+129: tmp = math.sqrt((-4.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))) elif l_m <= 1.45e+248: tmp = t_1 * ((l_m / Om) * t_2) elif l_m <= 1.95e+272: tmp = t_1 * ((l_m * (n * -math.sqrt(2.0))) / Om) else: tmp = ((l_m * t_2) / Om) * t_1 return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(U * U_42_)) t_2 = Float64(n * sqrt(2.0)) tmp = 0.0 if (l_m <= 9.2e+31) tmp = sqrt(abs(Float64(U * Float64(2.0 * Float64(n * t))))); elseif (l_m <= 9.5e+129) tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))); elseif (l_m <= 1.45e+248) tmp = Float64(t_1 * Float64(Float64(l_m / Om) * t_2)); elseif (l_m <= 1.95e+272) tmp = Float64(t_1 * Float64(Float64(l_m * Float64(n * Float64(-sqrt(2.0)))) / Om)); else tmp = Float64(Float64(Float64(l_m * t_2) / Om) * t_1); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((U * U_42_)); t_2 = n * sqrt(2.0); tmp = 0.0; if (l_m <= 9.2e+31) tmp = sqrt(abs((U * (2.0 * (n * t))))); elseif (l_m <= 9.5e+129) tmp = sqrt((-4.0 * (U / (Om / (n * (l_m ^ 2.0)))))); elseif (l_m <= 1.45e+248) tmp = t_1 * ((l_m / Om) * t_2); elseif (l_m <= 1.95e+272) tmp = t_1 * ((l_m * (n * -sqrt(2.0))) / Om); else tmp = ((l_m * t_2) / Om) * t_1; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l$95$m, 9.2e+31], N[Sqrt[N[Abs[N[(U * N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 9.5e+129], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.45e+248], N[(t$95$1 * N[(N[(l$95$m / Om), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.95e+272], N[(t$95$1 * N[(N[(l$95$m * N[(n * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l$95$m * t$95$2), $MachinePrecision] / Om), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{U \cdot U*}\\
t_2 := n \cdot \sqrt{2}\\
\mathbf{if}\;l_m \leq 9.2 \cdot 10^{+31}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;l_m \leq 9.5 \cdot 10^{+129}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\
\mathbf{elif}\;l_m \leq 1.45 \cdot 10^{+248}:\\
\;\;\;\;t_1 \cdot \left(\frac{l_m}{Om} \cdot t_2\right)\\
\mathbf{elif}\;l_m \leq 1.95 \cdot 10^{+272}:\\
\;\;\;\;t_1 \cdot \frac{l_m \cdot \left(n \cdot \left(-\sqrt{2}\right)\right)}{Om}\\
\mathbf{else}:\\
\;\;\;\;\frac{l_m \cdot t_2}{Om} \cdot t_1\\
\end{array}
\end{array}
if l < 9.1999999999999998e31Initial program 53.9%
Simplified58.0%
Taylor expanded in t around inf 43.7%
pow143.7%
associate-*l*43.7%
associate-*l*45.1%
metadata-eval45.1%
pow-prod-up45.1%
pow-prod-down31.7%
pow231.7%
associate-*l*32.2%
associate-*l*32.2%
*-commutative32.2%
Applied egg-rr32.2%
unpow1/232.2%
unpow232.2%
rem-sqrt-square44.4%
associate-*r*47.7%
associate-*r*47.7%
Simplified47.7%
if 9.1999999999999998e31 < l < 9.5000000000000004e129Initial program 45.2%
Simplified39.1%
Taylor expanded in n around 0 39.6%
Taylor expanded in t around 0 45.3%
associate-/l*50.4%
*-commutative50.4%
Simplified50.4%
if 9.5000000000000004e129 < l < 1.45e248Initial program 18.6%
Simplified35.6%
Taylor expanded in U* around inf 22.6%
Taylor expanded in n around 0 35.0%
associate-/l*42.5%
*-commutative42.5%
associate-/r/38.8%
Simplified38.8%
if 1.45e248 < l < 1.95e272Initial program 20.7%
Simplified40.0%
Taylor expanded in U* around inf 21.2%
Taylor expanded in n around -inf 40.5%
if 1.95e272 < l Initial program 27.4%
Simplified26.1%
Taylor expanded in U* around inf 26.1%
Taylor expanded in n around 0 25.6%
Final simplification46.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 1.6e+32)
(sqrt (fabs (* U (* 2.0 (* n t)))))
(if (<= l_m 1.9e+131)
(sqrt (* -4.0 (/ U (/ Om (* n (pow l_m 2.0))))))
(* (sqrt (* U U*)) (* (/ l_m Om) (* n (sqrt 2.0)))))))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.6e+32) {
tmp = sqrt(fabs((U * (2.0 * (n * t)))));
} else if (l_m <= 1.9e+131) {
tmp = sqrt((-4.0 * (U / (Om / (n * pow(l_m, 2.0))))));
} else {
tmp = sqrt((U * U_42_)) * ((l_m / Om) * (n * sqrt(2.0)));
}
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.6d+32) then
tmp = sqrt(abs((u * (2.0d0 * (n * t)))))
else if (l_m <= 1.9d+131) then
tmp = sqrt(((-4.0d0) * (u / (om / (n * (l_m ** 2.0d0))))))
else
tmp = sqrt((u * u_42)) * ((l_m / om) * (n * sqrt(2.0d0)))
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.6e+32) {
tmp = Math.sqrt(Math.abs((U * (2.0 * (n * t)))));
} else if (l_m <= 1.9e+131) {
tmp = Math.sqrt((-4.0 * (U / (Om / (n * Math.pow(l_m, 2.0))))));
} else {
tmp = Math.sqrt((U * U_42_)) * ((l_m / Om) * (n * Math.sqrt(2.0)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.6e+32: tmp = math.sqrt(math.fabs((U * (2.0 * (n * t))))) elif l_m <= 1.9e+131: tmp = math.sqrt((-4.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))) else: tmp = math.sqrt((U * U_42_)) * ((l_m / Om) * (n * math.sqrt(2.0))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.6e+32) tmp = sqrt(abs(Float64(U * Float64(2.0 * Float64(n * t))))); elseif (l_m <= 1.9e+131) tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))); else tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(Float64(l_m / Om) * Float64(n * sqrt(2.0)))); 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.6e+32) tmp = sqrt(abs((U * (2.0 * (n * t))))); elseif (l_m <= 1.9e+131) tmp = sqrt((-4.0 * (U / (Om / (n * (l_m ^ 2.0)))))); else tmp = sqrt((U * U_42_)) * ((l_m / Om) * (n * sqrt(2.0))); 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.6e+32], N[Sqrt[N[Abs[N[(U * N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.9e+131], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 1.6 \cdot 10^{+32}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;l_m \leq 1.9 \cdot 10^{+131}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \left(\frac{l_m}{Om} \cdot \left(n \cdot \sqrt{2}\right)\right)\\
\end{array}
\end{array}
if l < 1.5999999999999999e32Initial program 53.9%
Simplified58.0%
Taylor expanded in t around inf 43.7%
pow143.7%
associate-*l*43.7%
associate-*l*45.1%
metadata-eval45.1%
pow-prod-up45.1%
pow-prod-down31.7%
pow231.7%
associate-*l*32.2%
associate-*l*32.2%
*-commutative32.2%
Applied egg-rr32.2%
unpow1/232.2%
unpow232.2%
rem-sqrt-square44.4%
associate-*r*47.7%
associate-*r*47.7%
Simplified47.7%
if 1.5999999999999999e32 < l < 1.9000000000000002e131Initial program 45.2%
Simplified39.1%
Taylor expanded in n around 0 39.6%
Taylor expanded in t around 0 45.3%
associate-/l*50.4%
*-commutative50.4%
Simplified50.4%
if 1.9000000000000002e131 < l Initial program 20.0%
Simplified35.1%
Taylor expanded in U* around inf 22.8%
Taylor expanded in n around 0 28.6%
associate-/l*34.1%
*-commutative34.1%
associate-/r/31.4%
Simplified31.4%
Final simplification45.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (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_) {
return sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / 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 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / 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 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); 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 * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}
\end{array}
Initial program 49.0%
Simplified53.9%
Taylor expanded in n around 0 48.2%
Final simplification48.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 2.45e+32) (sqrt (fabs (* U (* 2.0 (* n t))))) (sqrt (* -4.0 (/ U (/ Om (* n (pow l_m 2.0))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2.45e+32) {
tmp = sqrt(fabs((U * (2.0 * (n * t)))));
} else {
tmp = sqrt((-4.0 * (U / (Om / (n * pow(l_m, 2.0))))));
}
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 <= 2.45d+32) then
tmp = sqrt(abs((u * (2.0d0 * (n * t)))))
else
tmp = sqrt(((-4.0d0) * (u / (om / (n * (l_m ** 2.0d0))))))
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 <= 2.45e+32) {
tmp = Math.sqrt(Math.abs((U * (2.0 * (n * t)))));
} else {
tmp = Math.sqrt((-4.0 * (U / (Om / (n * Math.pow(l_m, 2.0))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 2.45e+32: tmp = math.sqrt(math.fabs((U * (2.0 * (n * t))))) else: tmp = math.sqrt((-4.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 2.45e+32) tmp = sqrt(abs(Float64(U * Float64(2.0 * Float64(n * t))))); else tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 2.45e+32) tmp = sqrt(abs((U * (2.0 * (n * t))))); else tmp = sqrt((-4.0 * (U / (Om / (n * (l_m ^ 2.0)))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2.45e+32], N[Sqrt[N[Abs[N[(U * N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 2.45 \cdot 10^{+32}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\
\end{array}
\end{array}
if l < 2.4500000000000001e32Initial program 53.9%
Simplified58.0%
Taylor expanded in t around inf 43.7%
pow143.7%
associate-*l*43.7%
associate-*l*45.1%
metadata-eval45.1%
pow-prod-up45.1%
pow-prod-down31.7%
pow231.7%
associate-*l*32.2%
associate-*l*32.2%
*-commutative32.2%
Applied egg-rr32.2%
unpow1/232.2%
unpow232.2%
rem-sqrt-square44.4%
associate-*r*47.7%
associate-*r*47.7%
Simplified47.7%
if 2.4500000000000001e32 < l Initial program 28.2%
Simplified36.4%
Taylor expanded in n around 0 25.1%
Taylor expanded in t around 0 26.9%
associate-/l*28.6%
*-commutative28.6%
Simplified28.6%
Final simplification44.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U -1.65e+115)
(sqrt (* 2.0 (* t (* n U))))
(if (<= U -1.5e-308)
(pow (* (* 2.0 n) (* U t)) 0.5)
(* (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 <= -1.65e+115) {
tmp = sqrt((2.0 * (t * (n * U))));
} else if (U <= -1.5e-308) {
tmp = pow(((2.0 * n) * (U * t)), 0.5);
} 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 <= (-1.65d+115)) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else if (u <= (-1.5d-308)) then
tmp = ((2.0d0 * n) * (u * t)) ** 0.5d0
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 <= -1.65e+115) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else if (U <= -1.5e-308) {
tmp = Math.pow(((2.0 * n) * (U * t)), 0.5);
} 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 <= -1.65e+115: tmp = math.sqrt((2.0 * (t * (n * U)))) elif U <= -1.5e-308: tmp = math.pow(((2.0 * n) * (U * t)), 0.5) 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 <= -1.65e+115) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); elseif (U <= -1.5e-308) tmp = Float64(Float64(2.0 * n) * Float64(U * t)) ^ 0.5; 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 <= -1.65e+115) tmp = sqrt((2.0 * (t * (n * U)))); elseif (U <= -1.5e-308) tmp = ((2.0 * n) * (U * t)) ^ 0.5; 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, -1.65e+115], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, -1.5e-308], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $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 -1.65 \cdot 10^{+115}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{elif}\;U \leq -1.5 \cdot 10^{-308}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\end{array}
\end{array}
if U < -1.65000000000000003e115Initial program 71.8%
Simplified74.5%
Taylor expanded in l around 0 46.5%
associate-*r*57.9%
*-commutative57.9%
Simplified57.9%
if -1.65000000000000003e115 < U < -1.4999999999999999e-308Initial program 43.2%
Simplified57.8%
Taylor expanded in t around inf 39.2%
pow1/239.2%
*-commutative39.2%
Applied egg-rr39.2%
if -1.4999999999999999e-308 < U Initial program 47.2%
Simplified51.6%
Taylor expanded in l around 0 40.3%
pow1/240.5%
associate-*r*40.5%
unpow-prod-down44.8%
pow1/244.6%
Applied egg-rr44.6%
unpow1/244.6%
Simplified44.6%
Final simplification44.4%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U -1.12e-107) (sqrt (* 2.0 (* t (* n U)))) (sqrt (fabs (* U (* 2.0 (* 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 <= -1.12e-107) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt(fabs((U * (2.0 * (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 <= (-1.12d-107)) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt(abs((u * (2.0d0 * (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 <= -1.12e-107) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt(Math.abs((U * (2.0 * (n * t)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -1.12e-107: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt(math.fabs((U * (2.0 * (n * t))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -1.12e-107) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(abs(Float64(U * Float64(2.0 * 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 <= -1.12e-107) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt(abs((U * (2.0 * (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, -1.12e-107], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(U * N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1.12 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\
\end{array}
\end{array}
if U < -1.12e-107Initial program 61.1%
Simplified65.8%
Taylor expanded in l around 0 44.3%
associate-*r*50.2%
*-commutative50.2%
Simplified50.2%
if -1.12e-107 < U Initial program 43.4%
Simplified51.0%
Taylor expanded in t around inf 34.1%
pow134.1%
associate-*l*34.1%
associate-*l*32.5%
metadata-eval32.5%
pow-prod-up33.1%
pow-prod-down25.7%
pow225.7%
associate-*l*26.8%
associate-*l*26.8%
*-commutative26.8%
Applied egg-rr26.8%
unpow1/226.8%
unpow226.8%
rem-sqrt-square35.1%
associate-*r*38.5%
associate-*r*38.5%
Simplified38.5%
Final simplification42.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= t 2e-88) (pow (* 2.0 (* t (* n U))) 0.5) (sqrt (* 2.0 (* U (* n t))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 2e-88) {
tmp = pow((2.0 * (t * (n * U))), 0.5);
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 2d-88) then
tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 2e-88) {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= 2e-88: tmp = math.pow((2.0 * (t * (n * U))), 0.5) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= 2e-88) tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= 2e-88) tmp = (2.0 * (t * (n * U))) ^ 0.5; else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, 2e-88], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2 \cdot 10^{-88}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if t < 1.99999999999999987e-88Initial program 49.3%
Simplified55.0%
Taylor expanded in l around 0 33.5%
pow1/233.7%
associate-*r*36.4%
*-commutative36.4%
Applied egg-rr36.4%
if 1.99999999999999987e-88 < t Initial program 48.4%
Simplified50.5%
Taylor expanded in l around 0 51.7%
Final simplification41.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= t 2.6e-91) (pow (* t (* 2.0 (* n U))) 0.5) (sqrt (* 2.0 (* U (* n t))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 2.6e-91) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 2.6d-91) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 2.6e-91) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= 2.6e-91: tmp = math.pow((t * (2.0 * (n * U))), 0.5) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= 2.6e-91) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= 2.6e-91) tmp = (t * (2.0 * (n * U))) ^ 0.5; else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, 2.6e-91], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.6 \cdot 10^{-91}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if t < 2.60000000000000014e-91Initial program 49.3%
associate-*l/55.6%
Applied egg-rr55.6%
Taylor expanded in t around inf 35.8%
pow1/236.4%
*-commutative36.4%
associate-*l*36.4%
Applied egg-rr36.4%
if 2.60000000000000014e-91 < t Initial program 48.4%
Simplified50.5%
Taylor expanded in l around 0 51.7%
Final simplification41.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U -1e-108) (sqrt (* 2.0 (* t (* n U)))) (sqrt (* 2.0 (* U (* n t))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -1e-108) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= (-1d-108)) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -1e-108) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -1e-108: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -1e-108) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= -1e-108) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -1e-108], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1 \cdot 10^{-108}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if U < -1.00000000000000004e-108Initial program 61.1%
Simplified65.8%
Taylor expanded in l around 0 44.3%
associate-*r*50.2%
*-commutative50.2%
Simplified50.2%
if -1.00000000000000004e-108 < U Initial program 43.4%
Simplified47.8%
Taylor expanded in l around 0 37.5%
Final simplification41.5%
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.0%
Simplified53.5%
Taylor expanded in l around 0 39.6%
Final simplification39.6%
herbie shell --seed 2023326
(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*))))))