
(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 22 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}
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (- U* U) Om)))
(if (<= l 58000000.0)
(sqrt
(*
2.0
(*
n
(*
U
(fma
n
(* (pow (/ l Om) 2.0) (- U* U))
(fma l (* (/ l Om) -2.0) t))))))
(if (<= l 6e+149)
(sqrt
(*
2.0
(* U (fma n t (* (* l l) (* n (+ (* (/ n Om) t_1) (/ -2.0 Om))))))))
(*
(sqrt (* (* n U) (fma (/ n Om) t_1 (/ -2.0 Om))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (U_42_ - U) / Om;
double tmp;
if (l <= 58000000.0) {
tmp = sqrt((2.0 * (n * (U * fma(n, (pow((l / Om), 2.0) * (U_42_ - U)), fma(l, ((l / Om) * -2.0), t))))));
} else if (l <= 6e+149) {
tmp = sqrt((2.0 * (U * fma(n, t, ((l * l) * (n * (((n / Om) * t_1) + (-2.0 / Om))))))));
} else {
tmp = sqrt(((n * U) * fma((n / Om), t_1, (-2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(U_42_ - U) / Om) tmp = 0.0 if (l <= 58000000.0) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * fma(n, Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)), fma(l, Float64(Float64(l / Om) * -2.0), t)))))); elseif (l <= 6e+149) tmp = sqrt(Float64(2.0 * Float64(U * fma(n, t, Float64(Float64(l * l) * Float64(n * Float64(Float64(Float64(n / Om) * t_1) + Float64(-2.0 / Om)))))))); else tmp = Float64(sqrt(Float64(Float64(n * U) * fma(Float64(n / Om), t_1, Float64(-2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]}, If[LessEqual[l, 58000000.0], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 6e+149], N[Sqrt[N[(2.0 * N[(U * N[(n * t + N[(N[(l * l), $MachinePrecision] * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * t$95$1 + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{U* - U}{Om}\\
\mathbf{if}\;\ell \leq 58000000:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 6 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \mathsf{fma}\left(n, t, \left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{n}{Om} \cdot t_1 + \frac{-2}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, t_1, \frac{-2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if l < 5.8e7Initial program 55.1%
Simplified58.0%
pow158.0%
Applied egg-rr58.0%
unpow158.0%
associate-*l*59.9%
*-commutative59.9%
fma-udef59.9%
associate-*l*59.9%
fma-def59.9%
Simplified59.9%
if 5.8e7 < l < 6.00000000000000007e149Initial program 65.0%
Simplified61.1%
Taylor expanded in l around 0 73.4%
distribute-lft-out73.4%
fma-def73.4%
unpow273.4%
sub-neg73.4%
unpow273.4%
times-frac77.3%
associate-*r/77.3%
metadata-eval77.3%
distribute-neg-frac77.3%
metadata-eval77.3%
Simplified77.3%
if 6.00000000000000007e149 < l Initial program 11.0%
Simplified28.4%
pow128.4%
Applied egg-rr28.4%
unpow128.4%
associate-*l*30.2%
*-commutative30.2%
fma-udef30.2%
associate-*l*30.2%
fma-def30.2%
Simplified30.2%
Taylor expanded in l around inf 60.9%
associate-*r*70.5%
*-commutative70.5%
sub-neg70.5%
unpow270.5%
times-frac74.6%
associate-*r/74.6%
metadata-eval74.6%
distribute-neg-frac74.6%
metadata-eval74.6%
fma-udef74.6%
Simplified74.6%
Final simplification63.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* U (* 2.0 n)))
(t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_3 (* t_1 (- t_2 (- (* 2.0 (/ (* l l) Om)) t)))))
(if (<= t_3 5e-279)
(sqrt (* 2.0 (* n (* U (+ t (* -2.0 (/ l (/ Om l))))))))
(if (<= t_3 1e+304)
(sqrt (* t_1 (+ (- t (* 2.0 (* l (/ l Om)))) t_2)))
(*
(sqrt (* (* n U) (fma (/ n Om) (/ (- U* U) Om) (/ -2.0 Om))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = U * (2.0 * n);
double t_2 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = t_1 * (t_2 - ((2.0 * ((l * l) / Om)) - t));
double tmp;
if (t_3 <= 5e-279) {
tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l))))))));
} else if (t_3 <= 1e+304) {
tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) + t_2)));
} else {
tmp = sqrt(((n * U) * fma((n / Om), ((U_42_ - U) / Om), (-2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(U * Float64(2.0 * n)) t_2 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = Float64(t_1 * Float64(t_2 - Float64(Float64(2.0 * Float64(Float64(l * l) / Om)) - t))) tmp = 0.0 if (t_3 <= 5e-279) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))))))); elseif (t_3 <= 1e+304) tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_2))); else tmp = Float64(sqrt(Float64(Float64(n * U) * fma(Float64(n / Om), Float64(Float64(U_42_ - U) / Om), Float64(-2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t$95$2 - N[(N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 5e-279], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+304], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := U \cdot \left(2 \cdot n\right)\\
t_2 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := t_1 \cdot \left(t_2 - \left(2 \cdot \frac{\ell \cdot \ell}{Om} - t\right)\right)\\
\mathbf{if}\;t_3 \leq 5 \cdot 10^{-279}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\
\mathbf{elif}\;t_3 \leq 10^{+304}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, \frac{U* - U}{Om}, \frac{-2}{Om}\right)} \cdot \left(\ell \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*)))) < 4.99999999999999969e-279Initial program 23.6%
Simplified25.7%
pow125.7%
Applied egg-rr25.7%
unpow125.7%
associate-*l*41.1%
*-commutative41.1%
fma-udef41.1%
associate-*l*41.1%
fma-def41.1%
Simplified41.1%
Taylor expanded in n around 0 40.8%
unpow240.8%
associate-/l*42.9%
Simplified42.9%
if 4.99999999999999969e-279 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 9.9999999999999994e303Initial program 98.6%
associate-*l/98.6%
Applied egg-rr98.6%
if 9.9999999999999994e303 < (*.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 22.0%
Simplified31.0%
pow131.0%
Applied egg-rr31.0%
unpow131.0%
associate-*l*33.3%
*-commutative33.3%
fma-udef33.3%
associate-*l*33.3%
fma-def33.3%
Simplified33.3%
Taylor expanded in l around inf 23.5%
associate-*r*26.1%
*-commutative26.1%
sub-neg26.1%
unpow226.1%
times-frac27.3%
associate-*r/27.3%
metadata-eval27.3%
distribute-neg-frac27.3%
metadata-eval27.3%
fma-udef27.3%
Simplified27.3%
Final simplification56.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* U (* 2.0 n)))
(t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_3 (* t_1 (- t_2 (- (* 2.0 (/ (* l l) Om)) t)))))
(if (<= t_3 5e-235)
(sqrt
(*
2.0
(*
n
(*
U
(fma n (* (/ l (/ Om l)) (/ U* Om)) (fma l (* (/ l Om) -2.0) t))))))
(if (<= t_3 1e+304)
(sqrt (* t_1 (+ (- t (* 2.0 (* l (/ l Om)))) t_2)))
(*
(sqrt (* (* n U) (fma (/ n Om) (/ (- U* U) Om) (/ -2.0 Om))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = U * (2.0 * n);
double t_2 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = t_1 * (t_2 - ((2.0 * ((l * l) / Om)) - t));
double tmp;
if (t_3 <= 5e-235) {
tmp = sqrt((2.0 * (n * (U * fma(n, ((l / (Om / l)) * (U_42_ / Om)), fma(l, ((l / Om) * -2.0), t))))));
} else if (t_3 <= 1e+304) {
tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) + t_2)));
} else {
tmp = sqrt(((n * U) * fma((n / Om), ((U_42_ - U) / Om), (-2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(U * Float64(2.0 * n)) t_2 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = Float64(t_1 * Float64(t_2 - Float64(Float64(2.0 * Float64(Float64(l * l) / Om)) - t))) tmp = 0.0 if (t_3 <= 5e-235) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * fma(n, Float64(Float64(l / Float64(Om / l)) * Float64(U_42_ / Om)), fma(l, Float64(Float64(l / Om) * -2.0), t)))))); elseif (t_3 <= 1e+304) tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_2))); else tmp = Float64(sqrt(Float64(Float64(n * U) * fma(Float64(n / Om), Float64(Float64(U_42_ - U) / Om), Float64(-2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t$95$2 - N[(N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 5e-235], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(n * N[(N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+304], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := U \cdot \left(2 \cdot n\right)\\
t_2 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := t_1 \cdot \left(t_2 - \left(2 \cdot \frac{\ell \cdot \ell}{Om} - t\right)\right)\\
\mathbf{if}\;t_3 \leq 5 \cdot 10^{-235}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \mathsf{fma}\left(n, \frac{\ell}{\frac{Om}{\ell}} \cdot \frac{U*}{Om}, \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)\right)\right)\right)}\\
\mathbf{elif}\;t_3 \leq 10^{+304}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, \frac{U* - U}{Om}, \frac{-2}{Om}\right)} \cdot \left(\ell \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*)))) < 4.9999999999999998e-235Initial program 28.0%
Simplified30.0%
pow130.0%
Applied egg-rr30.0%
unpow130.0%
associate-*l*44.5%
*-commutative44.5%
fma-udef44.5%
associate-*l*44.5%
fma-def44.5%
Simplified44.5%
Taylor expanded in U* around inf 36.3%
*-commutative36.3%
unpow236.3%
times-frac44.4%
unpow244.4%
associate-/l*46.4%
Simplified46.4%
if 4.9999999999999998e-235 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 9.9999999999999994e303Initial program 98.5%
associate-*l/98.6%
Applied egg-rr98.6%
if 9.9999999999999994e303 < (*.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 22.0%
Simplified31.0%
pow131.0%
Applied egg-rr31.0%
unpow131.0%
associate-*l*33.3%
*-commutative33.3%
fma-udef33.3%
associate-*l*33.3%
fma-def33.3%
Simplified33.3%
Taylor expanded in l around inf 23.5%
associate-*r*26.1%
*-commutative26.1%
sub-neg26.1%
unpow226.1%
times-frac27.3%
associate-*r/27.3%
metadata-eval27.3%
distribute-neg-frac27.3%
metadata-eval27.3%
fma-udef27.3%
Simplified27.3%
Final simplification56.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* U (* 2.0 n)))
(t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_3 (* t_1 (- t_2 (- (* 2.0 (/ (* l l) Om)) t)))))
(if (<= t_3 5e-279)
(sqrt (* 2.0 (* n (* U (+ t (* -2.0 (/ l (/ Om l))))))))
(if (<= t_3 1e+304)
(sqrt (* t_1 (+ (- t (* 2.0 (* l (/ l Om)))) t_2)))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (+ (/ -2.0 Om) (* (/ n Om) (/ U* Om)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = U * (2.0 * n);
double t_2 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = t_1 * (t_2 - ((2.0 * ((l * l) / Om)) - t));
double tmp;
if (t_3 <= 5e-279) {
tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l))))))));
} else if (t_3 <= 1e+304) {
tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) + t_2)));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = u * (2.0d0 * n)
t_2 = (n * ((l / om) ** 2.0d0)) * (u_42 - u)
t_3 = t_1 * (t_2 - ((2.0d0 * ((l * l) / om)) - t))
if (t_3 <= 5d-279) then
tmp = sqrt((2.0d0 * (n * (u * (t + ((-2.0d0) * (l / (om / l))))))))
else if (t_3 <= 1d+304) then
tmp = sqrt((t_1 * ((t - (2.0d0 * (l * (l / om)))) + t_2)))
else
tmp = (l * sqrt(2.0d0)) * sqrt((u * (n * (((-2.0d0) / om) + ((n / om) * (u_42 / om))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = U * (2.0 * n);
double t_2 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = t_1 * (t_2 - ((2.0 * ((l * l) / Om)) - t));
double tmp;
if (t_3 <= 5e-279) {
tmp = Math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l))))))));
} else if (t_3 <= 1e+304) {
tmp = Math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) + t_2)));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = U * (2.0 * n) t_2 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_3 = t_1 * (t_2 - ((2.0 * ((l * l) / Om)) - t)) tmp = 0 if t_3 <= 5e-279: tmp = math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l)))))))) elif t_3 <= 1e+304: tmp = math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) + t_2))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(U * Float64(2.0 * n)) t_2 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = Float64(t_1 * Float64(t_2 - Float64(Float64(2.0 * Float64(Float64(l * l) / Om)) - t))) tmp = 0.0 if (t_3 <= 5e-279) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))))))); elseif (t_3 <= 1e+304) tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_2))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(-2.0 / Om) + Float64(Float64(n / Om) * Float64(U_42_ / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = U * (2.0 * n); t_2 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_3 = t_1 * (t_2 - ((2.0 * ((l * l) / Om)) - t)); tmp = 0.0; if (t_3 <= 5e-279) tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l)))))))); elseif (t_3 <= 1e+304) tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) + t_2))); else tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t$95$2 - N[(N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 5e-279], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+304], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(-2.0 / Om), $MachinePrecision] + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := U \cdot \left(2 \cdot n\right)\\
t_2 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := t_1 \cdot \left(t_2 - \left(2 \cdot \frac{\ell \cdot \ell}{Om} - t\right)\right)\\
\mathbf{if}\;t_3 \leq 5 \cdot 10^{-279}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\
\mathbf{elif}\;t_3 \leq 10^{+304}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{-2}{Om} + \frac{n}{Om} \cdot \frac{U*}{Om}\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*)))) < 4.99999999999999969e-279Initial program 23.6%
Simplified25.7%
pow125.7%
Applied egg-rr25.7%
unpow125.7%
associate-*l*41.1%
*-commutative41.1%
fma-udef41.1%
associate-*l*41.1%
fma-def41.1%
Simplified41.1%
Taylor expanded in n around 0 40.8%
unpow240.8%
associate-/l*42.9%
Simplified42.9%
if 4.99999999999999969e-279 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 9.9999999999999994e303Initial program 98.6%
associate-*l/98.6%
Applied egg-rr98.6%
if 9.9999999999999994e303 < (*.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 22.0%
Simplified31.0%
pow131.0%
Applied egg-rr31.0%
unpow131.0%
associate-*l*33.3%
*-commutative33.3%
fma-udef33.3%
associate-*l*33.3%
fma-def33.3%
Simplified33.3%
Taylor expanded in U* around inf 22.2%
*-commutative22.2%
unpow222.2%
times-frac24.5%
unpow224.5%
associate-/l*33.4%
Simplified33.4%
Taylor expanded in l around inf 23.5%
sub-neg23.5%
unpow223.5%
times-frac25.5%
associate-*r/25.5%
metadata-eval25.5%
distribute-neg-frac25.5%
metadata-eval25.5%
Simplified25.5%
Final simplification56.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.35e-183)
(* (sqrt 2.0) (sqrt (* t (* n U))))
(if (<= l 1.02e-47)
(sqrt
(*
(* 2.0 U)
(*
n
(+ (fma l (* (/ l Om) -2.0) t) (* (/ U* Om) (/ (* n (* l l)) Om))))))
(if (<= l 2.25e-23)
(sqrt
(*
2.0
(*
n
(*
U
(+
t
(*
(* l l)
(-
(- (* n (/ (/ U* Om) Om)) (* (/ n Om) (/ U Om)))
(/ 2.0 Om))))))))
(if (<= l 1.9e+151)
(sqrt
(*
2.0
(*
U
(fma
n
t
(* (* l l) (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om))))))))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (+ (/ -2.0 Om) (* (/ n Om) (/ U* Om))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.35e-183) {
tmp = sqrt(2.0) * sqrt((t * (n * U)));
} else if (l <= 1.02e-47) {
tmp = sqrt(((2.0 * U) * (n * (fma(l, ((l / Om) * -2.0), t) + ((U_42_ / Om) * ((n * (l * l)) / Om))))));
} else if (l <= 2.25e-23) {
tmp = sqrt((2.0 * (n * (U * (t + ((l * l) * (((n * ((U_42_ / Om) / Om)) - ((n / Om) * (U / Om))) - (2.0 / Om))))))));
} else if (l <= 1.9e+151) {
tmp = sqrt((2.0 * (U * fma(n, t, ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om))))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.35e-183) tmp = Float64(sqrt(2.0) * sqrt(Float64(t * Float64(n * U)))); elseif (l <= 1.02e-47) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(fma(l, Float64(Float64(l / Om) * -2.0), t) + Float64(Float64(U_42_ / Om) * Float64(Float64(n * Float64(l * l)) / Om)))))); elseif (l <= 2.25e-23) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64(l * l) * Float64(Float64(Float64(n * Float64(Float64(U_42_ / Om) / Om)) - Float64(Float64(n / Om) * Float64(U / Om))) - Float64(2.0 / Om)))))))); elseif (l <= 1.9e+151) tmp = sqrt(Float64(2.0 * Float64(U * fma(n, t, Float64(Float64(l * l) * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om)))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(-2.0 / Om) + Float64(Float64(n / Om) * Float64(U_42_ / Om))))))); end return tmp end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.35e-183], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.02e-47], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] + t), $MachinePrecision] + N[(N[(U$42$ / Om), $MachinePrecision] * N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.25e-23], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(l * l), $MachinePrecision] * N[(N[(N[(n * N[(N[(U$42$ / Om), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(U / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.9e+151], N[Sqrt[N[(2.0 * N[(U * N[(n * t + N[(N[(l * l), $MachinePrecision] * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(-2.0 / Om), $MachinePrecision] + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.35 \cdot 10^{-183}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{t \cdot \left(n \cdot U\right)}\\
\mathbf{elif}\;\ell \leq 1.02 \cdot 10^{-47}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(\mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right) + \frac{U*}{Om} \cdot \frac{n \cdot \left(\ell \cdot \ell\right)}{Om}\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.25 \cdot 10^{-23}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\left(n \cdot \frac{\frac{U*}{Om}}{Om} - \frac{n}{Om} \cdot \frac{U}{Om}\right) - \frac{2}{Om}\right)\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.9 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \mathsf{fma}\left(n, t, \left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{-2}{Om} + \frac{n}{Om} \cdot \frac{U*}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 1.35000000000000004e-183Initial program 53.0%
Simplified56.5%
Taylor expanded in l around 0 38.7%
*-commutative38.7%
associate-*r*39.3%
*-commutative39.3%
Simplified39.3%
if 1.35000000000000004e-183 < l < 1.02000000000000002e-47Initial program 62.0%
Simplified57.9%
Taylor expanded in U around 0 54.3%
Simplified58.3%
if 1.02000000000000002e-47 < l < 2.24999999999999987e-23Initial program 52.0%
Simplified52.0%
pow152.0%
Applied egg-rr52.0%
unpow152.0%
associate-*l*76.1%
*-commutative76.1%
fma-udef76.1%
associate-*l*76.1%
fma-def76.1%
Simplified76.1%
Taylor expanded in l around 0 76.1%
unpow276.1%
associate-/l*76.1%
unpow276.1%
associate-*r/76.1%
metadata-eval76.1%
Simplified76.1%
Taylor expanded in U* around 0 74.6%
+-commutative74.6%
mul-1-neg74.6%
unsub-neg74.6%
associate-/l*74.6%
associate-/r/74.6%
unpow274.6%
associate-/r*74.6%
unpow274.6%
times-frac74.6%
Simplified74.6%
if 2.24999999999999987e-23 < l < 1.9e151Initial program 68.7%
Simplified65.5%
Taylor expanded in l around 0 75.4%
distribute-lft-out75.4%
fma-def75.4%
unpow275.4%
sub-neg75.4%
unpow275.4%
times-frac78.6%
associate-*r/78.6%
metadata-eval78.6%
distribute-neg-frac78.6%
metadata-eval78.6%
Simplified78.6%
if 1.9e151 < l Initial program 11.0%
Simplified28.4%
pow128.4%
Applied egg-rr28.4%
unpow128.4%
associate-*l*30.2%
*-commutative30.2%
fma-udef30.2%
associate-*l*30.2%
fma-def30.2%
Simplified30.2%
Taylor expanded in U* around inf 10.2%
*-commutative10.2%
unpow210.2%
times-frac11.0%
unpow211.0%
associate-/l*30.3%
Simplified30.3%
Taylor expanded in l around inf 60.9%
sub-neg60.9%
unpow260.9%
times-frac68.0%
associate-*r/68.0%
metadata-eval68.0%
distribute-neg-frac68.0%
metadata-eval68.0%
Simplified68.0%
Final simplification50.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 6.8e-77)
(sqrt (* 2.0 (fma -2.0 (* U (* l (/ (* l n) Om))) (* n (* U t)))))
(if (<= l 2.7e+151)
(sqrt
(*
2.0
(*
U
(fma
n
t
(* (* l l) (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om))))))))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (+ (/ -2.0 Om) (* (/ n Om) (/ U* Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.8e-77) {
tmp = sqrt((2.0 * fma(-2.0, (U * (l * ((l * n) / Om))), (n * (U * t)))));
} else if (l <= 2.7e+151) {
tmp = sqrt((2.0 * (U * fma(n, t, ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om))))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.8e-77) tmp = sqrt(Float64(2.0 * fma(-2.0, Float64(U * Float64(l * Float64(Float64(l * n) / Om))), Float64(n * Float64(U * t))))); elseif (l <= 2.7e+151) tmp = sqrt(Float64(2.0 * Float64(U * fma(n, t, Float64(Float64(l * l) * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om)))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(-2.0 / Om) + Float64(Float64(n / Om) * Float64(U_42_ / Om))))))); end return tmp end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 6.8e-77], N[Sqrt[N[(2.0 * N[(-2.0 * N[(U * N[(l * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.7e+151], N[Sqrt[N[(2.0 * N[(U * N[(n * t + N[(N[(l * l), $MachinePrecision] * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(-2.0 / Om), $MachinePrecision] + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.8 \cdot 10^{-77}:\\
\;\;\;\;\sqrt{2 \cdot \mathsf{fma}\left(-2, U \cdot \left(\ell \cdot \frac{\ell \cdot n}{Om}\right), n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.7 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \mathsf{fma}\left(n, t, \left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{-2}{Om} + \frac{n}{Om} \cdot \frac{U*}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 6.79999999999999966e-77Initial program 54.0%
Simplified57.1%
Taylor expanded in l around 0 42.6%
distribute-lft-out42.6%
fma-def43.8%
unpow243.8%
sub-neg43.8%
unpow243.8%
times-frac51.1%
associate-*r/51.1%
metadata-eval51.1%
distribute-neg-frac51.1%
metadata-eval51.1%
Simplified51.1%
Taylor expanded in Om around inf 45.0%
fma-def45.0%
associate-*r/45.9%
associate-*r/46.8%
unpow246.8%
associate-*l*49.1%
associate-*r/50.2%
associate-*r*49.2%
*-commutative49.2%
associate-*r*52.6%
Simplified52.6%
if 6.79999999999999966e-77 < l < 2.7000000000000001e151Initial program 66.1%
Simplified63.7%
Taylor expanded in l around 0 70.5%
distribute-lft-out70.5%
fma-def70.5%
unpow270.5%
sub-neg70.5%
unpow270.5%
times-frac72.9%
associate-*r/72.9%
metadata-eval72.9%
distribute-neg-frac72.9%
metadata-eval72.9%
Simplified72.9%
if 2.7000000000000001e151 < l Initial program 11.0%
Simplified28.4%
pow128.4%
Applied egg-rr28.4%
unpow128.4%
associate-*l*30.2%
*-commutative30.2%
fma-udef30.2%
associate-*l*30.2%
fma-def30.2%
Simplified30.2%
Taylor expanded in U* around inf 10.2%
*-commutative10.2%
unpow210.2%
times-frac11.0%
unpow211.0%
associate-/l*30.3%
Simplified30.3%
Taylor expanded in l around inf 60.9%
sub-neg60.9%
unpow260.9%
times-frac68.0%
associate-*r/68.0%
metadata-eval68.0%
distribute-neg-frac68.0%
metadata-eval68.0%
Simplified68.0%
Final simplification57.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 7e-76)
(sqrt
(*
(* 2.0 (* n U))
(+ (+ t (* -2.0 (/ (* l l) Om))) (* n (* (pow (/ l Om) 2.0) (- U* U))))))
(if (<= l 2.8e+151)
(sqrt
(*
2.0
(*
U
(fma
n
t
(* (* l l) (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om))))))))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (+ (/ -2.0 Om) (* (/ n Om) (/ U* Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 7e-76) {
tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * ((l * l) / Om))) + (n * (pow((l / Om), 2.0) * (U_42_ - U))))));
} else if (l <= 2.8e+151) {
tmp = sqrt((2.0 * (U * fma(n, t, ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om))))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 7e-76) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t + Float64(-2.0 * Float64(Float64(l * l) / Om))) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)))))); elseif (l <= 2.8e+151) tmp = sqrt(Float64(2.0 * Float64(U * fma(n, t, Float64(Float64(l * l) * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om)))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(-2.0 / Om) + Float64(Float64(n / Om) * Float64(U_42_ / Om))))))); end return tmp end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 7e-76], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $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] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.8e+151], N[Sqrt[N[(2.0 * N[(U * N[(n * t + N[(N[(l * l), $MachinePrecision] * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(-2.0 / Om), $MachinePrecision] + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7 \cdot 10^{-76}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \frac{\ell \cdot \ell}{Om}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.8 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \mathsf{fma}\left(n, t, \left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{-2}{Om} + \frac{n}{Om} \cdot \frac{U*}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 6.99999999999999995e-76Initial program 54.0%
Simplified54.5%
if 6.99999999999999995e-76 < l < 2.79999999999999987e151Initial program 66.1%
Simplified63.7%
Taylor expanded in l around 0 70.5%
distribute-lft-out70.5%
fma-def70.5%
unpow270.5%
sub-neg70.5%
unpow270.5%
times-frac72.9%
associate-*r/72.9%
metadata-eval72.9%
distribute-neg-frac72.9%
metadata-eval72.9%
Simplified72.9%
if 2.79999999999999987e151 < l Initial program 11.0%
Simplified28.4%
pow128.4%
Applied egg-rr28.4%
unpow128.4%
associate-*l*30.2%
*-commutative30.2%
fma-udef30.2%
associate-*l*30.2%
fma-def30.2%
Simplified30.2%
Taylor expanded in U* around inf 10.2%
*-commutative10.2%
unpow210.2%
times-frac11.0%
unpow211.0%
associate-/l*30.3%
Simplified30.3%
Taylor expanded in l around inf 60.9%
sub-neg60.9%
unpow260.9%
times-frac68.0%
associate-*r/68.0%
metadata-eval68.0%
distribute-neg-frac68.0%
metadata-eval68.0%
Simplified68.0%
Final simplification59.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.15e-21)
(sqrt (* 2.0 (* n (* U (+ t (* -2.0 (/ l (/ Om l))))))))
(if (<= l 1.45e+144)
(sqrt
(*
2.0
(*
(* n U)
(fma (* l l) (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om)) t))))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (+ (/ -2.0 Om) (* (/ n Om) (/ U* Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.15e-21) {
tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l))))))));
} else if (l <= 1.45e+144) {
tmp = sqrt((2.0 * ((n * U) * fma((l * l), (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om)), t))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om))))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.15e-21) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))))))); elseif (l <= 1.45e+144) tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * fma(Float64(l * l), Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om)), t)))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(-2.0 / Om) + Float64(Float64(n / Om) * Float64(U_42_ / Om))))))); end return tmp end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.15e-21], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.45e+144], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(-2.0 / Om), $MachinePrecision] + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.15 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.45 \cdot 10^{+144}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{-2}{Om} + \frac{n}{Om} \cdot \frac{U*}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 1.15e-21Initial program 54.2%
Simplified57.2%
pow157.2%
Applied egg-rr57.2%
unpow157.2%
associate-*l*59.7%
*-commutative59.7%
fma-udef59.7%
associate-*l*59.7%
fma-def59.7%
Simplified59.7%
Taylor expanded in n around 0 49.5%
unpow249.5%
associate-/l*51.5%
Simplified51.5%
if 1.15e-21 < l < 1.44999999999999999e144Initial program 67.7%
Simplified64.4%
Taylor expanded in l around 0 71.3%
+-commutative71.3%
fma-def71.3%
unpow271.3%
sub-neg71.3%
unpow271.3%
times-frac74.6%
associate-*r/74.6%
metadata-eval74.6%
distribute-neg-frac74.6%
metadata-eval74.6%
Simplified74.6%
if 1.44999999999999999e144 < l Initial program 13.8%
Simplified30.6%
pow130.6%
Applied egg-rr30.6%
unpow130.6%
associate-*l*32.4%
*-commutative32.4%
fma-udef32.4%
associate-*l*32.4%
fma-def32.4%
Simplified32.4%
Taylor expanded in U* around inf 13.0%
*-commutative13.0%
unpow213.0%
times-frac13.8%
unpow213.8%
associate-/l*32.5%
Simplified32.5%
Taylor expanded in l around inf 62.1%
sub-neg62.1%
unpow262.1%
times-frac69.0%
associate-*r/69.0%
metadata-eval69.0%
distribute-neg-frac69.0%
metadata-eval69.0%
Simplified69.0%
Final simplification56.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.3e-183)
(* (sqrt 2.0) (sqrt (* t (* n U))))
(if (<= l 2.05e+138)
(sqrt
(*
2.0
(* n (* U (+ t (* (* l l) (- (/ U* (* Om (/ Om n))) (/ 2.0 Om))))))))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.3e-183) {
tmp = sqrt(2.0) * sqrt((t * (n * U)));
} else if (l <= 2.05e+138) {
tmp = sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om))))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (l <= 1.3d-183) then
tmp = sqrt(2.0d0) * sqrt((t * (n * u)))
else if (l <= 2.05d+138) then
tmp = sqrt((2.0d0 * (n * (u * (t + ((l * l) * ((u_42 / (om * (om / n))) - (2.0d0 / om))))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt((u * (n * (((n / om) * ((u_42 - u) / om)) + ((-2.0d0) / om)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.3e-183) {
tmp = Math.sqrt(2.0) * Math.sqrt((t * (n * U)));
} else if (l <= 2.05e+138) {
tmp = Math.sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om))))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.3e-183: tmp = math.sqrt(2.0) * math.sqrt((t * (n * U))) elif l <= 2.05e+138: tmp = math.sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om)))))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.3e-183) tmp = Float64(sqrt(2.0) * sqrt(Float64(t * Float64(n * U)))); elseif (l <= 2.05e+138) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64(l * l) * Float64(Float64(U_42_ / Float64(Om * Float64(Om / n))) - Float64(2.0 / Om)))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.3e-183) tmp = sqrt(2.0) * sqrt((t * (n * U))); elseif (l <= 2.05e+138) tmp = sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om)))))))); else tmp = (l * sqrt(2.0)) * sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.3e-183], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.05e+138], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(l * l), $MachinePrecision] * N[(N[(U$42$ / N[(Om * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.3 \cdot 10^{-183}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{t \cdot \left(n \cdot U\right)}\\
\mathbf{elif}\;\ell \leq 2.05 \cdot 10^{+138}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{U*}{Om \cdot \frac{Om}{n}} - \frac{2}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 1.2999999999999999e-183Initial program 53.0%
Simplified56.5%
Taylor expanded in l around 0 38.7%
*-commutative38.7%
associate-*r*39.3%
*-commutative39.3%
Simplified39.3%
if 1.2999999999999999e-183 < l < 2.0499999999999999e138Initial program 65.0%
Simplified65.0%
pow165.0%
Applied egg-rr65.0%
unpow165.0%
associate-*l*63.5%
*-commutative63.5%
fma-udef63.5%
associate-*l*63.5%
fma-def63.5%
Simplified63.5%
Taylor expanded in U* around inf 56.4%
*-commutative56.4%
unpow256.4%
times-frac63.5%
unpow263.5%
associate-/l*63.5%
Simplified63.5%
Taylor expanded in l around 0 60.1%
unpow260.1%
associate-/l*60.3%
unpow260.3%
associate-*r/60.4%
associate-*r/60.4%
metadata-eval60.4%
Simplified60.4%
if 2.0499999999999999e138 < l Initial program 18.0%
Simplified30.3%
Taylor expanded in l around inf 58.5%
sub-neg58.5%
unpow258.5%
times-frac64.7%
associate-*r/64.7%
metadata-eval64.7%
distribute-neg-frac64.7%
metadata-eval64.7%
Simplified64.7%
Final simplification47.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.4e-162)
(* (sqrt 2.0) (sqrt (* t (* n U))))
(if (<= l 6.2e+140)
(sqrt
(*
2.0
(* n (* U (- t (* (* l l) (- (/ 2.0 Om) (/ n (/ Om (/ U* Om))))))))))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (+ (/ -2.0 Om) (* (/ n Om) (/ U* Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.4e-162) {
tmp = sqrt(2.0) * sqrt((t * (n * U)));
} else if (l <= 6.2e+140) {
tmp = sqrt((2.0 * (n * (U * (t - ((l * l) * ((2.0 / Om) - (n / (Om / (U_42_ / Om))))))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (l <= 4.4d-162) then
tmp = sqrt(2.0d0) * sqrt((t * (n * u)))
else if (l <= 6.2d+140) then
tmp = sqrt((2.0d0 * (n * (u * (t - ((l * l) * ((2.0d0 / om) - (n / (om / (u_42 / om))))))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt((u * (n * (((-2.0d0) / om) + ((n / om) * (u_42 / om))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.4e-162) {
tmp = Math.sqrt(2.0) * Math.sqrt((t * (n * U)));
} else if (l <= 6.2e+140) {
tmp = Math.sqrt((2.0 * (n * (U * (t - ((l * l) * ((2.0 / Om) - (n / (Om / (U_42_ / Om))))))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.4e-162: tmp = math.sqrt(2.0) * math.sqrt((t * (n * U))) elif l <= 6.2e+140: tmp = math.sqrt((2.0 * (n * (U * (t - ((l * l) * ((2.0 / Om) - (n / (Om / (U_42_ / Om)))))))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.4e-162) tmp = Float64(sqrt(2.0) * sqrt(Float64(t * Float64(n * U)))); elseif (l <= 6.2e+140) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t - Float64(Float64(l * l) * Float64(Float64(2.0 / Om) - Float64(n / Float64(Om / Float64(U_42_ / Om)))))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(-2.0 / Om) + Float64(Float64(n / Om) * Float64(U_42_ / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.4e-162) tmp = sqrt(2.0) * sqrt((t * (n * U))); elseif (l <= 6.2e+140) tmp = sqrt((2.0 * (n * (U * (t - ((l * l) * ((2.0 / Om) - (n / (Om / (U_42_ / Om)))))))))); else tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((-2.0 / Om) + ((n / Om) * (U_42_ / Om)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.4e-162], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 6.2e+140], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t - N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] - N[(n / N[(Om / N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(-2.0 / Om), $MachinePrecision] + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.4 \cdot 10^{-162}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{t \cdot \left(n \cdot U\right)}\\
\mathbf{elif}\;\ell \leq 6.2 \cdot 10^{+140}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{2}{Om} - \frac{n}{\frac{Om}{\frac{U*}{Om}}}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{-2}{Om} + \frac{n}{Om} \cdot \frac{U*}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 4.3999999999999998e-162Initial program 53.6%
Simplified57.0%
Taylor expanded in l around 0 39.4%
*-commutative39.4%
associate-*r*40.0%
*-commutative40.0%
Simplified40.0%
if 4.3999999999999998e-162 < l < 6.2000000000000001e140Initial program 64.4%
Simplified64.4%
pow164.4%
Applied egg-rr64.4%
unpow164.4%
associate-*l*62.8%
*-commutative62.8%
fma-udef62.8%
associate-*l*62.8%
fma-def62.8%
Simplified62.8%
Taylor expanded in l around 0 57.6%
unpow257.6%
associate-/l*59.5%
unpow259.5%
associate-*r/59.5%
metadata-eval59.5%
Simplified59.5%
Taylor expanded in U* around inf 59.6%
unpow259.6%
associate-/l*61.4%
Simplified61.4%
if 6.2000000000000001e140 < l Initial program 15.8%
Simplified28.3%
pow128.3%
Applied egg-rr28.3%
unpow128.3%
associate-*l*29.9%
*-commutative29.9%
fma-udef29.9%
associate-*l*29.9%
fma-def29.9%
Simplified29.9%
Taylor expanded in U* around inf 12.0%
*-commutative12.0%
unpow212.0%
times-frac13.0%
unpow213.0%
associate-/l*30.1%
Simplified30.1%
Taylor expanded in l around inf 60.1%
sub-neg60.1%
unpow260.1%
times-frac66.4%
associate-*r/66.4%
metadata-eval66.4%
distribute-neg-frac66.4%
metadata-eval66.4%
Simplified66.4%
Final simplification48.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.2e-162)
(* (sqrt 2.0) (sqrt (* t (* n U))))
(if (<= l 1.85e+143)
(sqrt
(*
2.0
(* n (* U (- t (* (* l l) (- (/ 2.0 Om) (/ n (/ Om (/ U* Om))))))))))
(sqrt (* 2.0 (fma -2.0 (* U (* l (/ (* l n) Om))) (* n (* U t))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.2e-162) {
tmp = sqrt(2.0) * sqrt((t * (n * U)));
} else if (l <= 1.85e+143) {
tmp = sqrt((2.0 * (n * (U * (t - ((l * l) * ((2.0 / Om) - (n / (Om / (U_42_ / Om))))))))));
} else {
tmp = sqrt((2.0 * fma(-2.0, (U * (l * ((l * n) / Om))), (n * (U * t)))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.2e-162) tmp = Float64(sqrt(2.0) * sqrt(Float64(t * Float64(n * U)))); elseif (l <= 1.85e+143) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t - Float64(Float64(l * l) * Float64(Float64(2.0 / Om) - Float64(n / Float64(Om / Float64(U_42_ / Om)))))))))); else tmp = sqrt(Float64(2.0 * fma(-2.0, Float64(U * Float64(l * Float64(Float64(l * n) / Om))), Float64(n * Float64(U * t))))); end return tmp end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.2e-162], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.85e+143], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t - N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] - N[(n / N[(Om / N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(-2.0 * N[(U * N[(l * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.2 \cdot 10^{-162}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{t \cdot \left(n \cdot U\right)}\\
\mathbf{elif}\;\ell \leq 1.85 \cdot 10^{+143}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{2}{Om} - \frac{n}{\frac{Om}{\frac{U*}{Om}}}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \mathsf{fma}\left(-2, U \cdot \left(\ell \cdot \frac{\ell \cdot n}{Om}\right), n \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 5.1999999999999999e-162Initial program 53.6%
Simplified57.0%
Taylor expanded in l around 0 39.4%
*-commutative39.4%
associate-*r*40.0%
*-commutative40.0%
Simplified40.0%
if 5.1999999999999999e-162 < l < 1.8500000000000001e143Initial program 64.0%
Simplified62.3%
pow162.3%
Applied egg-rr62.3%
unpow162.3%
associate-*l*60.7%
*-commutative60.7%
fma-udef60.7%
associate-*l*60.7%
fma-def60.7%
Simplified60.7%
Taylor expanded in l around 0 55.8%
unpow255.8%
associate-/l*57.6%
unpow257.6%
associate-*r/57.6%
metadata-eval57.6%
Simplified57.6%
Taylor expanded in U* around inf 57.7%
unpow257.7%
associate-/l*59.5%
Simplified59.5%
if 1.8500000000000001e143 < l Initial program 13.5%
Simplified29.8%
Taylor expanded in l around 0 29.3%
distribute-lft-out29.3%
fma-def29.3%
unpow229.3%
sub-neg29.3%
unpow229.3%
times-frac29.5%
associate-*r/29.5%
metadata-eval29.5%
distribute-neg-frac29.5%
metadata-eval29.5%
Simplified29.5%
Taylor expanded in Om around inf 20.8%
fma-def20.8%
associate-*r/18.0%
associate-*r/17.2%
unpow217.2%
associate-*l*34.2%
associate-*r/44.7%
associate-*r*44.1%
*-commutative44.1%
associate-*r*44.7%
Simplified44.7%
Final simplification44.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.75e-182)
(* (sqrt 2.0) (sqrt (* t (* n U))))
(if (<= l 1.2e+124)
(sqrt
(*
2.0
(* n (* U (+ t (* (* l l) (- (/ U* (* Om (/ Om n))) (/ 2.0 Om))))))))
(sqrt
(*
2.0
(*
U
(* (* l l) (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.75e-182) {
tmp = sqrt(2.0) * sqrt((t * (n * U)));
} else if (l <= 1.2e+124) {
tmp = sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om))))))));
} else {
tmp = sqrt((2.0 * (U * ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om)))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (l <= 1.75d-182) then
tmp = sqrt(2.0d0) * sqrt((t * (n * u)))
else if (l <= 1.2d+124) then
tmp = sqrt((2.0d0 * (n * (u * (t + ((l * l) * ((u_42 / (om * (om / n))) - (2.0d0 / om))))))))
else
tmp = sqrt((2.0d0 * (u * ((l * l) * (n * (((n / om) * ((u_42 - u) / om)) + ((-2.0d0) / om)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.75e-182) {
tmp = Math.sqrt(2.0) * Math.sqrt((t * (n * U)));
} else if (l <= 1.2e+124) {
tmp = Math.sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om))))))));
} else {
tmp = Math.sqrt((2.0 * (U * ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.75e-182: tmp = math.sqrt(2.0) * math.sqrt((t * (n * U))) elif l <= 1.2e+124: tmp = math.sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om)))))))) else: tmp = math.sqrt((2.0 * (U * ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.75e-182) tmp = Float64(sqrt(2.0) * sqrt(Float64(t * Float64(n * U)))); elseif (l <= 1.2e+124) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64(l * l) * Float64(Float64(U_42_ / Float64(Om * Float64(Om / n))) - Float64(2.0 / Om)))))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(Float64(l * l) * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.75e-182) tmp = sqrt(2.0) * sqrt((t * (n * U))); elseif (l <= 1.2e+124) tmp = sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om)))))))); else tmp = sqrt((2.0 * (U * ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.75e-182], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.2e+124], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(l * l), $MachinePrecision] * N[(N[(U$42$ / N[(Om * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(N[(l * l), $MachinePrecision] * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.75 \cdot 10^{-182}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{t \cdot \left(n \cdot U\right)}\\
\mathbf{elif}\;\ell \leq 1.2 \cdot 10^{+124}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{U*}{Om \cdot \frac{Om}{n}} - \frac{2}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 1.74999999999999992e-182Initial program 53.0%
Simplified56.5%
Taylor expanded in l around 0 38.7%
*-commutative38.7%
associate-*r*39.3%
*-commutative39.3%
Simplified39.3%
if 1.74999999999999992e-182 < l < 1.20000000000000003e124Initial program 66.8%
Simplified66.8%
pow166.8%
Applied egg-rr66.8%
unpow166.8%
associate-*l*65.2%
*-commutative65.2%
fma-udef65.2%
associate-*l*65.2%
fma-def65.2%
Simplified65.2%
Taylor expanded in U* around inf 57.7%
*-commutative57.7%
unpow257.7%
times-frac65.2%
unpow265.2%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in l around 0 61.4%
unpow261.4%
associate-/l*61.6%
unpow261.6%
associate-*r/61.7%
associate-*r/61.7%
metadata-eval61.7%
Simplified61.7%
if 1.20000000000000003e124 < l Initial program 19.2%
Simplified30.5%
Taylor expanded in l around inf 30.6%
unpow230.6%
sub-neg30.6%
unpow230.6%
times-frac33.2%
associate-*r/33.2%
metadata-eval33.2%
distribute-neg-frac33.2%
metadata-eval33.2%
Simplified33.2%
Final simplification43.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 3.9e-159)
(sqrt (* 2.0 (* n (* U t))))
(if (<= l 4.4e+124)
(sqrt
(*
2.0
(* n (* U (+ t (* (* l l) (- (/ U* (* Om (/ Om n))) (/ 2.0 Om))))))))
(sqrt
(*
2.0
(*
U
(* (* l l) (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 3.9e-159) {
tmp = sqrt((2.0 * (n * (U * t))));
} else if (l <= 4.4e+124) {
tmp = sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om))))))));
} else {
tmp = sqrt((2.0 * (U * ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om)))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (l <= 3.9d-159) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else if (l <= 4.4d+124) then
tmp = sqrt((2.0d0 * (n * (u * (t + ((l * l) * ((u_42 / (om * (om / n))) - (2.0d0 / om))))))))
else
tmp = sqrt((2.0d0 * (u * ((l * l) * (n * (((n / om) * ((u_42 - u) / om)) + ((-2.0d0) / om)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 3.9e-159) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else if (l <= 4.4e+124) {
tmp = Math.sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om))))))));
} else {
tmp = Math.sqrt((2.0 * (U * ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 3.9e-159: tmp = math.sqrt((2.0 * (n * (U * t)))) elif l <= 4.4e+124: tmp = math.sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om)))))))) else: tmp = math.sqrt((2.0 * (U * ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 3.9e-159) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); elseif (l <= 4.4e+124) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64(l * l) * Float64(Float64(U_42_ / Float64(Om * Float64(Om / n))) - Float64(2.0 / Om)))))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(Float64(l * l) * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 3.9e-159) tmp = sqrt((2.0 * (n * (U * t)))); elseif (l <= 4.4e+124) tmp = sqrt((2.0 * (n * (U * (t + ((l * l) * ((U_42_ / (Om * (Om / n))) - (2.0 / Om)))))))); else tmp = sqrt((2.0 * (U * ((l * l) * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 3.9e-159], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 4.4e+124], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(l * l), $MachinePrecision] * N[(N[(U$42$ / N[(Om * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(N[(l * l), $MachinePrecision] * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.9 \cdot 10^{-159}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 4.4 \cdot 10^{+124}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{U*}{Om \cdot \frac{Om}{n}} - \frac{2}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 3.89999999999999977e-159Initial program 53.9%
Simplified57.3%
pow157.3%
Applied egg-rr57.3%
unpow157.3%
associate-*l*60.2%
*-commutative60.2%
fma-udef60.2%
associate-*l*60.2%
fma-def60.2%
Simplified60.2%
Taylor expanded in l around 0 42.4%
if 3.89999999999999977e-159 < l < 4.4000000000000002e124Initial program 64.9%
Simplified64.9%
pow164.9%
Applied egg-rr64.9%
unpow164.9%
associate-*l*63.1%
*-commutative63.1%
fma-udef63.1%
associate-*l*63.1%
fma-def63.1%
Simplified63.1%
Taylor expanded in U* around inf 55.2%
*-commutative55.2%
unpow255.2%
times-frac63.2%
unpow263.2%
associate-/l*63.2%
Simplified63.2%
Taylor expanded in l around 0 59.1%
unpow259.1%
associate-/l*61.3%
unpow261.3%
associate-*r/61.3%
associate-*r/61.3%
metadata-eval61.3%
Simplified61.3%
if 4.4000000000000002e124 < l Initial program 19.2%
Simplified30.5%
Taylor expanded in l around inf 30.6%
unpow230.6%
sub-neg30.6%
unpow230.6%
times-frac33.2%
associate-*r/33.2%
metadata-eval33.2%
distribute-neg-frac33.2%
metadata-eval33.2%
Simplified33.2%
Final simplification44.7%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= n 6.8e+84) (sqrt (* 2.0 (* n (* U (+ t (* -2.0 (/ l (/ Om l)))))))) (sqrt (* 2.0 (* n (* U (+ t (/ U* (/ (* Om Om) (* n (* l l)))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 6.8e+84) {
tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l))))))));
} else {
tmp = sqrt((2.0 * (n * (U * (t + (U_42_ / ((Om * Om) / (n * (l * l)))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (n <= 6.8d+84) then
tmp = sqrt((2.0d0 * (n * (u * (t + ((-2.0d0) * (l / (om / l))))))))
else
tmp = sqrt((2.0d0 * (n * (u * (t + (u_42 / ((om * om) / (n * (l * l)))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 6.8e+84) {
tmp = Math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l))))))));
} else {
tmp = Math.sqrt((2.0 * (n * (U * (t + (U_42_ / ((Om * Om) / (n * (l * l)))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= 6.8e+84: tmp = math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l)))))))) else: tmp = math.sqrt((2.0 * (n * (U * (t + (U_42_ / ((Om * Om) / (n * (l * l))))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 6.8e+84) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))))))); else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(U_42_ / Float64(Float64(Om * Om) / Float64(n * Float64(l * l))))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= 6.8e+84) tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l)))))))); else tmp = sqrt((2.0 * (n * (U * (t + (U_42_ / ((Om * Om) / (n * (l * l))))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 6.8e+84], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(U$42$ / N[(N[(Om * Om), $MachinePrecision] / N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq 6.8 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{U*}{\frac{Om \cdot Om}{n \cdot \left(\ell \cdot \ell\right)}}\right)\right)\right)}\\
\end{array}
\end{array}
if n < 6.7999999999999996e84Initial program 50.8%
Simplified54.1%
pow154.1%
Applied egg-rr54.1%
unpow154.1%
associate-*l*55.9%
*-commutative55.9%
fma-udef55.9%
associate-*l*55.9%
fma-def55.9%
Simplified55.9%
Taylor expanded in n around 0 47.2%
unpow247.2%
associate-/l*51.2%
Simplified51.2%
if 6.7999999999999996e84 < n Initial program 50.4%
Simplified57.9%
pow157.9%
Applied egg-rr57.9%
unpow157.9%
associate-*l*59.5%
*-commutative59.5%
fma-udef59.5%
associate-*l*59.5%
fma-def59.5%
Simplified59.5%
Taylor expanded in l around 0 38.0%
unpow238.0%
associate-/l*49.8%
unpow249.8%
associate-*r/49.8%
metadata-eval49.8%
Simplified49.8%
Taylor expanded in U* around inf 49.9%
associate-/l*49.9%
unpow249.9%
*-commutative49.9%
unpow249.9%
Simplified49.9%
Final simplification51.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 7e+113) (sqrt (* 2.0 (* n (* U t)))) (sqrt (* 2.0 (* -2.0 (/ U (/ Om (* n (* l l)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 7e+113) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = sqrt((2.0 * (-2.0 * (U / (Om / (n * (l * l)))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (l <= 7d+113) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = sqrt((2.0d0 * ((-2.0d0) * (u / (om / (n * (l * l)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 7e+113) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = Math.sqrt((2.0 * (-2.0 * (U / (Om / (n * (l * l)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 7e+113: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = math.sqrt((2.0 * (-2.0 * (U / (Om / (n * (l * l))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 7e+113) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = sqrt(Float64(2.0 * Float64(-2.0 * Float64(U / Float64(Om / Float64(n * Float64(l * l))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 7e+113) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = sqrt((2.0 * (-2.0 * (U / (Om / (n * (l * l))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 7e+113], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(-2.0 * N[(U / N[(Om / N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7 \cdot 10^{+113}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot \left(\ell \cdot \ell\right)}}\right)}\\
\end{array}
\end{array}
if l < 7.0000000000000001e113Initial program 56.2%
Simplified58.8%
pow158.8%
Applied egg-rr58.8%
unpow158.8%
associate-*l*60.7%
*-commutative60.7%
fma-udef60.7%
associate-*l*60.7%
fma-def60.7%
Simplified60.7%
Taylor expanded in l around 0 42.8%
if 7.0000000000000001e113 < l Initial program 21.2%
Simplified32.2%
Taylor expanded in l around inf 29.9%
unpow229.9%
sub-neg29.9%
unpow229.9%
times-frac32.5%
associate-*r/32.5%
metadata-eval32.5%
distribute-neg-frac32.5%
metadata-eval32.5%
Simplified32.5%
Taylor expanded in n around 0 20.1%
associate-/l*17.9%
*-commutative17.9%
unpow217.9%
Simplified17.9%
Final simplification38.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.55e+23) (sqrt (* 2.0 (* n (* U t)))) (sqrt (* 2.0 (* U (* -2.0 (/ (* l l) (/ Om n))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.55e+23) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = sqrt((2.0 * (U * (-2.0 * ((l * l) / (Om / n))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (l <= 1.55d+23) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = sqrt((2.0d0 * (u * ((-2.0d0) * ((l * l) / (om / n))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.55e+23) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = Math.sqrt((2.0 * (U * (-2.0 * ((l * l) / (Om / n))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.55e+23: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = math.sqrt((2.0 * (U * (-2.0 * ((l * l) / (Om / n)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.55e+23) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(-2.0 * Float64(Float64(l * l) / Float64(Om / n)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.55e+23) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = sqrt((2.0 * (U * (-2.0 * ((l * l) / (Om / n)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.55e+23], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(-2.0 * N[(N[(l * l), $MachinePrecision] / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.55 \cdot 10^{+23}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{\ell \cdot \ell}{\frac{Om}{n}}\right)\right)}\\
\end{array}
\end{array}
if l < 1.54999999999999985e23Initial program 55.0%
Simplified57.8%
pow157.8%
Applied egg-rr57.8%
unpow157.8%
associate-*l*59.7%
*-commutative59.7%
fma-udef59.7%
associate-*l*59.7%
fma-def59.7%
Simplified59.7%
Taylor expanded in l around 0 42.5%
if 1.54999999999999985e23 < l Initial program 33.0%
Simplified41.8%
Taylor expanded in l around inf 32.5%
unpow232.5%
sub-neg32.5%
unpow232.5%
times-frac34.6%
associate-*r/34.6%
metadata-eval34.6%
distribute-neg-frac34.6%
metadata-eval34.6%
Simplified34.6%
Taylor expanded in n around 0 17.0%
associate-/l*20.1%
unpow220.1%
Simplified20.1%
Final simplification38.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.05e+23) (sqrt (* 2.0 (* n (* U t)))) (sqrt (* 2.0 (* U (* (* l l) (* n (/ -2.0 Om))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.05e+23) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = sqrt((2.0 * (U * ((l * l) * (n * (-2.0 / Om))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (l <= 1.05d+23) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = sqrt((2.0d0 * (u * ((l * l) * (n * ((-2.0d0) / om))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.05e+23) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = Math.sqrt((2.0 * (U * ((l * l) * (n * (-2.0 / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.05e+23: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = math.sqrt((2.0 * (U * ((l * l) * (n * (-2.0 / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.05e+23) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(Float64(l * l) * Float64(n * Float64(-2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.05e+23) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = sqrt((2.0 * (U * ((l * l) * (n * (-2.0 / Om)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.05e+23], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(N[(l * l), $MachinePrecision] * N[(n * N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.05 \cdot 10^{+23}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot \frac{-2}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 1.0500000000000001e23Initial program 55.0%
Simplified57.8%
pow157.8%
Applied egg-rr57.8%
unpow157.8%
associate-*l*59.7%
*-commutative59.7%
fma-udef59.7%
associate-*l*59.7%
fma-def59.7%
Simplified59.7%
Taylor expanded in l around 0 42.5%
if 1.0500000000000001e23 < l Initial program 33.0%
Simplified41.8%
Taylor expanded in l around inf 32.5%
unpow232.5%
sub-neg32.5%
unpow232.5%
times-frac34.6%
associate-*r/34.6%
metadata-eval34.6%
distribute-neg-frac34.6%
metadata-eval34.6%
Simplified34.6%
Taylor expanded in n around 0 20.2%
associate-*r/20.2%
associate-*l/20.3%
*-commutative20.3%
Simplified20.3%
Final simplification38.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U (+ t (* -2.0 (/ l (/ Om l)))))))))
l = abs(l);
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 / (Om / l))))))));
}
NOTE: l should be positive before calling this function
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 / (om / l))))))))
end function
l = Math.abs(l);
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 / (Om / l))))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l))))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))))))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l / (Om / l)))))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}
\end{array}
Initial program 50.7%
Simplified54.7%
pow154.7%
Applied egg-rr54.7%
unpow154.7%
associate-*l*56.5%
*-commutative56.5%
fma-udef56.5%
associate-*l*56.5%
fma-def56.5%
Simplified56.5%
Taylor expanded in n around 0 45.5%
unpow245.5%
associate-/l*49.2%
Simplified49.2%
Final simplification49.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 2e-21) (sqrt (* 2.0 (* n (* U t)))) (pow (* 2.0 (* t (* n U))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2e-21) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = pow((2.0 * (t * (n * U))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (l <= 2d-21) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2e-21) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2e-21: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = math.pow((2.0 * (t * (n * U))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2e-21) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2e-21) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = (2.0 * (t * (n * U))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2e-21], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.99999999999999982e-21Initial program 54.2%
Simplified57.2%
pow157.2%
Applied egg-rr57.2%
unpow157.2%
associate-*l*59.7%
*-commutative59.7%
fma-udef59.7%
associate-*l*59.7%
fma-def59.7%
Simplified59.7%
Taylor expanded in l around 0 42.4%
if 1.99999999999999982e-21 < l Initial program 39.9%
Simplified46.9%
Taylor expanded in l around 0 21.2%
pow1/221.2%
associate-*r*22.8%
*-commutative22.8%
*-commutative22.8%
Applied egg-rr22.8%
Final simplification37.7%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U -8.2e+164) (sqrt (* 2.0 (* t (* n U)))) (sqrt (* 2.0 (* n (* U t))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -8.2e+164) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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
real(8) :: tmp
if (u <= (-8.2d+164)) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt((2.0d0 * (n * (u * t))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -8.2e+164) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -8.2e+164: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt((2.0 * (n * (U * t)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -8.2e+164) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -8.2e+164) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt((2.0 * (n * (U * t)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -8.2e+164], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -8.2 \cdot 10^{+164}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if U < -8.20000000000000032e164Initial program 84.7%
Simplified79.5%
Taylor expanded in l around 0 64.2%
associate-*r*68.9%
*-commutative68.9%
Simplified68.9%
if -8.20000000000000032e164 < U Initial program 48.0%
Simplified52.7%
pow152.7%
Applied egg-rr52.7%
unpow152.7%
associate-*l*56.2%
*-commutative56.2%
fma-udef56.2%
associate-*l*56.2%
fma-def56.2%
Simplified56.2%
Taylor expanded in l around 0 36.3%
Final simplification38.7%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
NOTE: l should be positive before calling this function
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 * (u * (n * t))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 50.7%
Simplified54.7%
Taylor expanded in l around 0 35.2%
Final simplification35.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (n * (U * t))));
}
NOTE: l should be positive before calling this function
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))))
end function
l = Math.abs(l);
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))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (n * (U * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (n * (U * t)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 50.7%
Simplified54.7%
pow154.7%
Applied egg-rr54.7%
unpow154.7%
associate-*l*56.5%
*-commutative56.5%
fma-udef56.5%
associate-*l*56.5%
fma-def56.5%
Simplified56.5%
Taylor expanded in l around 0 36.9%
Final simplification36.9%
herbie shell --seed 2023292
(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*))))))