
(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 15 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
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_1 4e-158)
(exp
(log
(*
(sqrt (* 2.0 n))
(sqrt
(*
U
(+ t (* l (* l (- (* (/ n (* Om Om)) (- U* U)) (/ 2.0 Om))))))))))
(if (<= t_1 4e+148)
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (/ U* (* (/ Om (* l l)) (/ Om n))) (* 2.0 (* l (/ l Om)))))))
(*
(sqrt (* U (* n (+ (* (/ 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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 4e-158) {
tmp = exp(log((sqrt((2.0 * n)) * sqrt((U * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om))))))))));
} else if (t_1 <= 4e+148) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0));
}
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) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 4d-158) then
tmp = exp(log((sqrt((2.0d0 * n)) * sqrt((u * (t + (l * (l * (((n / (om * om)) * (u_42 - u)) - (2.0d0 / om))))))))))
else if (t_1 <= 4d+148) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + ((u_42 / ((om / (l * l)) * (om / n))) - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt((u * (n * (((n / om) * ((u_42 - u) / om)) + ((-2.0d0) / om))))) * (l * sqrt(2.0d0))
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 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 4e-158) {
tmp = Math.exp(Math.log((Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om))))))))));
} else if (t_1 <= 4e+148) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 4e-158: tmp = math.exp(math.log((math.sqrt((2.0 * n)) * math.sqrt((U * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))))))) elif t_1 <= 4e+148: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = 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_42_ - U))))) tmp = 0.0 if (t_1 <= 4e-158) tmp = exp(log(Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n / Float64(Om * Om)) * Float64(U_42_ - U)) - Float64(2.0 / Om)))))))))); elseif (t_1 <= 4e+148) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(U_42_ / Float64(Float64(Om / Float64(l * l)) * Float64(Om / n))) - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om))))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 4e-158) tmp = exp(log((sqrt((2.0 * n)) * sqrt((U * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))))))); elseif (t_1 <= 4e+148) tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * (l * (l / Om))))))); else tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0)); 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[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$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 4e-158], N[Exp[N[Log[N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(l * N[(l * N[(N[(N[(n / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 4e+148], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(U$42$ / N[(N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(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] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \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)}\\
\mathbf{if}\;t_1 \leq 4 \cdot 10^{-158}:\\
\;\;\;\;e^{\log \left(\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) - \frac{2}{Om}\right)\right)\right)}\right)}\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+148}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\frac{U*}{\frac{Om}{\ell \cdot \ell} \cdot \frac{Om}{n}} - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.00000000000000026e-158Initial program 23.5%
Taylor expanded in l around 0 23.5%
mul-1-neg23.5%
unsub-neg23.5%
unpow223.5%
associate-*r/23.5%
metadata-eval23.5%
associate-/l*23.5%
unpow223.5%
Simplified23.5%
add-exp-log23.5%
associate-*l*31.8%
associate-/r/31.8%
Applied egg-rr31.8%
sqrt-prod38.7%
Applied egg-rr38.7%
*-commutative38.7%
associate-*l*38.7%
*-commutative38.7%
Simplified38.7%
if 4.00000000000000026e-158 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.0000000000000002e148Initial program 97.7%
Simplified91.9%
Taylor expanded in U around 0 88.2%
mul-1-neg88.2%
associate-/l*90.1%
distribute-neg-frac90.1%
unpow290.1%
times-frac98.5%
unpow298.5%
Simplified98.5%
fma-udef98.5%
*-commutative98.5%
Applied egg-rr98.5%
if 4.0000000000000002e148 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 21.3%
Simplified28.5%
Taylor expanded in l around inf 18.8%
sub-neg18.8%
unpow218.8%
times-frac22.1%
associate-*r/22.1%
metadata-eval22.1%
distribute-neg-frac22.1%
metadata-eval22.1%
Simplified22.1%
Final simplification55.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))
4e+148)
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (/ U* (* (/ Om (* l l)) (/ Om n))) (* 2.0 (* l (/ l Om)))))))
(*
(sqrt (* U (* n (+ (* (/ 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 tmp;
if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U))))) <= 4e+148) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0));
}
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 (sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u))))) <= 4d+148) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + ((u_42 / ((om / (l * l)) * (om / n))) - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt((u * (n * (((n / om) * ((u_42 - u) / om)) + ((-2.0d0) / om))))) * (l * sqrt(2.0d0))
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 (Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U))))) <= 4e+148) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))) <= 4e+148: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (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_42_ - U))))) <= 4e+148) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(U_42_ / Float64(Float64(Om / Float64(l * l)) * Float64(Om / n))) - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om))))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))))) <= 4e+148) tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * (l * (l / Om))))))); else tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0)); 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[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$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 4e+148], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(U$42$ / N[(N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(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] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\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)} \leq 4 \cdot 10^{+148}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\frac{U*}{\frac{Om}{\ell \cdot \ell} \cdot \frac{Om}{n}} - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.0000000000000002e148Initial program 80.8%
Simplified76.3%
Taylor expanded in U around 0 73.4%
mul-1-neg73.4%
associate-/l*74.9%
distribute-neg-frac74.9%
unpow274.9%
times-frac81.4%
unpow281.4%
Simplified81.4%
fma-udef81.4%
*-commutative81.4%
Applied egg-rr81.4%
if 4.0000000000000002e148 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 21.3%
Simplified28.5%
Taylor expanded in l around inf 18.8%
sub-neg18.8%
unpow218.8%
times-frac22.1%
associate-*r/22.1%
metadata-eval22.1%
distribute-neg-frac22.1%
metadata-eval22.1%
Simplified22.1%
Final simplification53.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* l (/ l Om))))
(if (<= l 9e+74)
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (/ U* (* (/ Om (* l l)) (/ Om n))) (* 2.0 t_1)))))
(sqrt (* 2.0 (* U (* n (+ t (* t_1 (+ -2.0 (* (/ n Om) (- U* U))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l * (l / Om);
double tmp;
if (l <= 9e+74) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * t_1)))));
} else {
tmp = sqrt((2.0 * (U * (n * (t + (t_1 * (-2.0 + ((n / Om) * (U_42_ - U)))))))));
}
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) :: tmp
t_1 = l * (l / om)
if (l <= 9d+74) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + ((u_42 / ((om / (l * l)) * (om / n))) - (2.0d0 * t_1)))))
else
tmp = sqrt((2.0d0 * (u * (n * (t + (t_1 * ((-2.0d0) + ((n / om) * (u_42 - u)))))))))
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 = l * (l / Om);
double tmp;
if (l <= 9e+74) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * t_1)))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t + (t_1 * (-2.0 + ((n / Om) * (U_42_ - U)))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = l * (l / Om) tmp = 0 if l <= 9e+74: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * t_1))))) else: tmp = math.sqrt((2.0 * (U * (n * (t + (t_1 * (-2.0 + ((n / Om) * (U_42_ - U))))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l * Float64(l / Om)) tmp = 0.0 if (l <= 9e+74) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(U_42_ / Float64(Float64(Om / Float64(l * l)) * Float64(Om / n))) - Float64(2.0 * t_1))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(t_1 * Float64(-2.0 + Float64(Float64(n / Om) * Float64(U_42_ - U))))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = l * (l / Om); tmp = 0.0; if (l <= 9e+74) tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / ((Om / (l * l)) * (Om / n))) - (2.0 * t_1))))); else tmp = sqrt((2.0 * (U * (n * (t + (t_1 * (-2.0 + ((n / Om) * (U_42_ - U))))))))); 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[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 9e+74], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(U$42$ / N[(N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(t$95$1 * N[(-2.0 + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{Om}\\
\mathbf{if}\;\ell \leq 9 \cdot 10^{+74}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\frac{U*}{\frac{Om}{\ell \cdot \ell} \cdot \frac{Om}{n}} - 2 \cdot t_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + t_1 \cdot \left(-2 + \frac{n}{Om} \cdot \left(U* - U\right)\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 8.9999999999999999e74Initial program 58.1%
Simplified54.8%
Taylor expanded in U around 0 52.9%
mul-1-neg52.9%
associate-/l*53.8%
distribute-neg-frac53.8%
unpow253.8%
times-frac59.0%
unpow259.0%
Simplified59.0%
fma-udef59.0%
*-commutative59.0%
Applied egg-rr59.0%
if 8.9999999999999999e74 < l Initial program 24.3%
Simplified41.7%
Taylor expanded in t around 0 23.4%
distribute-lft-out23.4%
distribute-lft-out26.0%
fma-def26.0%
unpow226.0%
associate-*r/26.0%
unpow226.0%
times-frac31.4%
unpow231.4%
associate-*r/49.3%
Simplified49.3%
fma-udef49.3%
associate-/l*49.3%
Applied egg-rr49.3%
*-commutative49.3%
distribute-lft-out63.3%
associate-/r/63.3%
Simplified63.3%
Final simplification59.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= l 2.25e+76) (and (not (<= l 3.35e+153)) (<= l 5.5e+197)))
(sqrt (* (* 2.0 (* n U)) (- t (* 2.0 (* l (/ l Om))))))
(sqrt
(* (* U -2.0) (* (* n (* l l)) (- (/ 2.0 Om) (/ U* (* Om (/ Om n)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((l <= 2.25e+76) || (!(l <= 3.35e+153) && (l <= 5.5e+197))) {
tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om))))));
} else {
tmp = sqrt(((U * -2.0) * ((n * (l * l)) * ((2.0 / Om) - (U_42_ / (Om * (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 <= 2.25d+76) .or. (.not. (l <= 3.35d+153)) .and. (l <= 5.5d+197)) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (2.0d0 * (l * (l / om))))))
else
tmp = sqrt(((u * (-2.0d0)) * ((n * (l * l)) * ((2.0d0 / om) - (u_42 / (om * (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 <= 2.25e+76) || (!(l <= 3.35e+153) && (l <= 5.5e+197))) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om))))));
} else {
tmp = Math.sqrt(((U * -2.0) * ((n * (l * l)) * ((2.0 / Om) - (U_42_ / (Om * (Om / n)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (l <= 2.25e+76) or (not (l <= 3.35e+153) and (l <= 5.5e+197)): tmp = math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om)))))) else: tmp = math.sqrt(((U * -2.0) * ((n * (l * l)) * ((2.0 / Om) - (U_42_ / (Om * (Om / n))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((l <= 2.25e+76) || (!(l <= 3.35e+153) && (l <= 5.5e+197))) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))); else tmp = sqrt(Float64(Float64(U * -2.0) * Float64(Float64(n * Float64(l * l)) * Float64(Float64(2.0 / Om) - Float64(U_42_ / Float64(Om * 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 <= 2.25e+76) || (~((l <= 3.35e+153)) && (l <= 5.5e+197))) tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om)))))); else tmp = sqrt(((U * -2.0) * ((n * (l * l)) * ((2.0 / Om) - (U_42_ / (Om * (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[Or[LessEqual[l, 2.25e+76], And[N[Not[LessEqual[l, 3.35e+153]], $MachinePrecision], LessEqual[l, 5.5e+197]]], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * -2.0), $MachinePrecision] * N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] - N[(U$42$ / N[(Om * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.25 \cdot 10^{+76} \lor \neg \left(\ell \leq 3.35 \cdot 10^{+153}\right) \land \ell \leq 5.5 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left(\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(\frac{2}{Om} - \frac{U*}{Om \cdot \frac{Om}{n}}\right)\right)}\\
\end{array}
\end{array}
if l < 2.2499999999999999e76 or 3.35000000000000003e153 < l < 5.4999999999999999e197Initial program 56.5%
Simplified55.5%
Taylor expanded in Om around inf 53.7%
unpow253.7%
associate-*r/56.3%
Simplified56.3%
if 2.2499999999999999e76 < l < 3.35000000000000003e153 or 5.4999999999999999e197 < l Initial program 25.0%
Simplified31.7%
Taylor expanded in U around 0 18.2%
mul-1-neg18.2%
associate-/l*18.4%
distribute-neg-frac18.4%
unpow218.4%
times-frac28.7%
unpow228.7%
Simplified28.7%
fma-udef28.7%
*-commutative28.7%
Applied egg-rr28.7%
Taylor expanded in l around inf 46.7%
associate-*r*46.7%
associate-*r*50.1%
*-commutative50.1%
unpow250.1%
+-commutative50.1%
mul-1-neg50.1%
unsub-neg50.1%
associate-*r/50.1%
metadata-eval50.1%
associate-/l*53.8%
unpow253.8%
associate-*r/57.3%
Simplified57.3%
Final simplification56.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 8.2e-63)
(pow (* t (* 2.0 (* n U))) 0.5)
(sqrt
(*
2.0
(* U (* n (+ t (* (* l (/ l Om)) (+ -2.0 (* (/ n Om) (- U* U)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8.2e-63) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = sqrt((2.0 * (U * (n * (t + ((l * (l / Om)) * (-2.0 + ((n / Om) * (U_42_ - U)))))))));
}
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 <= 8.2d-63) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (u * (n * (t + ((l * (l / om)) * ((-2.0d0) + ((n / om) * (u_42 - u)))))))))
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 <= 8.2e-63) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t + ((l * (l / Om)) * (-2.0 + ((n / Om) * (U_42_ - U)))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 8.2e-63: tmp = math.pow((t * (2.0 * (n * U))), 0.5) else: tmp = math.sqrt((2.0 * (U * (n * (t + ((l * (l / Om)) * (-2.0 + ((n / Om) * (U_42_ - U))))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 8.2e-63) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(Float64(l * Float64(l / Om)) * Float64(-2.0 + Float64(Float64(n / Om) * Float64(U_42_ - U))))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 8.2e-63) tmp = (t * (2.0 * (n * U))) ^ 0.5; else tmp = sqrt((2.0 * (U * (n * (t + ((l * (l / Om)) * (-2.0 + ((n / Om) * (U_42_ - U))))))))); 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, 8.2e-63], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(-2.0 + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8.2 \cdot 10^{-63}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot \left(-2 + \frac{n}{Om} \cdot \left(U* - U\right)\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 8.1999999999999995e-63Initial program 55.1%
Taylor expanded in l around 0 52.6%
mul-1-neg52.6%
unsub-neg52.6%
unpow252.6%
associate-*r/52.6%
metadata-eval52.6%
associate-/l*55.5%
unpow255.5%
Simplified55.5%
Taylor expanded in t around inf 41.8%
associate-*r*45.1%
*-commutative45.1%
associate-*r*43.7%
associate-*r*43.7%
Simplified43.7%
pow1/245.4%
associate-*r*47.3%
associate-*r*47.3%
Applied egg-rr47.3%
if 8.1999999999999995e-63 < l Initial program 47.0%
Simplified55.5%
Taylor expanded in t around 0 43.2%
distribute-lft-out43.2%
distribute-lft-out44.7%
fma-def44.7%
unpow244.7%
associate-*r/44.7%
unpow244.7%
times-frac50.7%
unpow250.7%
associate-*r/61.0%
Simplified61.0%
fma-udef61.0%
associate-/l*59.6%
Applied egg-rr59.6%
*-commutative59.6%
distribute-lft-out67.7%
associate-/r/69.1%
Simplified69.1%
Final simplification53.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U))) (t_2 (- t (* 2.0 (* l (/ l Om))))))
(if (<= l 2.45e+56)
(sqrt (* t_1 (- t (* (* l l) (/ 2.0 Om)))))
(if (<= l 1.45e+168)
(sqrt (* 2.0 (* n (* U t_2))))
(if (<= l 5.9e+197)
(sqrt (* t_1 t_2))
(sqrt (* 2.0 (* n (/ U (/ (* Om Om) (* U* (* n (* l l)))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double t_2 = t - (2.0 * (l * (l / Om)));
double tmp;
if (l <= 2.45e+56) {
tmp = sqrt((t_1 * (t - ((l * l) * (2.0 / Om)))));
} else if (l <= 1.45e+168) {
tmp = sqrt((2.0 * (n * (U * t_2))));
} else if (l <= 5.9e+197) {
tmp = sqrt((t_1 * t_2));
} else {
tmp = sqrt((2.0 * (n * (U / ((Om * Om) / (U_42_ * (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
t_2 = t - (2.0d0 * (l * (l / om)))
if (l <= 2.45d+56) then
tmp = sqrt((t_1 * (t - ((l * l) * (2.0d0 / om)))))
else if (l <= 1.45d+168) then
tmp = sqrt((2.0d0 * (n * (u * t_2))))
else if (l <= 5.9d+197) then
tmp = sqrt((t_1 * t_2))
else
tmp = sqrt((2.0d0 * (n * (u / ((om * om) / (u_42 * (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 t_1 = 2.0 * (n * U);
double t_2 = t - (2.0 * (l * (l / Om)));
double tmp;
if (l <= 2.45e+56) {
tmp = Math.sqrt((t_1 * (t - ((l * l) * (2.0 / Om)))));
} else if (l <= 1.45e+168) {
tmp = Math.sqrt((2.0 * (n * (U * t_2))));
} else if (l <= 5.9e+197) {
tmp = Math.sqrt((t_1 * t_2));
} else {
tmp = Math.sqrt((2.0 * (n * (U / ((Om * Om) / (U_42_ * (n * (l * l))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) t_2 = t - (2.0 * (l * (l / Om))) tmp = 0 if l <= 2.45e+56: tmp = math.sqrt((t_1 * (t - ((l * l) * (2.0 / Om))))) elif l <= 1.45e+168: tmp = math.sqrt((2.0 * (n * (U * t_2)))) elif l <= 5.9e+197: tmp = math.sqrt((t_1 * t_2)) else: tmp = math.sqrt((2.0 * (n * (U / ((Om * Om) / (U_42_ * (n * (l * l)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) t_2 = Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) tmp = 0.0 if (l <= 2.45e+56) tmp = sqrt(Float64(t_1 * Float64(t - Float64(Float64(l * l) * Float64(2.0 / Om))))); elseif (l <= 1.45e+168) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t_2)))); elseif (l <= 5.9e+197) tmp = sqrt(Float64(t_1 * t_2)); else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U / Float64(Float64(Om * Om) / Float64(U_42_ * Float64(n * Float64(l * l)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * U); t_2 = t - (2.0 * (l * (l / Om))); tmp = 0.0; if (l <= 2.45e+56) tmp = sqrt((t_1 * (t - ((l * l) * (2.0 / Om))))); elseif (l <= 1.45e+168) tmp = sqrt((2.0 * (n * (U * t_2)))); elseif (l <= 5.9e+197) tmp = sqrt((t_1 * t_2)); else tmp = sqrt((2.0 * (n * (U / ((Om * Om) / (U_42_ * (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$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 2.45e+56], N[Sqrt[N[(t$95$1 * N[(t - N[(N[(l * l), $MachinePrecision] * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.45e+168], N[Sqrt[N[(2.0 * N[(n * N[(U * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 5.9e+197], N[Sqrt[N[(t$95$1 * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U / N[(N[(Om * Om), $MachinePrecision] / N[(U$42$ * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
t_2 := t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
\mathbf{if}\;\ell \leq 2.45 \cdot 10^{+56}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \frac{2}{Om}\right)}\\
\mathbf{elif}\;\ell \leq 1.45 \cdot 10^{+168}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t_2\right)\right)}\\
\mathbf{elif}\;\ell \leq 5.9 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{t_1 \cdot t_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \frac{U}{\frac{Om \cdot Om}{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}}\right)}\\
\end{array}
\end{array}
if l < 2.4500000000000001e56Initial program 57.6%
Simplified54.7%
Taylor expanded in U around 0 52.7%
mul-1-neg52.7%
associate-/l*53.6%
distribute-neg-frac53.6%
unpow253.6%
times-frac58.5%
unpow258.5%
Simplified58.5%
Taylor expanded in Om around inf 54.6%
associate-*r/54.6%
associate-*l/54.6%
metadata-eval54.6%
associate-*r/54.6%
*-commutative54.6%
associate-*r/54.6%
metadata-eval54.6%
unpow254.6%
Simplified54.6%
if 2.4500000000000001e56 < l < 1.45e168Initial program 49.1%
Simplified49.3%
expm1-log1p-u48.6%
expm1-udef28.1%
associate-*l*28.1%
*-commutative28.1%
Applied egg-rr28.1%
expm1-def48.6%
expm1-log1p49.3%
associate-*l*57.8%
*-commutative57.8%
associate-*l*62.1%
*-commutative62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in Om around inf 58.3%
unpow258.3%
associate-*r/66.9%
Simplified66.9%
if 1.45e168 < l < 5.89999999999999988e197Initial program 2.9%
Simplified79.7%
Taylor expanded in Om around inf 3.6%
unpow23.6%
associate-*r/80.4%
Simplified80.4%
if 5.89999999999999988e197 < l Initial program 17.4%
Simplified28.2%
expm1-log1p-u27.9%
expm1-udef27.9%
associate-*l*27.9%
*-commutative27.9%
Applied egg-rr27.9%
expm1-def27.9%
expm1-log1p28.2%
associate-*l*28.2%
*-commutative28.2%
associate-*l*27.9%
*-commutative27.9%
*-commutative27.9%
Simplified27.9%
Taylor expanded in U* around inf 34.3%
associate-/l*34.3%
unpow234.3%
*-commutative34.3%
unpow234.3%
Simplified34.3%
Final simplification54.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* l (/ l Om))) (t_2 (* 2.0 (* n U))) (t_3 (- t (* 2.0 t_1))))
(if (<= l 2.75e+56)
(sqrt (* t_2 (- t (* (* l l) (/ 2.0 Om)))))
(if (<= l 7.1e+167)
(sqrt (* 2.0 (* n (* U t_3))))
(if (<= l 7.2e+182)
(sqrt (* t_2 t_3))
(sqrt (* 2.0 (* (* n U) (* t_1 (/ U* (/ Om n)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l * (l / Om);
double t_2 = 2.0 * (n * U);
double t_3 = t - (2.0 * t_1);
double tmp;
if (l <= 2.75e+56) {
tmp = sqrt((t_2 * (t - ((l * l) * (2.0 / Om)))));
} else if (l <= 7.1e+167) {
tmp = sqrt((2.0 * (n * (U * t_3))));
} else if (l <= 7.2e+182) {
tmp = sqrt((t_2 * t_3));
} else {
tmp = sqrt((2.0 * ((n * U) * (t_1 * (U_42_ / (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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = l * (l / om)
t_2 = 2.0d0 * (n * u)
t_3 = t - (2.0d0 * t_1)
if (l <= 2.75d+56) then
tmp = sqrt((t_2 * (t - ((l * l) * (2.0d0 / om)))))
else if (l <= 7.1d+167) then
tmp = sqrt((2.0d0 * (n * (u * t_3))))
else if (l <= 7.2d+182) then
tmp = sqrt((t_2 * t_3))
else
tmp = sqrt((2.0d0 * ((n * u) * (t_1 * (u_42 / (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 t_1 = l * (l / Om);
double t_2 = 2.0 * (n * U);
double t_3 = t - (2.0 * t_1);
double tmp;
if (l <= 2.75e+56) {
tmp = Math.sqrt((t_2 * (t - ((l * l) * (2.0 / Om)))));
} else if (l <= 7.1e+167) {
tmp = Math.sqrt((2.0 * (n * (U * t_3))));
} else if (l <= 7.2e+182) {
tmp = Math.sqrt((t_2 * t_3));
} else {
tmp = Math.sqrt((2.0 * ((n * U) * (t_1 * (U_42_ / (Om / n))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = l * (l / Om) t_2 = 2.0 * (n * U) t_3 = t - (2.0 * t_1) tmp = 0 if l <= 2.75e+56: tmp = math.sqrt((t_2 * (t - ((l * l) * (2.0 / Om))))) elif l <= 7.1e+167: tmp = math.sqrt((2.0 * (n * (U * t_3)))) elif l <= 7.2e+182: tmp = math.sqrt((t_2 * t_3)) else: tmp = math.sqrt((2.0 * ((n * U) * (t_1 * (U_42_ / (Om / n)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l * Float64(l / Om)) t_2 = Float64(2.0 * Float64(n * U)) t_3 = Float64(t - Float64(2.0 * t_1)) tmp = 0.0 if (l <= 2.75e+56) tmp = sqrt(Float64(t_2 * Float64(t - Float64(Float64(l * l) * Float64(2.0 / Om))))); elseif (l <= 7.1e+167) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t_3)))); elseif (l <= 7.2e+182) tmp = sqrt(Float64(t_2 * t_3)); else tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t_1 * Float64(U_42_ / Float64(Om / n)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = l * (l / Om); t_2 = 2.0 * (n * U); t_3 = t - (2.0 * t_1); tmp = 0.0; if (l <= 2.75e+56) tmp = sqrt((t_2 * (t - ((l * l) * (2.0 / Om))))); elseif (l <= 7.1e+167) tmp = sqrt((2.0 * (n * (U * t_3)))); elseif (l <= 7.2e+182) tmp = sqrt((t_2 * t_3)); else tmp = sqrt((2.0 * ((n * U) * (t_1 * (U_42_ / (Om / n)))))); 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[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 2.75e+56], N[Sqrt[N[(t$95$2 * N[(t - N[(N[(l * l), $MachinePrecision] * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 7.1e+167], N[Sqrt[N[(2.0 * N[(n * N[(U * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 7.2e+182], N[Sqrt[N[(t$95$2 * t$95$3), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t$95$1 * N[(U$42$ / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{Om}\\
t_2 := 2 \cdot \left(n \cdot U\right)\\
t_3 := t - 2 \cdot t_1\\
\mathbf{if}\;\ell \leq 2.75 \cdot 10^{+56}:\\
\;\;\;\;\sqrt{t_2 \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \frac{2}{Om}\right)}\\
\mathbf{elif}\;\ell \leq 7.1 \cdot 10^{+167}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t_3\right)\right)}\\
\mathbf{elif}\;\ell \leq 7.2 \cdot 10^{+182}:\\
\;\;\;\;\sqrt{t_2 \cdot t_3}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t_1 \cdot \frac{U*}{\frac{Om}{n}}\right)\right)}\\
\end{array}
\end{array}
if l < 2.7500000000000001e56Initial program 57.6%
Simplified54.7%
Taylor expanded in U around 0 52.7%
mul-1-neg52.7%
associate-/l*53.6%
distribute-neg-frac53.6%
unpow253.6%
times-frac58.5%
unpow258.5%
Simplified58.5%
Taylor expanded in Om around inf 54.6%
associate-*r/54.6%
associate-*l/54.6%
metadata-eval54.6%
associate-*r/54.6%
*-commutative54.6%
associate-*r/54.6%
metadata-eval54.6%
unpow254.6%
Simplified54.6%
if 2.7500000000000001e56 < l < 7.1000000000000001e167Initial program 49.1%
Simplified49.3%
expm1-log1p-u48.6%
expm1-udef28.1%
associate-*l*28.1%
*-commutative28.1%
Applied egg-rr28.1%
expm1-def48.6%
expm1-log1p49.3%
associate-*l*57.8%
*-commutative57.8%
associate-*l*62.1%
*-commutative62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in Om around inf 58.3%
unpow258.3%
associate-*r/66.9%
Simplified66.9%
if 7.1000000000000001e167 < l < 7.2e182Initial program 2.9%
Simplified79.7%
Taylor expanded in Om around inf 3.6%
unpow23.6%
associate-*r/80.4%
Simplified80.4%
if 7.2e182 < l Initial program 17.4%
Simplified28.2%
Taylor expanded in n around inf 28.4%
unpow228.4%
times-frac39.7%
unpow239.7%
associate-*r/39.9%
Simplified39.9%
Taylor expanded in U* around inf 39.9%
associate-/l*40.2%
Simplified40.2%
Final simplification55.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U))) (t_2 (- t (* 2.0 (* l (/ l Om))))))
(if (<= l 2.25e+57)
(sqrt (* t_1 (- t (* (* l l) (/ 2.0 Om)))))
(if (<= l 1.35e+167)
(sqrt (* 2.0 (* n (* U t_2))))
(if (<= l 6e+197)
(sqrt (* t_1 t_2))
(sqrt (* 2.0 (* (/ (* U U*) Om) (/ (* (* l l) (* n n)) Om)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double t_2 = t - (2.0 * (l * (l / Om)));
double tmp;
if (l <= 2.25e+57) {
tmp = sqrt((t_1 * (t - ((l * l) * (2.0 / Om)))));
} else if (l <= 1.35e+167) {
tmp = sqrt((2.0 * (n * (U * t_2))));
} else if (l <= 6e+197) {
tmp = sqrt((t_1 * t_2));
} else {
tmp = sqrt((2.0 * (((U * U_42_) / Om) * (((l * l) * (n * n)) / 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) :: tmp
t_1 = 2.0d0 * (n * u)
t_2 = t - (2.0d0 * (l * (l / om)))
if (l <= 2.25d+57) then
tmp = sqrt((t_1 * (t - ((l * l) * (2.0d0 / om)))))
else if (l <= 1.35d+167) then
tmp = sqrt((2.0d0 * (n * (u * t_2))))
else if (l <= 6d+197) then
tmp = sqrt((t_1 * t_2))
else
tmp = sqrt((2.0d0 * (((u * u_42) / om) * (((l * l) * (n * n)) / 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 = 2.0 * (n * U);
double t_2 = t - (2.0 * (l * (l / Om)));
double tmp;
if (l <= 2.25e+57) {
tmp = Math.sqrt((t_1 * (t - ((l * l) * (2.0 / Om)))));
} else if (l <= 1.35e+167) {
tmp = Math.sqrt((2.0 * (n * (U * t_2))));
} else if (l <= 6e+197) {
tmp = Math.sqrt((t_1 * t_2));
} else {
tmp = Math.sqrt((2.0 * (((U * U_42_) / Om) * (((l * l) * (n * n)) / Om))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) t_2 = t - (2.0 * (l * (l / Om))) tmp = 0 if l <= 2.25e+57: tmp = math.sqrt((t_1 * (t - ((l * l) * (2.0 / Om))))) elif l <= 1.35e+167: tmp = math.sqrt((2.0 * (n * (U * t_2)))) elif l <= 6e+197: tmp = math.sqrt((t_1 * t_2)) else: tmp = math.sqrt((2.0 * (((U * U_42_) / Om) * (((l * l) * (n * n)) / Om)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) t_2 = Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) tmp = 0.0 if (l <= 2.25e+57) tmp = sqrt(Float64(t_1 * Float64(t - Float64(Float64(l * l) * Float64(2.0 / Om))))); elseif (l <= 1.35e+167) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t_2)))); elseif (l <= 6e+197) tmp = sqrt(Float64(t_1 * t_2)); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * U_42_) / Om) * Float64(Float64(Float64(l * l) * Float64(n * n)) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * U); t_2 = t - (2.0 * (l * (l / Om))); tmp = 0.0; if (l <= 2.25e+57) tmp = sqrt((t_1 * (t - ((l * l) * (2.0 / Om))))); elseif (l <= 1.35e+167) tmp = sqrt((2.0 * (n * (U * t_2)))); elseif (l <= 6e+197) tmp = sqrt((t_1 * t_2)); else tmp = sqrt((2.0 * (((U * U_42_) / Om) * (((l * l) * (n * n)) / 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[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 2.25e+57], N[Sqrt[N[(t$95$1 * N[(t - N[(N[(l * l), $MachinePrecision] * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.35e+167], N[Sqrt[N[(2.0 * N[(n * N[(U * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 6e+197], N[Sqrt[N[(t$95$1 * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * U$42$), $MachinePrecision] / Om), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
t_2 := t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
\mathbf{if}\;\ell \leq 2.25 \cdot 10^{+57}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \frac{2}{Om}\right)}\\
\mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+167}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t_2\right)\right)}\\
\mathbf{elif}\;\ell \leq 6 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{t_1 \cdot t_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(\frac{U \cdot U*}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot \left(n \cdot n\right)}{Om}\right)}\\
\end{array}
\end{array}
if l < 2.24999999999999998e57Initial program 57.6%
Simplified54.7%
Taylor expanded in U around 0 52.7%
mul-1-neg52.7%
associate-/l*53.6%
distribute-neg-frac53.6%
unpow253.6%
times-frac58.5%
unpow258.5%
Simplified58.5%
Taylor expanded in Om around inf 54.6%
associate-*r/54.6%
associate-*l/54.6%
metadata-eval54.6%
associate-*r/54.6%
*-commutative54.6%
associate-*r/54.6%
metadata-eval54.6%
unpow254.6%
Simplified54.6%
if 2.24999999999999998e57 < l < 1.35000000000000003e167Initial program 49.1%
Simplified49.3%
expm1-log1p-u48.6%
expm1-udef28.1%
associate-*l*28.1%
*-commutative28.1%
Applied egg-rr28.1%
expm1-def48.6%
expm1-log1p49.3%
associate-*l*57.8%
*-commutative57.8%
associate-*l*62.1%
*-commutative62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in Om around inf 58.3%
unpow258.3%
associate-*r/66.9%
Simplified66.9%
if 1.35000000000000003e167 < l < 6.0000000000000004e197Initial program 2.9%
Simplified79.7%
Taylor expanded in Om around inf 3.6%
unpow23.6%
associate-*r/80.4%
Simplified80.4%
if 6.0000000000000004e197 < l Initial program 17.4%
Simplified28.2%
Taylor expanded in U* around inf 34.0%
associate-*r*34.0%
unpow234.0%
times-frac45.5%
unpow245.5%
unpow245.5%
Simplified45.5%
Final simplification55.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (or (<= Om -6.8e+84) (not (<= Om 3.5e+65))) (sqrt (* (* 2.0 (* n U)) (- t (* 2.0 (* l (/ l Om)))))) (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 ((Om <= -6.8e+84) || !(Om <= 3.5e+65)) {
tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om))))));
} 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 ((om <= (-6.8d+84)) .or. (.not. (om <= 3.5d+65))) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (2.0d0 * (l * (l / om))))))
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 ((Om <= -6.8e+84) || !(Om <= 3.5e+65)) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om))))));
} 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 (Om <= -6.8e+84) or not (Om <= 3.5e+65): tmp = math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om)))))) 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 ((Om <= -6.8e+84) || !(Om <= 3.5e+65)) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))); 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 ((Om <= -6.8e+84) || ~((Om <= 3.5e+65))) tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om)))))); 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[Or[LessEqual[Om, -6.8e+84], N[Not[LessEqual[Om, 3.5e+65]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(l * N[(l / Om), $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}\;Om \leq -6.8 \cdot 10^{+84} \lor \neg \left(Om \leq 3.5 \cdot 10^{+65}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\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 Om < -6.7999999999999996e84 or 3.5000000000000001e65 < Om Initial program 64.2%
Simplified64.4%
Taylor expanded in Om around inf 62.8%
unpow262.8%
associate-*r/67.1%
Simplified67.1%
if -6.7999999999999996e84 < Om < 3.5000000000000001e65Initial program 40.3%
Simplified40.0%
expm1-log1p-u38.9%
expm1-udef31.6%
associate-*l*31.6%
*-commutative31.6%
Applied egg-rr31.6%
expm1-def38.9%
expm1-log1p40.0%
associate-*l*41.4%
*-commutative41.4%
associate-*l*41.0%
*-commutative41.0%
*-commutative41.0%
Simplified41.0%
Taylor expanded in U* around inf 48.9%
mul-1-neg48.9%
associate-/l*49.8%
unpow249.8%
*-commutative49.8%
unpow249.8%
Simplified49.8%
Final simplification58.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U -2.45e+73)
(pow (* t (* 2.0 (* n U))) 0.5)
(if (<= U 5.4e+197)
(sqrt (* 2.0 (* n (* U (- t (* 2.0 (* l (/ l Om))))))))
(sqrt (* 2.0 (* U (* n (+ t (/ (* (* l l) -2.0) Om)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -2.45e+73) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else if (U <= 5.4e+197) {
tmp = sqrt((2.0 * (n * (U * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt((2.0 * (U * (n * (t + (((l * l) * -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 (u <= (-2.45d+73)) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else if (u <= 5.4d+197) then
tmp = sqrt((2.0d0 * (n * (u * (t - (2.0d0 * (l * (l / om))))))))
else
tmp = sqrt((2.0d0 * (u * (n * (t + (((l * l) * (-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 (U <= -2.45e+73) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else if (U <= 5.4e+197) {
tmp = Math.sqrt((2.0 * (n * (U * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t + (((l * l) * -2.0) / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -2.45e+73: tmp = math.pow((t * (2.0 * (n * U))), 0.5) elif U <= 5.4e+197: tmp = math.sqrt((2.0 * (n * (U * (t - (2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt((2.0 * (U * (n * (t + (((l * l) * -2.0) / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -2.45e+73) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; elseif (U <= 5.4e+197) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(Float64(Float64(l * l) * -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 (U <= -2.45e+73) tmp = (t * (2.0 * (n * U))) ^ 0.5; elseif (U <= 5.4e+197) tmp = sqrt((2.0 * (n * (U * (t - (2.0 * (l * (l / Om)))))))); else tmp = sqrt((2.0 * (U * (n * (t + (((l * l) * -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[U, -2.45e+73], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[U, 5.4e+197], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(N[(N[(l * l), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -2.45 \cdot 10^{+73}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;U \leq 5.4 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if U < -2.45e73Initial program 52.4%
Taylor expanded in l around 0 51.4%
mul-1-neg51.4%
unsub-neg51.4%
unpow251.4%
associate-*r/51.4%
metadata-eval51.4%
associate-/l*49.5%
unpow249.5%
Simplified49.5%
Taylor expanded in t around inf 44.6%
associate-*r*44.6%
*-commutative44.6%
associate-*r*32.6%
associate-*r*32.6%
Simplified32.6%
pow1/240.4%
associate-*r*54.9%
associate-*r*54.9%
Applied egg-rr54.9%
if -2.45e73 < U < 5.4000000000000001e197Initial program 52.3%
Simplified52.1%
expm1-log1p-u50.9%
expm1-udef32.0%
associate-*l*32.0%
*-commutative32.0%
Applied egg-rr32.0%
expm1-def50.8%
expm1-log1p52.0%
associate-*l*53.2%
*-commutative53.2%
associate-*l*55.9%
*-commutative55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in Om around inf 51.9%
unpow251.9%
associate-*r/54.4%
Simplified54.4%
if 5.4000000000000001e197 < U Initial program 59.4%
Taylor expanded in l around 0 48.3%
mul-1-neg48.3%
unsub-neg48.3%
unpow248.3%
associate-*r/48.3%
metadata-eval48.3%
associate-/l*58.3%
unpow258.3%
Simplified58.3%
Taylor expanded in n around 0 63.9%
cancel-sign-sub-inv63.9%
metadata-eval63.9%
associate-*r/63.9%
unpow263.9%
Simplified63.9%
Final simplification55.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.4e-62) (pow (* t (* 2.0 (* n U))) 0.5) (sqrt (* 2.0 (* U (* n (+ t (/ (* (* l l) -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 <= 2.4e-62) {
tmp = pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = sqrt((2.0 * (U * (n * (t + (((l * l) * -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 <= 2.4d-62) then
tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (u * (n * (t + (((l * l) * (-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 <= 2.4e-62) {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t + (((l * l) * -2.0) / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.4e-62: tmp = math.pow((t * (2.0 * (n * U))), 0.5) else: tmp = math.sqrt((2.0 * (U * (n * (t + (((l * l) * -2.0) / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.4e-62) tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(Float64(Float64(l * l) * -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 <= 2.4e-62) tmp = (t * (2.0 * (n * U))) ^ 0.5; else tmp = sqrt((2.0 * (U * (n * (t + (((l * l) * -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, 2.4e-62], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(N[(N[(l * l), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.4 \cdot 10^{-62}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 2.39999999999999984e-62Initial program 55.1%
Taylor expanded in l around 0 52.6%
mul-1-neg52.6%
unsub-neg52.6%
unpow252.6%
associate-*r/52.6%
metadata-eval52.6%
associate-/l*55.5%
unpow255.5%
Simplified55.5%
Taylor expanded in t around inf 41.8%
associate-*r*45.1%
*-commutative45.1%
associate-*r*43.7%
associate-*r*43.7%
Simplified43.7%
pow1/245.4%
associate-*r*47.3%
associate-*r*47.3%
Applied egg-rr47.3%
if 2.39999999999999984e-62 < l Initial program 47.0%
Taylor expanded in l around 0 50.6%
mul-1-neg50.6%
unsub-neg50.6%
unpow250.6%
associate-*r/50.6%
metadata-eval50.6%
associate-/l*53.6%
unpow253.6%
Simplified53.6%
Taylor expanded in n around 0 48.9%
cancel-sign-sub-inv48.9%
metadata-eval48.9%
associate-*r/48.9%
unpow248.9%
Simplified48.9%
Final simplification47.7%
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 (/ l Om)))))))
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 * (l / Om))))));
}
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 * (l / om))))))
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 * (l / Om))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om)))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}
\end{array}
Initial program 52.9%
Simplified52.8%
Taylor expanded in Om around inf 50.2%
unpow250.2%
associate-*r/52.5%
Simplified52.5%
Final simplification52.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* -2e-89) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* 2.0 (* t (* n U))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -2e-89) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((2.0 * (t * (n * U))));
}
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_42 <= (-2d-89)) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (t * (n * u))))
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_42_ <= -2e-89) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (t * (n * U))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -2e-89: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((2.0 * (t * (n * U)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -2e-89) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -2e-89) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((2.0 * (t * (n * U)))); 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$42$, -2e-89], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -2 \cdot 10^{-89}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\end{array}
\end{array}
if U* < -2.00000000000000008e-89Initial program 49.4%
Simplified51.7%
Taylor expanded in l around 0 32.5%
pow1/240.3%
associate-*l*40.4%
Applied egg-rr40.4%
if -2.00000000000000008e-89 < U* Initial program 54.5%
Simplified57.2%
Taylor expanded in l around 0 44.5%
Final simplification43.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (pow (* t (* 2.0 (* n U))) 0.5))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow((t * (2.0 * (n * U))), 0.5);
}
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 = (t * (2.0d0 * (n * u))) ** 0.5d0
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.pow((t * (2.0 * (n * U))), 0.5);
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.pow((t * (2.0 * (n * U))), 0.5)
l = abs(l) function code(n, U, t, l, Om, U_42_) return Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5 end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = (t * (2.0 * (n * U))) ^ 0.5; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}
\end{array}
Initial program 52.9%
Taylor expanded in l around 0 52.0%
mul-1-neg52.0%
unsub-neg52.0%
unpow252.0%
associate-*r/52.0%
metadata-eval52.0%
associate-/l*55.0%
unpow255.0%
Simplified55.0%
Taylor expanded in t around inf 37.9%
associate-*r*40.8%
*-commutative40.8%
associate-*r*37.1%
associate-*r*37.2%
Simplified37.2%
pow1/239.6%
associate-*r*44.0%
associate-*r*44.0%
Applied egg-rr44.0%
Final simplification44.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* t (* n U)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (t * (n * U))));
}
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 * (t * (n * u))))
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 * (t * (n * U))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (t * (n * U))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(t * Float64(n * U)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (t * (n * U)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}
\end{array}
Initial program 52.9%
Simplified55.5%
Taylor expanded in l around 0 40.8%
Final simplification40.8%
herbie shell --seed 2023271
(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*))))))