
(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 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(if (<= t_2 0.0)
(pow (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))) 0.5)
(if (<= t_2 5e+303)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
(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) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_2 <= 0.0) {
tmp = pow(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
} else if (t_2 <= 5e+303) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} 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 = 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 = (n * ((l_m / om) ** 2.0d0)) * (u_42 - u)
t_2 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) + t_1)
if (t_2 <= 0.0d0) then
tmp = ((2.0d0 * n) * (u * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))) ** 0.5d0
else if (t_2 <= 5d+303) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (t_1 - (2.0d0 * (l_m * (l_m / om)))))))
else
tmp = sqrt((u * (n * ((n * ((u_42 - u) / (om ** 2.0d0))) - (2.0d0 / om))))) * (l_m * 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 t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double tmp;
if (t_2 <= 0.0) {
tmp = Math.pow(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
} else if (t_2 <= 5e+303) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} 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 - (2.0 * ((l_m * l_m) / Om))) + t_1) tmp = 0 if t_2 <= 0.0: tmp = math.pow(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5) elif t_2 <= 5e+303: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) 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(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5; elseif (t_2 <= 5e+303) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(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 = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); tmp = 0.0; if (t_2 <= 0.0) tmp = ((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5; elseif (t_2 <= 5e+303) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); 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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Power[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], 0.5], $MachinePrecision], If[LessEqual[t$95$2, 5e+303], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(n * N[(N[(U$42$ - U), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $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(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+303}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(n \cdot \frac{U* - U}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 15.9%
Simplified42.2%
*-commutative42.2%
sqrt-prod33.8%
associate-*r/33.8%
pow233.8%
Applied egg-rr33.8%
fma-define33.8%
+-commutative33.8%
fma-define33.8%
associate-*r/33.8%
Simplified33.8%
Taylor expanded in n around 0 36.1%
sqrt-unprod48.9%
pow1/249.1%
Applied egg-rr49.1%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 4.9999999999999997e303Initial program 98.3%
Simplified98.4%
if 4.9999999999999997e303 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 19.7%
Simplified29.2%
Taylor expanded in l around inf 28.6%
associate-/l*28.8%
associate-*r/28.8%
metadata-eval28.8%
Simplified28.8%
Final simplification58.6%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_2 0.0)
(sqrt (* (* 2.0 n) (* U t)))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(pow (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))) 0.5)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = pow(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.pow(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * t))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.pow(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * t))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = ((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[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], 0.5], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 17.9%
Simplified45.0%
Taylor expanded in t around inf 45.0%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 69.9%
Simplified75.5%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified10.8%
*-commutative10.8%
sqrt-prod2.3%
associate-*r/0.3%
pow20.3%
Applied egg-rr0.3%
fma-define0.3%
+-commutative0.3%
fma-define0.5%
associate-*r/0.5%
Simplified0.5%
Taylor expanded in n around 0 3.2%
sqrt-unprod10.3%
pow1/238.9%
Applied egg-rr38.9%
Final simplification64.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* l_m (/ l_m Om))))
(t_2
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (* n (* (pow (/ l_m Om) 2.0) U*)) t_1))))))
(if (<= n -1.75e+29)
t_2
(if (<= n -2e-310)
(pow (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))) 0.5)
(if (<= n 1.35e-97) (* (sqrt (* U (- t t_1))) (sqrt (* 2.0 n))) t_2)))))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 * (l_m * (l_m / Om));
double t_2 = sqrt(((2.0 * (n * U)) * (t + ((n * (pow((l_m / Om), 2.0) * U_42_)) - t_1))));
double tmp;
if (n <= -1.75e+29) {
tmp = t_2;
} else if (n <= -2e-310) {
tmp = pow(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
} else if (n <= 1.35e-97) {
tmp = sqrt((U * (t - t_1))) * sqrt((2.0 * n));
} else {
tmp = t_2;
}
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 = 2.0d0 * (l_m * (l_m / om))
t_2 = sqrt(((2.0d0 * (n * u)) * (t + ((n * (((l_m / om) ** 2.0d0) * u_42)) - t_1))))
if (n <= (-1.75d+29)) then
tmp = t_2
else if (n <= (-2d-310)) then
tmp = ((2.0d0 * n) * (u * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))) ** 0.5d0
else if (n <= 1.35d-97) then
tmp = sqrt((u * (t - t_1))) * sqrt((2.0d0 * n))
else
tmp = t_2
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 = 2.0 * (l_m * (l_m / Om));
double t_2 = Math.sqrt(((2.0 * (n * U)) * (t + ((n * (Math.pow((l_m / Om), 2.0) * U_42_)) - t_1))));
double tmp;
if (n <= -1.75e+29) {
tmp = t_2;
} else if (n <= -2e-310) {
tmp = Math.pow(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
} else if (n <= 1.35e-97) {
tmp = Math.sqrt((U * (t - t_1))) * Math.sqrt((2.0 * n));
} else {
tmp = t_2;
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = 2.0 * (l_m * (l_m / Om)) t_2 = math.sqrt(((2.0 * (n * U)) * (t + ((n * (math.pow((l_m / Om), 2.0) * U_42_)) - t_1)))) tmp = 0 if n <= -1.75e+29: tmp = t_2 elif n <= -2e-310: tmp = math.pow(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5) elif n <= 1.35e-97: tmp = math.sqrt((U * (t - t_1))) * math.sqrt((2.0 * n)) else: tmp = t_2 return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(2.0 * Float64(l_m * Float64(l_m / Om))) t_2 = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * U_42_)) - t_1)))) tmp = 0.0 if (n <= -1.75e+29) tmp = t_2; elseif (n <= -2e-310) tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5; elseif (n <= 1.35e-97) tmp = Float64(sqrt(Float64(U * Float64(t - t_1))) * sqrt(Float64(2.0 * n))); else tmp = t_2; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = 2.0 * (l_m * (l_m / Om)); t_2 = sqrt(((2.0 * (n * U)) * (t + ((n * (((l_m / Om) ^ 2.0) * U_42_)) - t_1)))); tmp = 0.0; if (n <= -1.75e+29) tmp = t_2; elseif (n <= -2e-310) tmp = ((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5; elseif (n <= 1.35e-97) tmp = sqrt((U * (t - t_1))) * sqrt((2.0 * n)); else tmp = t_2; 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[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -1.75e+29], t$95$2, If[LessEqual[n, -2e-310], N[Power[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], 0.5], $MachinePrecision], If[LessEqual[n, 1.35e-97], N[(N[Sqrt[N[(U * N[(t - t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\\
t_2 := \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(n \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot U*\right) - t\_1\right)\right)}\\
\mathbf{if}\;n \leq -1.75 \cdot 10^{+29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;n \leq -2 \cdot 10^{-310}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;n \leq 1.35 \cdot 10^{-97}:\\
\;\;\;\;\sqrt{U \cdot \left(t - t\_1\right)} \cdot \sqrt{2 \cdot n}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if n < -1.74999999999999989e29 or 1.34999999999999993e-97 < n Initial program 56.6%
Simplified62.0%
associate-*r*63.5%
pow163.5%
Applied egg-rr63.5%
unpow163.5%
Simplified63.5%
Taylor expanded in U around 0 49.6%
mul-1-neg49.6%
associate-/l*49.7%
unpow249.7%
unpow249.7%
times-frac63.5%
unpow263.5%
Simplified63.5%
if -1.74999999999999989e29 < n < -1.999999999999994e-310Initial program 40.3%
Simplified47.3%
*-commutative47.3%
sqrt-prod0.0%
associate-*r/0.0%
pow20.0%
Applied egg-rr0.0%
fma-define0.0%
+-commutative0.0%
fma-define0.0%
associate-*r/0.0%
Simplified0.0%
Taylor expanded in n around 0 0.0%
sqrt-unprod46.4%
pow1/249.4%
Applied egg-rr49.4%
if -1.999999999999994e-310 < n < 1.34999999999999993e-97Initial program 43.0%
Simplified51.4%
*-commutative51.4%
sqrt-prod66.3%
associate-*r/64.2%
pow264.2%
Applied egg-rr64.2%
fma-define64.2%
+-commutative64.2%
fma-define64.2%
associate-*r/64.2%
Simplified64.2%
Taylor expanded in n around 0 66.9%
unpow266.9%
associate-*r/69.0%
*-commutative69.0%
Applied egg-rr69.0%
Final simplification59.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (or (<= Om -8.2e+113) (not (<= Om 4.7e+68)))
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (* n (* (pow (/ l_m Om) 2.0) U*)) (* 2.0 (* l_m (/ l_m Om)))))))
(sqrt
(*
2.0
(*
n
(+
(* U t)
(/ (* (pow l_m 2.0) (- (/ (* U (* n (- U* U))) Om) (* 2.0 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 ((Om <= -8.2e+113) || !(Om <= 4.7e+68)) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((n * (pow((l_m / Om), 2.0) * U_42_)) - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = sqrt((2.0 * (n * ((U * t) + ((pow(l_m, 2.0) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * 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 ((om <= (-8.2d+113)) .or. (.not. (om <= 4.7d+68))) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + ((n * (((l_m / om) ** 2.0d0) * u_42)) - (2.0d0 * (l_m * (l_m / om)))))))
else
tmp = sqrt((2.0d0 * (n * ((u * t) + (((l_m ** 2.0d0) * (((u * (n * (u_42 - u))) / om) - (2.0d0 * 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 ((Om <= -8.2e+113) || !(Om <= 4.7e+68)) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((n * (Math.pow((l_m / Om), 2.0) * U_42_)) - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.sqrt((2.0 * (n * ((U * t) + ((Math.pow(l_m, 2.0) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (Om <= -8.2e+113) or not (Om <= 4.7e+68): tmp = math.sqrt(((2.0 * (n * U)) * (t + ((n * (math.pow((l_m / Om), 2.0) * U_42_)) - (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.sqrt((2.0 * (n * ((U * t) + ((math.pow(l_m, 2.0) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if ((Om <= -8.2e+113) || !(Om <= 4.7e+68)) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * U_42_)) - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = sqrt(Float64(2.0 * Float64(n * Float64(Float64(U * t) + Float64(Float64((l_m ^ 2.0) * Float64(Float64(Float64(U * Float64(n * Float64(U_42_ - U))) / Om) - Float64(2.0 * 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 ((Om <= -8.2e+113) || ~((Om <= 4.7e+68))) tmp = sqrt(((2.0 * (n * U)) * (t + ((n * (((l_m / Om) ^ 2.0) * U_42_)) - (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt((2.0 * (n * ((U * t) + (((l_m ^ 2.0) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[Or[LessEqual[Om, -8.2e+113], N[Not[LessEqual[Om, 4.7e+68]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(N[(U * t), $MachinePrecision] + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(U * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -8.2 \cdot 10^{+113} \lor \neg \left(Om \leq 4.7 \cdot 10^{+68}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(n \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot U*\right) - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t + \frac{{l\_m}^{2} \cdot \left(\frac{U \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} - 2 \cdot U\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if Om < -8.19999999999999985e113 or 4.6999999999999996e68 < Om Initial program 55.4%
Simplified66.8%
associate-*r*66.8%
pow166.8%
Applied egg-rr66.8%
unpow166.8%
Simplified66.8%
Taylor expanded in U around 0 50.8%
mul-1-neg50.8%
associate-/l*54.7%
unpow254.7%
unpow254.7%
times-frac66.8%
unpow266.8%
Simplified66.8%
if -8.19999999999999985e113 < Om < 4.6999999999999996e68Initial program 44.5%
Simplified48.3%
Taylor expanded in Om around -inf 46.3%
+-commutative46.3%
mul-1-neg46.3%
unsub-neg46.3%
+-commutative46.3%
mul-1-neg46.3%
unsub-neg46.3%
associate-*r*46.3%
associate-/l*48.9%
associate-/l*47.5%
Simplified47.5%
Taylor expanded in l around 0 55.9%
Final simplification60.3%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 3.2e-197)
(sqrt (fabs (* 2.0 (* n (* U t)))))
(if (<= l_m 4.6e+213)
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (* (pow (/ l_m Om) 2.0) (* n U*)) (* (/ l_m Om) (* 2.0 l_m))))))
(pow (* (* U -4.0) (/ (* n (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 (l_m <= 3.2e-197) {
tmp = sqrt(fabs((2.0 * (n * (U * t)))));
} else if (l_m <= 4.6e+213) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((pow((l_m / Om), 2.0) * (n * U_42_)) - ((l_m / Om) * (2.0 * l_m))))));
} else {
tmp = pow(((U * -4.0) * ((n * 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 (l_m <= 3.2d-197) then
tmp = sqrt(abs((2.0d0 * (n * (u * t)))))
else if (l_m <= 4.6d+213) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + ((((l_m / om) ** 2.0d0) * (n * u_42)) - ((l_m / om) * (2.0d0 * l_m))))))
else
tmp = ((u * (-4.0d0)) * ((n * (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 (l_m <= 3.2e-197) {
tmp = Math.sqrt(Math.abs((2.0 * (n * (U * t)))));
} else if (l_m <= 4.6e+213) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((Math.pow((l_m / Om), 2.0) * (n * U_42_)) - ((l_m / Om) * (2.0 * l_m))))));
} else {
tmp = Math.pow(((U * -4.0) * ((n * 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 l_m <= 3.2e-197: tmp = math.sqrt(math.fabs((2.0 * (n * (U * t))))) elif l_m <= 4.6e+213: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((math.pow((l_m / Om), 2.0) * (n * U_42_)) - ((l_m / Om) * (2.0 * l_m)))))) else: tmp = math.pow(((U * -4.0) * ((n * 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 (l_m <= 3.2e-197) tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * t))))); elseif (l_m <= 4.6e+213) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64((Float64(l_m / Om) ^ 2.0) * Float64(n * U_42_)) - Float64(Float64(l_m / Om) * Float64(2.0 * l_m)))))); else tmp = Float64(Float64(U * -4.0) * Float64(Float64(n * (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 (l_m <= 3.2e-197) tmp = sqrt(abs((2.0 * (n * (U * t))))); elseif (l_m <= 4.6e+213) tmp = sqrt(((2.0 * (n * U)) * (t + ((((l_m / Om) ^ 2.0) * (n * U_42_)) - ((l_m / Om) * (2.0 * l_m)))))); else tmp = ((U * -4.0) * ((n * (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[l$95$m, 3.2e-197], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 4.6e+213], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(n * U$42$), $MachinePrecision]), $MachinePrecision] - N[(N[(l$95$m / Om), $MachinePrecision] * N[(2.0 * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(U * -4.0), $MachinePrecision] * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 3.2 \cdot 10^{-197}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right|}\\
\mathbf{elif}\;l\_m \leq 4.6 \cdot 10^{+213}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot \left(n \cdot U*\right) - \frac{l\_m}{Om} \cdot \left(2 \cdot l\_m\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(U \cdot -4\right) \cdot \frac{n \cdot {l\_m}^{2}}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 3.1999999999999997e-197Initial program 48.4%
Simplified54.4%
Taylor expanded in t around inf 41.8%
add-sqr-sqrt41.8%
pow1/241.8%
pow1/241.8%
pow-prod-down27.3%
pow227.3%
associate-*l*27.3%
Applied egg-rr27.3%
unpow1/227.3%
unpow227.3%
rem-sqrt-square42.1%
Simplified42.1%
if 3.1999999999999997e-197 < l < 4.59999999999999996e213Initial program 58.3%
Simplified63.8%
associate-*r*63.8%
pow163.8%
Applied egg-rr63.8%
unpow163.8%
Simplified63.8%
Taylor expanded in U around 0 50.8%
mul-1-neg50.8%
associate-/l*54.1%
unpow254.1%
unpow254.1%
times-frac63.8%
unpow263.8%
Simplified63.8%
associate-*r*63.8%
fma-define67.2%
distribute-lft-neg-in67.2%
Applied egg-rr67.2%
distribute-lft-neg-out67.2%
distribute-rgt-neg-in67.2%
fmm-undef63.8%
*-commutative63.8%
associate-*r*61.6%
*-commutative61.6%
Simplified61.6%
if 4.59999999999999996e213 < l Initial program 6.7%
Simplified12.3%
Taylor expanded in Om around inf 9.0%
add-sqr-sqrt9.0%
pow29.0%
fma-define9.0%
associate-/l*9.0%
Applied egg-rr9.0%
Taylor expanded in l around inf 9.0%
associate-*r/9.0%
associate-*r*9.0%
Simplified9.0%
pow1/226.5%
associate-/l*26.5%
*-commutative26.5%
*-commutative26.5%
Applied egg-rr26.5%
Final simplification47.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n -2e-310) (pow (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))) 0.5) (* (sqrt (* U (- t (* 2.0 (* l_m (/ l_m Om)))))) (sqrt (* 2.0 n)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= -2e-310) {
tmp = pow(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
} else {
tmp = sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))) * sqrt((2.0 * n));
}
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 (n <= (-2d-310)) then
tmp = ((2.0d0 * n) * (u * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))) ** 0.5d0
else
tmp = sqrt((u * (t - (2.0d0 * (l_m * (l_m / om)))))) * sqrt((2.0d0 * n))
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 (n <= -2e-310) {
tmp = Math.pow(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
} else {
tmp = Math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))) * Math.sqrt((2.0 * n));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= -2e-310: tmp = math.pow(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5) else: tmp = math.sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))) * math.sqrt((2.0 * n)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= -2e-310) tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5; else tmp = Float64(sqrt(Float64(U * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))) * sqrt(Float64(2.0 * n))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (n <= -2e-310) tmp = ((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5; else tmp = sqrt((U * (t - (2.0 * (l_m * (l_m / Om)))))) * sqrt((2.0 * n)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, -2e-310], N[Power[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], 0.5], $MachinePrecision], N[(N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq -2 \cdot 10^{-310}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)} \cdot \sqrt{2 \cdot n}\\
\end{array}
\end{array}
if n < -1.999999999999994e-310Initial program 46.0%
Simplified54.3%
*-commutative54.3%
sqrt-prod0.0%
associate-*r/0.0%
pow20.0%
Applied egg-rr0.0%
fma-define0.0%
+-commutative0.0%
fma-define0.0%
associate-*r/0.0%
Simplified0.0%
Taylor expanded in n around 0 0.0%
sqrt-unprod42.5%
pow1/250.0%
Applied egg-rr50.0%
if -1.999999999999994e-310 < n Initial program 52.3%
Simplified56.9%
*-commutative56.9%
sqrt-prod65.3%
associate-*r/62.0%
pow262.0%
Applied egg-rr62.0%
fma-define62.0%
+-commutative62.0%
fma-define62.1%
associate-*r/62.1%
Simplified62.1%
Taylor expanded in n around 0 53.1%
unpow253.1%
associate-*r/56.4%
*-commutative56.4%
Applied egg-rr56.4%
Final simplification52.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 2.1e+105) (sqrt (* 2.0 (* n (+ (* U t) (* -2.0 (/ (* U (* l_m l_m)) Om)))))) (pow (* (* U -4.0) (/ (* n (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 (l_m <= 2.1e+105) {
tmp = sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))));
} else {
tmp = pow(((U * -4.0) * ((n * 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 (l_m <= 2.1d+105) then
tmp = sqrt((2.0d0 * (n * ((u * t) + ((-2.0d0) * ((u * (l_m * l_m)) / om))))))
else
tmp = ((u * (-4.0d0)) * ((n * (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 (l_m <= 2.1e+105) {
tmp = Math.sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))));
} else {
tmp = Math.pow(((U * -4.0) * ((n * 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 l_m <= 2.1e+105: tmp = math.sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om)))))) else: tmp = math.pow(((U * -4.0) * ((n * 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 (l_m <= 2.1e+105) tmp = sqrt(Float64(2.0 * Float64(n * Float64(Float64(U * t) + Float64(-2.0 * Float64(Float64(U * Float64(l_m * l_m)) / Om)))))); else tmp = Float64(Float64(U * -4.0) * Float64(Float64(n * (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 (l_m <= 2.1e+105) tmp = sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om)))))); else tmp = ((U * -4.0) * ((n * (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[l$95$m, 2.1e+105], N[Sqrt[N[(2.0 * N[(n * N[(N[(U * t), $MachinePrecision] + N[(-2.0 * N[(N[(U * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(U * -4.0), $MachinePrecision] * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.1 \cdot 10^{+105}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t + -2 \cdot \frac{U \cdot \left(l\_m \cdot l\_m\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(U \cdot -4\right) \cdot \frac{n \cdot {l\_m}^{2}}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 2.1000000000000001e105Initial program 54.2%
Simplified59.8%
Taylor expanded in Om around inf 48.4%
unpow248.4%
Applied egg-rr48.4%
if 2.1000000000000001e105 < l Initial program 20.8%
Simplified32.9%
Taylor expanded in Om around inf 17.2%
add-sqr-sqrt17.2%
pow217.2%
fma-define17.2%
associate-/l*19.5%
Applied egg-rr19.5%
Taylor expanded in l around inf 17.2%
associate-*r/17.2%
associate-*r*17.2%
Simplified17.2%
pow1/234.8%
associate-/l*34.9%
*-commutative34.9%
*-commutative34.9%
Applied egg-rr34.9%
Final simplification46.3%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 2e+113) (sqrt (* 2.0 (* n (+ (* U t) (* -2.0 (/ (* U (* l_m l_m)) Om)))))) (* l_m (* (* n (/ (sqrt 2.0) Om)) (sqrt (* U U*))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2e+113) {
tmp = sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))));
} else {
tmp = l_m * ((n * (sqrt(2.0) / Om)) * sqrt((U * U_42_)));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 2d+113) then
tmp = sqrt((2.0d0 * (n * ((u * t) + ((-2.0d0) * ((u * (l_m * l_m)) / om))))))
else
tmp = l_m * ((n * (sqrt(2.0d0) / om)) * sqrt((u * u_42)))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2e+113) {
tmp = Math.sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))));
} else {
tmp = l_m * ((n * (Math.sqrt(2.0) / Om)) * Math.sqrt((U * U_42_)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 2e+113: tmp = math.sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om)))))) else: tmp = l_m * ((n * (math.sqrt(2.0) / Om)) * math.sqrt((U * U_42_))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 2e+113) tmp = sqrt(Float64(2.0 * Float64(n * Float64(Float64(U * t) + Float64(-2.0 * Float64(Float64(U * Float64(l_m * l_m)) / Om)))))); else tmp = Float64(l_m * Float64(Float64(n * Float64(sqrt(2.0) / Om)) * sqrt(Float64(U * U_42_)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 2e+113) tmp = sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om)))))); else tmp = l_m * ((n * (sqrt(2.0) / Om)) * sqrt((U * U_42_))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2e+113], N[Sqrt[N[(2.0 * N[(n * N[(N[(U * t), $MachinePrecision] + N[(-2.0 * N[(N[(U * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[(N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2 \cdot 10^{+113}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t + -2 \cdot \frac{U \cdot \left(l\_m \cdot l\_m\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left(\left(n \cdot \frac{\sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}\right)\\
\end{array}
\end{array}
if l < 2e113Initial program 54.4%
Simplified59.9%
Taylor expanded in Om around inf 48.3%
unpow248.3%
Applied egg-rr48.3%
if 2e113 < l Initial program 17.2%
Simplified30.2%
Taylor expanded in U* around inf 27.5%
associate-/l*30.0%
Simplified30.0%
Taylor expanded in l around 0 27.5%
associate-/l*30.0%
associate-*r/30.0%
*-commutative30.0%
associate-*l*30.0%
Simplified30.0%
Final simplification45.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 2.45e+113) (sqrt (* 2.0 (* n (+ (* U t) (* -2.0 (/ (* U (* l_m l_m)) Om)))))) (* (* l_m (/ n Om)) (sqrt (* U (* 2.0 U*))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2.45e+113) {
tmp = sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))));
} else {
tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 2.45d+113) then
tmp = sqrt((2.0d0 * (n * ((u * t) + ((-2.0d0) * ((u * (l_m * l_m)) / om))))))
else
tmp = (l_m * (n / om)) * sqrt((u * (2.0d0 * u_42)))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2.45e+113) {
tmp = Math.sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))));
} else {
tmp = (l_m * (n / Om)) * Math.sqrt((U * (2.0 * U_42_)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 2.45e+113: tmp = math.sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om)))))) else: tmp = (l_m * (n / Om)) * math.sqrt((U * (2.0 * U_42_))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 2.45e+113) tmp = sqrt(Float64(2.0 * Float64(n * Float64(Float64(U * t) + Float64(-2.0 * Float64(Float64(U * Float64(l_m * l_m)) / Om)))))); else tmp = Float64(Float64(l_m * Float64(n / Om)) * sqrt(Float64(U * Float64(2.0 * U_42_)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 2.45e+113) tmp = sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om)))))); else tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2.45e+113], N[Sqrt[N[(2.0 * N[(n * N[(N[(U * t), $MachinePrecision] + N[(-2.0 * N[(N[(U * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.45 \cdot 10^{+113}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t + -2 \cdot \frac{U \cdot \left(l\_m \cdot l\_m\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot \left(2 \cdot U*\right)}\\
\end{array}
\end{array}
if l < 2.45000000000000011e113Initial program 54.4%
Simplified59.9%
Taylor expanded in Om around inf 48.3%
unpow248.3%
Applied egg-rr48.3%
if 2.45000000000000011e113 < l Initial program 17.2%
Simplified32.5%
associate-*r*32.5%
pow132.5%
Applied egg-rr32.5%
unpow132.5%
Simplified32.5%
Taylor expanded in U around 0 16.4%
mul-1-neg16.4%
associate-/l*16.4%
unpow216.4%
unpow216.4%
times-frac32.7%
unpow232.7%
Simplified32.7%
add-cube-cbrt32.6%
pow332.6%
Applied egg-rr32.6%
Taylor expanded in n around inf 27.4%
associate-/l*29.8%
rem-cube-cbrt30.0%
*-commutative30.0%
Simplified30.0%
Final simplification45.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 2.7e+42)
(sqrt (* (* 2.0 n) (* U t)))
(if (<= l_m 1.26e+113)
(sqrt (/ (* (* U -4.0) (* n (* l_m l_m))) Om))
(* (* l_m (/ n Om)) (sqrt (* U (* 2.0 U*)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2.7e+42) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else if (l_m <= 1.26e+113) {
tmp = sqrt((((U * -4.0) * (n * (l_m * l_m))) / Om));
} else {
tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 2.7d+42) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else if (l_m <= 1.26d+113) then
tmp = sqrt((((u * (-4.0d0)) * (n * (l_m * l_m))) / om))
else
tmp = (l_m * (n / om)) * sqrt((u * (2.0d0 * u_42)))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 2.7e+42) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else if (l_m <= 1.26e+113) {
tmp = Math.sqrt((((U * -4.0) * (n * (l_m * l_m))) / Om));
} else {
tmp = (l_m * (n / Om)) * Math.sqrt((U * (2.0 * U_42_)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 2.7e+42: tmp = math.sqrt(((2.0 * n) * (U * t))) elif l_m <= 1.26e+113: tmp = math.sqrt((((U * -4.0) * (n * (l_m * l_m))) / Om)) else: tmp = (l_m * (n / Om)) * math.sqrt((U * (2.0 * U_42_))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 2.7e+42) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); elseif (l_m <= 1.26e+113) tmp = sqrt(Float64(Float64(Float64(U * -4.0) * Float64(n * Float64(l_m * l_m))) / Om)); else tmp = Float64(Float64(l_m * Float64(n / Om)) * sqrt(Float64(U * Float64(2.0 * U_42_)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 2.7e+42) tmp = sqrt(((2.0 * n) * (U * t))); elseif (l_m <= 1.26e+113) tmp = sqrt((((U * -4.0) * (n * (l_m * l_m))) / Om)); else tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2.7e+42], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.26e+113], N[Sqrt[N[(N[(N[(U * -4.0), $MachinePrecision] * N[(n * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.7 \cdot 10^{+42}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{elif}\;l\_m \leq 1.26 \cdot 10^{+113}:\\
\;\;\;\;\sqrt{\frac{\left(U \cdot -4\right) \cdot \left(n \cdot \left(l\_m \cdot l\_m\right)\right)}{Om}}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot \left(2 \cdot U*\right)}\\
\end{array}
\end{array}
if l < 2.7000000000000001e42Initial program 52.3%
Simplified58.3%
Taylor expanded in t around inf 42.2%
if 2.7000000000000001e42 < l < 1.2599999999999999e113Initial program 75.3%
Simplified75.7%
Taylor expanded in Om around inf 66.3%
add-sqr-sqrt65.9%
pow265.9%
fma-define65.9%
associate-/l*70.8%
Applied egg-rr70.8%
Taylor expanded in l around inf 57.2%
associate-*r/57.2%
associate-*r*57.2%
Simplified57.2%
unpow266.3%
Applied egg-rr57.2%
if 1.2599999999999999e113 < l Initial program 17.2%
Simplified32.5%
associate-*r*32.5%
pow132.5%
Applied egg-rr32.5%
unpow132.5%
Simplified32.5%
Taylor expanded in U around 0 16.4%
mul-1-neg16.4%
associate-/l*16.4%
unpow216.4%
unpow216.4%
times-frac32.7%
unpow232.7%
Simplified32.7%
add-cube-cbrt32.6%
pow332.6%
Applied egg-rr32.6%
Taylor expanded in n around inf 27.4%
associate-/l*29.8%
rem-cube-cbrt30.0%
*-commutative30.0%
Simplified30.0%
Final simplification41.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 5.4e+38) (sqrt (* (* 2.0 n) (* U t))) (sqrt (/ (* (* U -4.0) (* n (* l_m l_m))) Om))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5.4e+38) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = sqrt((((U * -4.0) * (n * (l_m * l_m))) / Om));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 5.4d+38) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = sqrt((((u * (-4.0d0)) * (n * (l_m * l_m))) / om))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5.4e+38) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.sqrt((((U * -4.0) * (n * (l_m * l_m))) / Om));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 5.4e+38: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.sqrt((((U * -4.0) * (n * (l_m * l_m))) / Om)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 5.4e+38) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = sqrt(Float64(Float64(Float64(U * -4.0) * Float64(n * Float64(l_m * l_m))) / Om)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 5.4e+38) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = sqrt((((U * -4.0) * (n * (l_m * l_m))) / Om)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 5.4e+38], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * -4.0), $MachinePrecision] * N[(n * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5.4 \cdot 10^{+38}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(U \cdot -4\right) \cdot \left(n \cdot \left(l\_m \cdot l\_m\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 5.39999999999999992e38Initial program 52.3%
Simplified58.3%
Taylor expanded in t around inf 42.2%
if 5.39999999999999992e38 < l Initial program 37.2%
Simplified45.9%
Taylor expanded in Om around inf 33.2%
add-sqr-sqrt33.0%
pow233.0%
fma-define33.0%
associate-/l*34.7%
Applied egg-rr34.7%
Taylor expanded in l around inf 28.4%
associate-*r/28.4%
associate-*r*28.4%
Simplified28.4%
unpow233.2%
Applied egg-rr28.4%
Final simplification39.1%
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 48.9%
Simplified55.5%
Taylor expanded in t around inf 35.8%
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(Float64(2.0 * 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[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}
\end{array}
Initial program 48.9%
Simplified55.5%
Taylor expanded in l around 0 32.6%
associate-*r*32.6%
Simplified32.6%
herbie shell --seed 2024180
(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*))))))