
(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 20 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 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1))))
(if (<= t_3 0.0)
(pow
(*
2.0
(+
(* n (* U t))
(/ (* (+ (* l -2.0) (* (/ n (/ Om l)) (- U* U))) (* n (* U l))) Om)))
0.5)
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
(*
(sqrt 2.0)
(* l (sqrt (/ n (/ Om (* U (fma (- U* U) (/ n Om) -2.0)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = pow((2.0 * ((n * (U * t)) + ((((l * -2.0) + ((n / (Om / l)) * (U_42_ - U))) * (n * (U * l))) / Om))), 0.5);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * fma((U_42_ - U), (n / Om), -2.0))))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1)) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(Float64(l * -2.0) + Float64(Float64(n / Float64(Om / l)) * Float64(U_42_ - U))) * Float64(n * Float64(U * l))) / Om))) ^ 0.5; elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_1))); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n / Float64(Om / Float64(U * fma(Float64(U_42_ - U), Float64(n / Om), -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[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n / N[(Om / l), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n / N[(Om / N[(U * N[(N[(U$42$ - U), $MachinePrecision] * N[(n / Om), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\left(\ell \cdot -2 + \frac{n}{\frac{Om}{\ell}} \cdot \left(U* - U\right)\right) \cdot \left(n \cdot \left(U \cdot \ell\right)\right)}{Om}\right)\right)}^{0.5}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \mathsf{fma}\left(U* - U, \frac{n}{Om}, -2\right)}}}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 0.0Initial program 11.3%
Simplified40.1%
Taylor expanded in t around inf 42.1%
pow1/242.1%
distribute-lft-out42.1%
*-commutative42.1%
associate-/l*37.7%
associate-*r*37.9%
*-commutative37.9%
*-commutative37.9%
Applied egg-rr37.9%
Taylor expanded in Om around 0 37.9%
associate-*r*37.9%
Simplified37.9%
*-un-lft-identity37.9%
associate-/r/42.2%
associate-/l*42.1%
associate-*l*42.1%
Applied egg-rr42.1%
*-lft-identity42.1%
associate-*l/42.1%
+-commutative42.1%
associate-/r/42.2%
associate-/l*42.2%
Simplified42.2%
if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < +inf.0Initial program 68.3%
associate-/l*76.2%
associate-/r/76.2%
Applied egg-rr76.2%
if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) Initial program 0.0%
Simplified32.4%
Taylor expanded in t around 0 32.5%
Taylor expanded in l around 0 40.9%
*-commutative40.9%
associate-/l*57.6%
*-commutative57.6%
associate-*l/57.5%
*-commutative57.5%
fma-neg57.5%
metadata-eval57.5%
Simplified57.5%
Final simplification68.2%
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 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_3 (* (* 2.0 n) U))
(t_4 (sqrt (* t_3 (+ (- t (* 2.0 (/ (* l l) Om))) t_2)))))
(if (<= t_4 0.0)
(sqrt (* (* 2.0 n) (* U (+ t (* -2.0 t_1)))))
(if (<= t_4 INFINITY)
(sqrt (* t_3 (+ (- t (* 2.0 t_1)) t_2)))
(sqrt
(*
-2.0
(* (* l (/ n Om)) (* (* U l) (+ 2.0 (* (- U U*) (/ n Om)))))))))))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 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = (2.0 * n) * U;
double t_4 = sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * t_1)))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_3 * ((t - (2.0 * t_1)) + t_2)));
} else {
tmp = sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om)))))));
}
return tmp;
}
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 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = (2.0 * n) * U;
double t_4 = Math.sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_4 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * t_1)))));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_3 * ((t - (2.0 * t_1)) + t_2)));
} else {
tmp = Math.sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = l * (l / Om) t_2 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_3 = (2.0 * n) * U t_4 = math.sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2))) tmp = 0 if t_4 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * t_1))))) elif t_4 <= math.inf: tmp = math.sqrt((t_3 * ((t - (2.0 * t_1)) + t_2))) else: tmp = math.sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l * Float64(l / Om)) t_2 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = Float64(Float64(2.0 * n) * U) t_4 = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2))) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * t_1))))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) + t_2))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(l * Float64(n / Om)) * Float64(Float64(U * l) * Float64(2.0 + Float64(Float64(U - U_42_) * Float64(n / Om))))))); 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 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_3 = (2.0 * n) * U; t_4 = sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2))); tmp = 0.0; if (t_4 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * t_1))))); elseif (t_4 <= Inf) tmp = sqrt((t_3 * ((t - (2.0 * t_1)) + t_2))); else tmp = sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (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[(l * N[(l / Om), $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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(l * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[(N[(U * l), $MachinePrecision] * N[(2.0 + N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{Om}\\
t_2 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := \sqrt{t_3 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2\right)}\\
\mathbf{if}\;t_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot t_1\right)\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\sqrt{t_3 \cdot \left(\left(t - 2 \cdot t_1\right) + t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\ell \cdot \frac{n}{Om}\right) \cdot \left(\left(U \cdot \ell\right) \cdot \left(2 + \left(U - U*\right) \cdot \frac{n}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 12.8%
Simplified39.8%
Taylor expanded in n around 0 39.8%
*-commutative39.8%
unpow239.8%
associate-*r/39.8%
Simplified39.8%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 68.3%
associate-/l*76.2%
associate-/r/76.2%
Applied egg-rr76.2%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 0.0%
Simplified33.9%
Taylor expanded in l around -inf 49.3%
associate-/l*53.2%
unpow253.2%
*-commutative53.2%
mul-1-neg53.2%
associate-/l*50.5%
Simplified50.5%
*-un-lft-identity50.5%
associate-/r/50.7%
associate-*l*61.7%
unsub-neg61.7%
associate-/r/64.5%
Applied egg-rr64.5%
*-lft-identity64.5%
associate-*r*72.3%
associate-*r*72.3%
*-commutative72.3%
Simplified72.3%
Final simplification70.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.2e+115)
(sqrt
(* (* 2.0 n) (* U (+ t (/ (* l (fma -2.0 l (/ n (/ Om (* l U*))))) Om)))))
(*
(* l (sqrt 2.0))
(sqrt (/ (* n (* U (- (/ (* n (- 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.2e+115) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * fma(-2.0, l, (n / (Om / (l * U_42_))))) / Om)))));
} else {
tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * (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.2e+115) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * fma(-2.0, l, Float64(n / Float64(Om / Float64(l * U_42_))))) / Om))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 2.0))) / 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.2e+115], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(-2.0 * l + N[(n / N[(Om / N[(l * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.2 \cdot 10^{+115}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \mathsf{fma}\left(-2, \ell, \frac{n}{\frac{Om}{\ell \cdot U*}}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.2e115Initial program 54.0%
Simplified59.7%
Taylor expanded in U around 0 59.8%
*-commutative59.8%
fma-def59.8%
associate-/l*59.8%
Simplified59.8%
if 1.2e115 < l Initial program 30.3%
Simplified54.5%
Taylor expanded in t around inf 49.2%
distribute-lft-out49.2%
*-commutative49.2%
associate-/l*56.8%
+-commutative56.8%
*-commutative56.8%
associate-*r*59.8%
*-commutative59.8%
associate-*r*59.7%
associate-*l/61.8%
fma-udef61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in l around inf 71.6%
Final simplification61.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.5e+114)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(*
(sqrt 2.0)
(* l (sqrt (/ (* n (* U (- (/ (* n (- 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 <= 5.5e+114) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = sqrt(2.0) * (l * sqrt(((n * (U * (((n * (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 <= 5.5d+114) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = sqrt(2.0d0) * (l * sqrt(((n * (u * (((n * (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 <= 5.5e+114) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt(((n * (U * (((n * (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 <= 5.5e+114: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = math.sqrt(2.0) * (l * math.sqrt(((n * (U * (((n * (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 <= 5.5e+114) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 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 <= 5.5e+114) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = sqrt(2.0) * (l * sqrt(((n * (U * (((n * (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, 5.5e+114], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.5 \cdot 10^{+114}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)\right)}{Om}}\right)\\
\end{array}
\end{array}
if l < 5.5000000000000001e114Initial program 54.0%
Simplified59.7%
Taylor expanded in U around 0 59.8%
if 5.5000000000000001e114 < l Initial program 30.3%
Simplified54.5%
Taylor expanded in t around 0 47.0%
Taylor expanded in l around 0 71.5%
Final simplification61.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.7e+115)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(*
(* l (sqrt 2.0))
(sqrt (/ (* n (* U (- (/ (* n (- 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.7e+115) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * (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.7d+115) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = (l * sqrt(2.0d0)) * sqrt(((n * (u * (((n * (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.7e+115) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt(((n * (U * (((n * (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.7e+115: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt(((n * (U * (((n * (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.7e+115) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 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.7e+115) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * (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.7e+115], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{+115}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.7e115Initial program 54.0%
Simplified59.7%
Taylor expanded in U around 0 59.8%
if 1.7e115 < l Initial program 30.3%
Simplified54.5%
Taylor expanded in t around inf 49.2%
distribute-lft-out49.2%
*-commutative49.2%
associate-/l*56.8%
+-commutative56.8%
*-commutative56.8%
associate-*r*59.8%
*-commutative59.8%
associate-*r*59.7%
associate-*l/61.8%
fma-udef61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in l around inf 71.6%
Final simplification61.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.5e+114)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(* (sqrt 2.0) (* l (sqrt (/ (* n (* U (- (/ (* n 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 <= 4.5e+114) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = sqrt(2.0) * (l * sqrt(((n * (U * (((n * U_42_) / 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 <= 4.5d+114) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = sqrt(2.0d0) * (l * sqrt(((n * (u * (((n * u_42) / 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 <= 4.5e+114) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.5e+114: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = math.sqrt(2.0) * (l * math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.5e+114) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * U_42_) / Om) - 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 <= 4.5e+114) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = sqrt(2.0) * (l * sqrt(((n * (U * (((n * U_42_) / 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, 4.5e+114], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.5 \cdot 10^{+114}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)}{Om}}\right)\\
\end{array}
\end{array}
if l < 4.5000000000000001e114Initial program 54.0%
Simplified59.7%
Taylor expanded in U around 0 59.8%
if 4.5000000000000001e114 < l Initial program 30.3%
Simplified54.5%
Taylor expanded in t around 0 47.0%
Taylor expanded in l around 0 71.5%
*-commutative71.5%
associate-/l*78.4%
*-commutative78.4%
associate-*l/78.3%
*-commutative78.3%
fma-neg78.3%
metadata-eval78.3%
Simplified78.3%
Taylor expanded in U around 0 70.6%
Final simplification61.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om 1.8e-186)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(pow
(*
2.0
(+
(* n (* U t))
(/ (+ (* l -2.0) (/ (* (- U* U) (* n l)) Om)) (/ Om (* U (* n l))))))
0.5)))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= 1.8e-186) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = pow((2.0 * ((n * (U * t)) + (((l * -2.0) + (((U_42_ - U) * (n * l)) / Om)) / (Om / (U * (n * l)))))), 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 (om <= 1.8d-186) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = (2.0d0 * ((n * (u * t)) + (((l * (-2.0d0)) + (((u_42 - u) * (n * l)) / om)) / (om / (u * (n * l)))))) ** 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 (Om <= 1.8e-186) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = Math.pow((2.0 * ((n * (U * t)) + (((l * -2.0) + (((U_42_ - U) * (n * l)) / Om)) / (Om / (U * (n * l)))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= 1.8e-186: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = math.pow((2.0 * ((n * (U * t)) + (((l * -2.0) + (((U_42_ - U) * (n * l)) / Om)) / (Om / (U * (n * l)))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= 1.8e-186) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(l * -2.0) + Float64(Float64(Float64(U_42_ - U) * Float64(n * l)) / Om)) / Float64(Om / Float64(U * Float64(n * l)))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= 1.8e-186) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = (2.0 * ((n * (U * t)) + (((l * -2.0) + (((U_42_ - U) * (n * l)) / Om)) / (Om / (U * (n * l)))))) ^ 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[Om, 1.8e-186], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(l * -2.0), $MachinePrecision] + N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(U * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 1.8 \cdot 10^{-186}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\ell \cdot -2 + \frac{\left(U* - U\right) \cdot \left(n \cdot \ell\right)}{Om}}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if Om < 1.7999999999999999e-186Initial program 51.4%
Simplified55.9%
Taylor expanded in U around 0 56.1%
if 1.7999999999999999e-186 < Om Initial program 49.2%
Simplified63.4%
Taylor expanded in t around inf 64.2%
pow1/264.4%
distribute-lft-out64.4%
*-commutative64.4%
associate-/l*69.1%
associate-*r*72.0%
*-commutative72.0%
*-commutative72.0%
Applied egg-rr72.0%
Taylor expanded in Om around 0 72.0%
associate-*r*72.9%
Simplified72.9%
Final simplification62.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.9e+82)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(sqrt
(* -2.0 (* (* l (/ n Om)) (* (* U l) (+ 2.0 (* (- U U*) (/ n Om)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.9e+82) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (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) :: tmp
if (l <= 1.9d+82) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = sqrt(((-2.0d0) * ((l * (n / om)) * ((u * l) * (2.0d0 + ((u - u_42) * (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 tmp;
if (l <= 1.9e+82) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = Math.sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.9e+82: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = math.sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.9e+82) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(l * Float64(n / Om)) * Float64(Float64(U * l) * Float64(2.0 + Float64(Float64(U - U_42_) * Float64(n / 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.9e+82) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / 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.9e+82], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(l * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[(N[(U * l), $MachinePrecision] * N[(2.0 + N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.9 \cdot 10^{+82}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\ell \cdot \frac{n}{Om}\right) \cdot \left(\left(U \cdot \ell\right) \cdot \left(2 + \left(U - U*\right) \cdot \frac{n}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 1.90000000000000017e82Initial program 54.2%
Simplified59.5%
Taylor expanded in U around 0 59.6%
if 1.90000000000000017e82 < l Initial program 33.8%
Simplified56.1%
Taylor expanded in l around -inf 50.3%
associate-/l*48.3%
unpow248.3%
*-commutative48.3%
mul-1-neg48.3%
associate-/l*48.3%
Simplified48.3%
*-un-lft-identity48.3%
associate-/r/48.0%
associate-*l*60.6%
unsub-neg60.6%
associate-/r/60.5%
Applied egg-rr60.5%
*-lft-identity60.5%
associate-*r*68.8%
associate-*r*68.8%
*-commutative68.8%
Simplified68.8%
Final simplification61.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.65e+79)
(sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om)))))))
(sqrt
(* -2.0 (* (* l (/ n Om)) (* (* U l) (+ 2.0 (* (- U U*) (/ n Om)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.65e+79) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (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) :: tmp
if (l <= 2.65d+79) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt(((-2.0d0) * ((l * (n / om)) * ((u * l) * (2.0d0 + ((u - u_42) * (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 tmp;
if (l <= 2.65e+79) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.65e+79: tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.65e+79) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(l * Float64(n / Om)) * Float64(Float64(U * l) * Float64(2.0 + Float64(Float64(U - U_42_) * Float64(n / 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.65e+79) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / 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.65e+79], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(l * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[(N[(U * l), $MachinePrecision] * N[(2.0 + N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.65 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\ell \cdot \frac{n}{Om}\right) \cdot \left(\left(U \cdot \ell\right) \cdot \left(2 + \left(U - U*\right) \cdot \frac{n}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 2.64999999999999989e79Initial program 54.2%
Simplified59.5%
Taylor expanded in n around 0 51.6%
*-commutative51.6%
unpow251.6%
associate-*r/54.4%
Simplified54.4%
if 2.64999999999999989e79 < l Initial program 33.8%
Simplified56.1%
Taylor expanded in l around -inf 50.3%
associate-/l*48.3%
unpow248.3%
*-commutative48.3%
mul-1-neg48.3%
associate-/l*48.3%
Simplified48.3%
*-un-lft-identity48.3%
associate-/r/48.0%
associate-*l*60.6%
unsub-neg60.6%
associate-/r/60.5%
Applied egg-rr60.5%
*-lft-identity60.5%
associate-*r*68.8%
associate-*r*68.8%
*-commutative68.8%
Simplified68.8%
Final simplification57.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* 4e+242) (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))) (sqrt (* -2.0 (/ n (/ Om (* (* n (* l l)) (/ (* U (- U U*)) Om))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 4e+242) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * (n / (Om / ((n * (l * l)) * ((U * (U - 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 (u_42 <= 4d+242) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt(((-2.0d0) * (n / (om / ((n * (l * l)) * ((u * (u - 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 (U_42_ <= 4e+242) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * (n / (Om / ((n * (l * l)) * ((U * (U - U_42_)) / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 4e+242: tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * (n / (Om / ((n * (l * l)) * ((U * (U - U_42_)) / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 4e+242) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Om / Float64(Float64(n * Float64(l * l)) * Float64(Float64(U * Float64(U - 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 (U_42_ <= 4e+242) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * (n / (Om / ((n * (l * l)) * ((U * (U - 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[U$42$, 4e+242], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n / N[(Om / N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(U * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 4 \cdot 10^{+242}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{U \cdot \left(U - U*\right)}{Om}}}}\\
\end{array}
\end{array}
if U* < 4.0000000000000002e242Initial program 52.3%
Simplified60.0%
Taylor expanded in n around 0 51.0%
*-commutative51.0%
unpow251.0%
associate-*r/55.9%
Simplified55.9%
if 4.0000000000000002e242 < U* Initial program 28.5%
Simplified44.7%
Taylor expanded in l around -inf 49.2%
associate-/l*49.3%
unpow249.3%
*-commutative49.3%
mul-1-neg49.3%
associate-/l*43.9%
Simplified43.9%
Taylor expanded in n around inf 23.1%
associate-*r*28.2%
unpow228.2%
Simplified28.2%
Taylor expanded in Om around 0 54.2%
Final simplification55.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* 4e+242) (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))) (sqrt (* -2.0 (/ n (/ Om (/ (* (* n (* l l)) (* U (- U U*))) Om)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 4e+242) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * (n / (Om / (((n * (l * l)) * (U * (U - 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 (u_42 <= 4d+242) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt(((-2.0d0) * (n / (om / (((n * (l * l)) * (u * (u - 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 (U_42_ <= 4e+242) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * (n / (Om / (((n * (l * l)) * (U * (U - U_42_))) / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 4e+242: tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * (n / (Om / (((n * (l * l)) * (U * (U - U_42_))) / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 4e+242) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Om / Float64(Float64(Float64(n * Float64(l * l)) * Float64(U * Float64(U - 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 (U_42_ <= 4e+242) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * (n / (Om / (((n * (l * l)) * (U * (U - 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[U$42$, 4e+242], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n / N[(Om / N[(N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(U * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 4 \cdot 10^{+242}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\frac{\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(U \cdot \left(U - U*\right)\right)}{Om}}}}\\
\end{array}
\end{array}
if U* < 4.0000000000000002e242Initial program 52.3%
Simplified60.0%
Taylor expanded in n around 0 51.0%
*-commutative51.0%
unpow251.0%
associate-*r/55.9%
Simplified55.9%
if 4.0000000000000002e242 < U* Initial program 28.5%
Simplified44.7%
Taylor expanded in l around -inf 49.2%
associate-/l*49.3%
unpow249.3%
*-commutative49.3%
mul-1-neg49.3%
associate-/l*43.9%
Simplified43.9%
Taylor expanded in n around -inf 49.4%
associate-*r/49.4%
mul-1-neg49.4%
associate-*r*54.6%
unpow254.6%
*-commutative54.6%
Simplified54.6%
Final simplification55.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* 4e+242) (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))) (sqrt (* -2.0 (/ n (/ Om (* (* l l) (/ (- 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 (U_42_ <= 4e+242) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * (n / (Om / ((l * l) * (-n / (Om / (U * U_42_))))))));
}
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 <= 4d+242) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt(((-2.0d0) * (n / (om / ((l * l) * (-n / (om / (u * u_42))))))))
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_ <= 4e+242) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * (n / (Om / ((l * l) * (-n / (Om / (U * U_42_))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 4e+242: tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * (n / (Om / ((l * l) * (-n / (Om / (U * U_42_)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 4e+242) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Om / Float64(Float64(l * l) * Float64(Float64(-n) / Float64(Om / Float64(U * U_42_)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= 4e+242) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * (n / (Om / ((l * l) * (-n / (Om / (U * U_42_)))))))); 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$, 4e+242], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n / N[(Om / N[(N[(l * l), $MachinePrecision] * N[((-n) / N[(Om / N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 4 \cdot 10^{+242}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \frac{-n}{\frac{Om}{U \cdot U*}}}}}\\
\end{array}
\end{array}
if U* < 4.0000000000000002e242Initial program 52.3%
Simplified60.0%
Taylor expanded in n around 0 51.0%
*-commutative51.0%
unpow251.0%
associate-*r/55.9%
Simplified55.9%
if 4.0000000000000002e242 < U* Initial program 28.5%
Simplified44.7%
Taylor expanded in l around -inf 49.2%
associate-/l*49.3%
unpow249.3%
*-commutative49.3%
mul-1-neg49.3%
associate-/l*43.9%
Simplified43.9%
Taylor expanded in U* around inf 54.3%
mul-1-neg54.3%
associate-/l*54.0%
distribute-neg-frac54.0%
Simplified54.0%
Final simplification55.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* 4e+242) (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))) (sqrt (* -2.0 (/ n (/ Om (* (* n (* l l)) (/ (- U*) (/ Om U)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 4e+242) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * (n / (Om / ((n * (l * l)) * (-U_42_ / (Om / 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 <= 4d+242) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt(((-2.0d0) * (n / (om / ((n * (l * l)) * (-u_42 / (om / 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_ <= 4e+242) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * (n / (Om / ((n * (l * l)) * (-U_42_ / (Om / U)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 4e+242: tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * (n / (Om / ((n * (l * l)) * (-U_42_ / (Om / U))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 4e+242) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Om / Float64(Float64(n * Float64(l * l)) * Float64(Float64(-U_42_) / Float64(Om / 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_ <= 4e+242) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * (n / (Om / ((n * (l * l)) * (-U_42_ / (Om / 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$, 4e+242], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n / N[(Om / N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[((-U$42$) / N[(Om / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 4 \cdot 10^{+242}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{-U*}{\frac{Om}{U}}}}}\\
\end{array}
\end{array}
if U* < 4.0000000000000002e242Initial program 52.3%
Simplified60.0%
Taylor expanded in n around 0 51.0%
*-commutative51.0%
unpow251.0%
associate-*r/55.9%
Simplified55.9%
if 4.0000000000000002e242 < U* Initial program 28.5%
Simplified44.7%
Taylor expanded in l around -inf 49.2%
associate-/l*49.3%
unpow249.3%
*-commutative49.3%
mul-1-neg49.3%
associate-/l*43.9%
Simplified43.9%
Taylor expanded in n around inf 23.1%
associate-*r*28.2%
unpow228.2%
Simplified28.2%
Taylor expanded in U around 0 54.2%
mul-1-neg54.2%
associate-/l*54.1%
Simplified54.1%
Final simplification55.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* 4e+242) (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))) (sqrt (* 2.0 (* (* n (* l l)) (/ n (/ (* Om Om) (* U U*))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 4e+242) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((2.0 * ((n * (l * l)) * (n / ((Om * Om) / (U * U_42_))))));
}
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 <= 4d+242) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt((2.0d0 * ((n * (l * l)) * (n / ((om * om) / (u * u_42))))))
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_ <= 4e+242) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((2.0 * ((n * (l * l)) * (n / ((Om * Om) / (U * U_42_))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 4e+242: tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((2.0 * ((n * (l * l)) * (n / ((Om * Om) / (U * U_42_)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 4e+242) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * l)) * Float64(n / Float64(Float64(Om * Om) / Float64(U * U_42_)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= 4e+242) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt((2.0 * ((n * (l * l)) * (n / ((Om * Om) / (U * U_42_)))))); 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$, 4e+242], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 4 \cdot 10^{+242}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{n}{\frac{Om \cdot Om}{U \cdot U*}}\right)}\\
\end{array}
\end{array}
if U* < 4.0000000000000002e242Initial program 52.3%
Simplified60.0%
Taylor expanded in n around 0 51.0%
*-commutative51.0%
unpow251.0%
associate-*r/55.9%
Simplified55.9%
if 4.0000000000000002e242 < U* Initial program 28.5%
Simplified44.7%
Taylor expanded in l around inf 43.5%
associate-*r*43.5%
unpow243.5%
sub-neg43.5%
associate-/l*43.5%
unpow243.5%
associate-*r/43.5%
metadata-eval43.5%
distribute-neg-frac43.5%
metadata-eval43.5%
Simplified43.5%
Taylor expanded in U* around inf 43.5%
associate-/l*43.7%
*-commutative43.7%
unpow243.7%
Simplified43.7%
Final simplification55.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.1e+32) (pow (* 2.0 (* n (* U t))) 0.5) (pow (* -2.0 (/ n (* (/ 0.5 U) (/ Om (* l l))))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.1e+32) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = pow((-2.0 * (n / ((0.5 / U) * (Om / (l * l))))), 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 <= 1.1d+32) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = ((-2.0d0) * (n / ((0.5d0 / u) * (om / (l * l))))) ** 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 <= 1.1e+32) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.pow((-2.0 * (n / ((0.5 / U) * (Om / (l * l))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.1e+32: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.pow((-2.0 * (n / ((0.5 / U) * (Om / (l * l))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.1e+32) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = Float64(-2.0 * Float64(n / Float64(Float64(0.5 / U) * Float64(Om / Float64(l * l))))) ^ 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 <= 1.1e+32) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = (-2.0 * (n / ((0.5 / U) * (Om / (l * l))))) ^ 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, 1.1e+32], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(-2.0 * N[(n / N[(N[(0.5 / U), $MachinePrecision] * N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.1 \cdot 10^{+32}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(-2 \cdot \frac{n}{\frac{0.5}{U} \cdot \frac{Om}{\ell \cdot \ell}}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.1e32Initial program 53.4%
Simplified58.9%
Taylor expanded in t around inf 41.8%
pow1/244.3%
associate-*r*44.3%
*-commutative44.3%
Applied egg-rr44.3%
if 1.1e32 < l Initial program 40.3%
Simplified58.8%
Taylor expanded in l around -inf 50.4%
associate-/l*48.6%
unpow248.6%
*-commutative48.6%
mul-1-neg48.6%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in Om around inf 38.9%
associate-*r/38.9%
*-commutative38.9%
unpow238.9%
Simplified38.9%
pow1/244.9%
times-frac41.0%
Applied egg-rr41.0%
Final simplification43.6%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 8.5e+41) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* -2.0 (* (* U (* l l)) (/ n (* Om 0.5)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8.5e+41) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((-2.0 * ((U * (l * l)) * (n / (Om * 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 <= 8.5d+41) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((-2.0d0) * ((u * (l * l)) * (n / (om * 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 <= 8.5e+41) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((-2.0 * ((U * (l * l)) * (n / (Om * 0.5)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 8.5e+41: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((-2.0 * ((U * (l * l)) * (n / (Om * 0.5))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 8.5e+41) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64(l * l)) * Float64(n / Float64(Om * 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 <= 8.5e+41) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((-2.0 * ((U * (l * l)) * (n / (Om * 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, 8.5e+41], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(n / N[(Om * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8.5 \cdot 10^{+41}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(U \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{n}{Om \cdot 0.5}\right)}\\
\end{array}
\end{array}
if l < 8.49999999999999938e41Initial program 53.1%
Simplified58.7%
Taylor expanded in t around inf 41.6%
pow1/244.1%
associate-*r*44.1%
*-commutative44.1%
Applied egg-rr44.1%
if 8.49999999999999938e41 < l Initial program 40.9%
Simplified59.7%
Taylor expanded in l around -inf 51.2%
associate-/l*49.3%
unpow249.3%
*-commutative49.3%
mul-1-neg49.3%
associate-/l*49.3%
Simplified49.3%
Taylor expanded in Om around inf 39.5%
associate-*r/39.5%
*-commutative39.5%
unpow239.5%
Simplified39.5%
associate-/r/37.7%
*-commutative37.7%
Applied egg-rr37.7%
Final simplification42.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 6.7e+41) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* -2.0 (/ n (/ (* Om 0.5) (* U (* l l))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.7e+41) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((-2.0 * (n / ((Om * 0.5) / (U * (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 <= 6.7d+41) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((-2.0d0) * (n / ((om * 0.5d0) / (u * (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 <= 6.7e+41) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((-2.0 * (n / ((Om * 0.5) / (U * (l * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.7e+41: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((-2.0 * (n / ((Om * 0.5) / (U * (l * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.7e+41) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Float64(Om * 0.5) / Float64(U * 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 <= 6.7e+41) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((-2.0 * (n / ((Om * 0.5) / (U * (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, 6.7e+41], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n / N[(N[(Om * 0.5), $MachinePrecision] / N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.7 \cdot 10^{+41}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om \cdot 0.5}{U \cdot \left(\ell \cdot \ell\right)}}}\\
\end{array}
\end{array}
if l < 6.6999999999999996e41Initial program 53.1%
Simplified58.7%
Taylor expanded in t around inf 41.6%
pow1/244.1%
associate-*r*44.1%
*-commutative44.1%
Applied egg-rr44.1%
if 6.6999999999999996e41 < l Initial program 40.9%
Simplified59.7%
Taylor expanded in l around -inf 51.2%
associate-/l*49.3%
unpow249.3%
*-commutative49.3%
mul-1-neg49.3%
associate-/l*49.3%
Simplified49.3%
Taylor expanded in Om around inf 39.5%
associate-*r/39.5%
*-commutative39.5%
unpow239.5%
Simplified39.5%
Final simplification43.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 (/ 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 * n) * Float64(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), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}
\end{array}
Initial program 50.5%
Simplified58.9%
Taylor expanded in n around 0 48.2%
*-commutative48.2%
unpow248.2%
associate-*r/52.7%
Simplified52.7%
Final simplification52.7%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* n (* U t))) 0.5))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow((2.0 * (n * (U * t))), 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 = (2.0d0 * (n * (u * t))) ** 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((2.0 * (n * (U * t))), 0.5);
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * (n * (U * t))), 0.5)
l = abs(l) function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5 end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * (n * (U * t))) ^ 0.5; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}
\end{array}
Initial program 50.5%
Simplified58.9%
Taylor expanded in t around inf 35.4%
pow1/238.2%
associate-*r*38.2%
*-commutative38.2%
Applied egg-rr38.2%
Final simplification38.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(Float64(2.0 * 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[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}
\end{array}
Initial program 50.5%
Simplified58.9%
Taylor expanded in t around inf 35.4%
Final simplification35.4%
herbie shell --seed 2023257
(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*))))))