
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U* U)))))))
(if (<= t_2 0.0)
(*
(sqrt (* 2.0 n))
(sqrt (* U (- t (fma 2.0 (/ (pow l 2.0) Om) (* n (* t_1 (- U U*))))))))
(if (<= t_2 5e+147)
t_2
(*
(sqrt (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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 = pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (pow(l, 2.0) / Om), (n * (t_1 * (U - U_42_)))))));
} else if (t_2 <= 5e+147) {
tmp = t_2;
} else {
tmp = sqrt(((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Om) ^ 2.0 t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * t_1) * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(2.0, Float64((l ^ 2.0) / Om), Float64(n * Float64(t_1 * Float64(U - U_42_)))))))); elseif (t_2 <= 5e+147) tmp = t_2; else tmp = Float64(sqrt(Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] + N[(n * N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+147], t$95$2, N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \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 t_1\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{{\ell}^{2}}{Om}, n \cdot \left(t_1 \cdot \left(U - U*\right)\right)\right)\right)}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+147}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\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*))))) < 0.0Initial program 8.6%
associate-*l/8.6%
Applied egg-rr8.6%
pow1/28.6%
associate-*l*49.4%
unpow-prod-down58.7%
pow1/258.7%
associate--l-58.7%
fma-def58.7%
associate-*l/58.7%
unpow258.7%
associate-*l*61.3%
Applied egg-rr61.3%
*-commutative61.3%
unpow1/261.3%
*-commutative61.3%
Simplified61.3%
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*))))) < 5.0000000000000002e147Initial program 97.9%
if 5.0000000000000002e147 < (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 24.7%
Simplified35.3%
Taylor expanded in l around inf 27.2%
associate-/l*27.3%
associate-*r/27.3%
metadata-eval27.3%
Simplified27.3%
Taylor expanded in U around 0 27.7%
associate-*r*28.4%
*-commutative28.4%
associate-*r/28.4%
metadata-eval28.4%
Simplified28.4%
Final simplification57.7%
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 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (fma (/ (pow l 2.0) Om) -2.0 t))))
(if (<= t_1 5e+147)
t_1
(*
(sqrt (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * fma((pow(l, 2.0) / Om), -2.0, t)));
} else if (t_1 <= 5e+147) {
tmp = t_1;
} else {
tmp = sqrt(((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (2.0 / Om)))) * (l * 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 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * fma(Float64((l ^ 2.0) / Om), -2.0, t)))); elseif (t_1 <= 5e+147) tmp = t_1; else tmp = Float64(sqrt(Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[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, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+147], t$95$1, N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \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 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+147}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\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*))))) < 0.0Initial program 8.6%
Simplified46.4%
Taylor expanded in n around 0 49.3%
pow1/249.3%
associate-*r*49.4%
unpow-prod-down56.0%
pow1/256.0%
+-commutative56.0%
*-commutative56.0%
fma-def56.0%
Applied egg-rr56.0%
unpow1/256.0%
*-commutative56.0%
Simplified56.0%
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*))))) < 5.0000000000000002e147Initial program 97.9%
if 5.0000000000000002e147 < (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 24.7%
Simplified35.3%
Taylor expanded in l around inf 27.2%
associate-/l*27.3%
associate-*r/27.3%
metadata-eval27.3%
Simplified27.3%
Taylor expanded in U around 0 27.7%
associate-*r*28.4%
*-commutative28.4%
associate-*r/28.4%
metadata-eval28.4%
Simplified28.4%
Final simplification57.0%
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)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
(*
(* l (sqrt 2.0))
(sqrt (* n (* U (+ (/ U* (/ (pow Om 2.0) n)) (/ -2.0 Om))))))))))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 = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((U_42_ / (pow(Om, 2.0) / n)) + (-2.0 / 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 = (n * Math.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 = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((n * (U * ((U_42_ / (Math.pow(Om, 2.0) / n)) + (-2.0 / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_2 = (2.0 * n) * U t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((n * (U * ((U_42_ / (math.pow(Om, 2.0) / n)) + (-2.0 / Om))))) 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 = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); 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(Float64(l * sqrt(2.0)) * sqrt(Float64(n * Float64(U * Float64(Float64(U_42_ / Float64((Om ^ 2.0) / n)) + Float64(-2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_2 = (2.0 * n) * U; t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))); else tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((U_42_ / ((Om ^ 2.0) / n)) + (-2.0 / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := 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[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n * N[(U * N[(N[(U$42$ / N[(N[Power[Om, 2.0], $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $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:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\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}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{U*}{\frac{{Om}^{2}}{n}} + \frac{-2}{Om}\right)\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 0.0Initial program 7.5%
Simplified10.0%
Taylor expanded in n around 0 48.1%
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 69.0%
associate-*l/73.1%
Applied egg-rr73.1%
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%
Simplified8.0%
Taylor expanded in l around inf 26.0%
associate-/l*26.1%
associate-*r/26.1%
metadata-eval26.1%
Simplified26.1%
Taylor expanded in U around 0 26.0%
associate-*r*25.7%
*-commutative25.7%
associate-*l*26.0%
sub-neg26.0%
associate-/l*26.1%
associate-*r/26.1%
metadata-eval26.1%
distribute-neg-frac26.1%
metadata-eval26.1%
Simplified26.1%
Final simplification62.0%
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.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(if (<= t_1 2e+295)
(sqrt t_1)
(*
(sqrt (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else if (t_1 <= 2e+295) {
tmp = sqrt(t_1);
} else {
tmp = sqrt(((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (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 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))
if (t_1 <= 0.0d0) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
else if (t_1 <= 2d+295) then
tmp = sqrt(t_1)
else
tmp = sqrt(((n * u) * (((n * u_42) / (om ** 2.0d0)) - (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 = ((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 <= 0.0) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else if (t_1 <= 2e+295) {
tmp = Math.sqrt(t_1);
} else {
tmp = Math.sqrt(((n * U) * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = ((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 <= 0.0: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) elif t_1 <= 2e+295: tmp = math.sqrt(t_1) else: tmp = math.sqrt(((n * U) * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om)))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = 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 <= 0.0) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); elseif (t_1 <= 2e+295) tmp = sqrt(t_1); else tmp = Float64(sqrt(Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - 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 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); elseif (t_1 <= 2e+295) tmp = sqrt(t_1); else tmp = sqrt(((n * U) * (((n * U_42_) / (Om ^ 2.0)) - (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[(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]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 2e+295], N[Sqrt[t$95$1], $MachinePrecision], N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \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 0:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;\sqrt{t_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 0.0Initial program 7.5%
Simplified10.0%
Taylor expanded in n around 0 48.1%
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*)))) < 2e295Initial program 97.9%
if 2e295 < (*.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 25.7%
Simplified35.8%
Taylor expanded in l around inf 27.9%
associate-/l*28.0%
associate-*r/28.0%
metadata-eval28.0%
Simplified28.0%
Taylor expanded in U around 0 28.5%
associate-*r*29.2%
*-commutative29.2%
associate-*r/29.2%
metadata-eval29.2%
Simplified29.2%
Final simplification56.8%
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)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
(pow (* 2.0 (/ (* U -2.0) (/ Om (* n (pow l 2.0))))) 0.5)))))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 = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = pow((2.0 * ((U * -2.0) / (Om / (n * pow(l, 2.0))))), 0.5);
}
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 = (n * Math.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 = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = Math.pow((2.0 * ((U * -2.0) / (Om / (n * Math.pow(l, 2.0))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_2 = (2.0 * n) * U t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))) else: tmp = math.pow((2.0 * ((U * -2.0) / (Om / (n * math.pow(l, 2.0))))), 0.5) 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 = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); 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(2.0 * Float64(Float64(U * -2.0) / Float64(Om / Float64(n * (l ^ 2.0))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_2 = (2.0 * n) * U; t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))); else tmp = (2.0 * ((U * -2.0) / (Om / (n * (l ^ 2.0))))) ^ 0.5; 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[(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[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(U * -2.0), $MachinePrecision] / N[(Om / N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $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:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\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}:\\
\;\;\;\;{\left(2 \cdot \frac{U \cdot -2}{\frac{Om}{n \cdot {\ell}^{2}}}\right)}^{0.5}\\
\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 7.5%
Simplified10.0%
Taylor expanded in n around 0 48.1%
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 69.0%
associate-*l/73.1%
Applied egg-rr73.1%
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%
Simplified8.0%
Taylor expanded in n around 0 1.8%
pow1/235.5%
metadata-eval35.5%
cancel-sign-sub-inv35.5%
associate-*r*34.8%
cancel-sign-sub-inv34.8%
metadata-eval34.8%
+-commutative34.8%
*-commutative34.8%
fma-def34.8%
Applied egg-rr34.8%
Taylor expanded in l around inf 37.9%
associate-/l*40.3%
associate-*r/40.3%
*-commutative40.3%
Simplified40.3%
Final simplification64.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= n -5.5e-56) (not (<= n 7.7e-97)))
(sqrt
(*
(* 2.0 n)
(*
U
(+
(+ t (* -2.0 (/ l (/ Om l))))
(* n (* (pow (/ l Om) 2.0) (- U* U)))))))
(sqrt (+ (* -4.0 (/ (* U (* n (pow l 2.0))) Om)) (* 2.0 (* U (* n t)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -5.5e-56) || !(n <= 7.7e-97)) {
tmp = sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (pow((l / Om), 2.0) * (U_42_ - U)))))));
} else {
tmp = sqrt(((-4.0 * ((U * (n * pow(l, 2.0))) / Om)) + (2.0 * (U * (n * t)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((n <= (-5.5d-56)) .or. (.not. (n <= 7.7d-97))) then
tmp = sqrt(((2.0d0 * n) * (u * ((t + ((-2.0d0) * (l / (om / l)))) + (n * (((l / om) ** 2.0d0) * (u_42 - u)))))))
else
tmp = sqrt((((-4.0d0) * ((u * (n * (l ** 2.0d0))) / om)) + (2.0d0 * (u * (n * t)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -5.5e-56) || !(n <= 7.7e-97)) {
tmp = Math.sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U)))))));
} else {
tmp = Math.sqrt(((-4.0 * ((U * (n * Math.pow(l, 2.0))) / Om)) + (2.0 * (U * (n * t)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (n <= -5.5e-56) or not (n <= 7.7e-97): tmp = math.sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U))))))) else: tmp = math.sqrt(((-4.0 * ((U * (n * math.pow(l, 2.0))) / Om)) + (2.0 * (U * (n * t))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((n <= -5.5e-56) || !(n <= 7.7e-97)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U))))))); else tmp = sqrt(Float64(Float64(-4.0 * Float64(Float64(U * Float64(n * (l ^ 2.0))) / Om)) + Float64(2.0 * Float64(U * Float64(n * t))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((n <= -5.5e-56) || ~((n <= 7.7e-97))) tmp = sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (((l / Om) ^ 2.0) * (U_42_ - U))))))); else tmp = sqrt(((-4.0 * ((U * (n * (l ^ 2.0))) / Om)) + (2.0 * (U * (n * t))))); 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[n, -5.5e-56], N[Not[LessEqual[n, 7.7e-97]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-4.0 * N[(N[(U * N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -5.5 \cdot 10^{-56} \lor \neg \left(n \leq 7.7 \cdot 10^{-97}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {\ell}^{2}\right)}{Om} + 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if n < -5.4999999999999999e-56 or 7.7e-97 < n Initial program 51.7%
Simplified58.7%
if -5.4999999999999999e-56 < n < 7.7e-97Initial program 44.5%
Simplified45.8%
Taylor expanded in Om around inf 58.9%
Final simplification58.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow l 2.0))))
(if (<= l 1.12e+49)
(sqrt (+ (* -4.0 (/ (* U t_1) Om)) (* 2.0 (* U (* n t)))))
(if (<= l 5.2e+169)
(pow (* 2.0 (/ (* U -2.0) (/ Om t_1))) 0.5)
(* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow(l, 2.0);
double tmp;
if (l <= 1.12e+49) {
tmp = sqrt(((-4.0 * ((U * t_1) / Om)) + (2.0 * (U * (n * t)))));
} else if (l <= 5.2e+169) {
tmp = pow((2.0 * ((U * -2.0) / (Om / t_1))), 0.5);
} else {
tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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) :: tmp
t_1 = n * (l ** 2.0d0)
if (l <= 1.12d+49) then
tmp = sqrt((((-4.0d0) * ((u * t_1) / om)) + (2.0d0 * (u * (n * t)))))
else if (l <= 5.2d+169) then
tmp = (2.0d0 * ((u * (-2.0d0)) / (om / t_1))) ** 0.5d0
else
tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / 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 = n * Math.pow(l, 2.0);
double tmp;
if (l <= 1.12e+49) {
tmp = Math.sqrt(((-4.0 * ((U * t_1) / Om)) + (2.0 * (U * (n * t)))));
} else if (l <= 5.2e+169) {
tmp = Math.pow((2.0 * ((U * -2.0) / (Om / t_1))), 0.5);
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow(l, 2.0) tmp = 0 if l <= 1.12e+49: tmp = math.sqrt(((-4.0 * ((U * t_1) / Om)) + (2.0 * (U * (n * t))))) elif l <= 5.2e+169: tmp = math.pow((2.0 * ((U * -2.0) / (Om / t_1))), 0.5) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (l ^ 2.0)) tmp = 0.0 if (l <= 1.12e+49) tmp = sqrt(Float64(Float64(-4.0 * Float64(Float64(U * t_1) / Om)) + Float64(2.0 * Float64(U * Float64(n * t))))); elseif (l <= 5.2e+169) tmp = Float64(2.0 * Float64(Float64(U * -2.0) / Float64(Om / t_1))) ^ 0.5; else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * (l ^ 2.0); tmp = 0.0; if (l <= 1.12e+49) tmp = sqrt(((-4.0 * ((U * t_1) / Om)) + (2.0 * (U * (n * t))))); elseif (l <= 5.2e+169) tmp = (2.0 * ((U * -2.0) / (Om / t_1))) ^ 0.5; else tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 1.12e+49], N[Sqrt[N[(N[(-4.0 * N[(N[(U * t$95$1), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 5.2e+169], N[Power[N[(2.0 * N[(N[(U * -2.0), $MachinePrecision] / N[(Om / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\ell}^{2}\\
\mathbf{if}\;\ell \leq 1.12 \cdot 10^{+49}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot t_1}{Om} + 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 5.2 \cdot 10^{+169}:\\
\;\;\;\;{\left(2 \cdot \frac{U \cdot -2}{\frac{Om}{t_1}}\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 1.12000000000000005e49Initial program 50.9%
Simplified53.7%
Taylor expanded in Om around inf 47.1%
if 1.12000000000000005e49 < l < 5.19999999999999999e169Initial program 53.5%
Simplified59.3%
Taylor expanded in n around 0 55.4%
pow1/274.3%
metadata-eval74.3%
cancel-sign-sub-inv74.3%
associate-*r*68.6%
cancel-sign-sub-inv68.6%
metadata-eval68.6%
+-commutative68.6%
*-commutative68.6%
fma-def68.6%
Applied egg-rr68.6%
Taylor expanded in l around inf 68.3%
associate-/l*68.3%
associate-*r/68.3%
*-commutative68.3%
Simplified68.3%
if 5.19999999999999999e169 < l Initial program 24.1%
Simplified46.0%
Taylor expanded in l around inf 73.3%
associate-/l*73.3%
associate-*r/73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in n around 0 44.5%
Final simplification49.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 9.5e+42)
(sqrt (fabs (* 2.0 (* U (* n t)))))
(if (<= l 3.4e+169)
(pow (* 2.0 (/ (* U -2.0) (/ Om (* n (pow l 2.0))))) 0.5)
(* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 9.5e+42) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else if (l <= 3.4e+169) {
tmp = pow((2.0 * ((U * -2.0) / (Om / (n * pow(l, 2.0))))), 0.5);
} else {
tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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 <= 9.5d+42) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else if (l <= 3.4d+169) then
tmp = (2.0d0 * ((u * (-2.0d0)) / (om / (n * (l ** 2.0d0))))) ** 0.5d0
else
tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / 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 <= 9.5e+42) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else if (l <= 3.4e+169) {
tmp = Math.pow((2.0 * ((U * -2.0) / (Om / (n * Math.pow(l, 2.0))))), 0.5);
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 9.5e+42: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) elif l <= 3.4e+169: tmp = math.pow((2.0 * ((U * -2.0) / (Om / (n * math.pow(l, 2.0))))), 0.5) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 9.5e+42) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); elseif (l <= 3.4e+169) tmp = Float64(2.0 * Float64(Float64(U * -2.0) / Float64(Om / Float64(n * (l ^ 2.0))))) ^ 0.5; else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 9.5e+42) tmp = sqrt(abs((2.0 * (U * (n * t))))); elseif (l <= 3.4e+169) tmp = (2.0 * ((U * -2.0) / (Om / (n * (l ^ 2.0))))) ^ 0.5; else tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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, 9.5e+42], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.4e+169], N[Power[N[(2.0 * N[(N[(U * -2.0), $MachinePrecision] / N[(Om / N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 9.5 \cdot 10^{+42}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;\ell \leq 3.4 \cdot 10^{+169}:\\
\;\;\;\;{\left(2 \cdot \frac{U \cdot -2}{\frac{Om}{n \cdot {\ell}^{2}}}\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 9.50000000000000019e42Initial program 50.8%
Simplified53.7%
Taylor expanded in l around 0 41.7%
add-sqr-sqrt41.7%
pow1/241.7%
pow1/242.8%
pow-prod-down31.4%
pow231.4%
associate-*r*31.4%
Applied egg-rr31.4%
unpow1/231.4%
unpow231.4%
rem-sqrt-square43.4%
associate-*r*43.4%
Simplified43.4%
if 9.50000000000000019e42 < l < 3.40000000000000028e169Initial program 53.5%
Simplified58.9%
Taylor expanded in n around 0 55.2%
pow1/272.8%
metadata-eval72.8%
cancel-sign-sub-inv72.8%
associate-*r*67.4%
cancel-sign-sub-inv67.4%
metadata-eval67.4%
+-commutative67.4%
*-commutative67.4%
fma-def67.4%
Applied egg-rr67.4%
Taylor expanded in l around inf 67.2%
associate-/l*63.9%
associate-*r/63.9%
*-commutative63.9%
Simplified63.9%
if 3.40000000000000028e169 < l Initial program 24.1%
Simplified46.0%
Taylor expanded in l around inf 73.3%
associate-/l*73.3%
associate-*r/73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in n around 0 44.5%
Final simplification45.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 6.3e+47)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(if (<= l 5.2e+169)
(pow (* 2.0 (/ (* U -2.0) (/ Om (* n (pow l 2.0))))) 0.5)
(* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.3e+47) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else if (l <= 5.2e+169) {
tmp = pow((2.0 * ((U * -2.0) / (Om / (n * pow(l, 2.0))))), 0.5);
} else {
tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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 <= 6.3d+47) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
else if (l <= 5.2d+169) then
tmp = (2.0d0 * ((u * (-2.0d0)) / (om / (n * (l ** 2.0d0))))) ** 0.5d0
else
tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / 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 <= 6.3e+47) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else if (l <= 5.2e+169) {
tmp = Math.pow((2.0 * ((U * -2.0) / (Om / (n * Math.pow(l, 2.0))))), 0.5);
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.3e+47: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) elif l <= 5.2e+169: tmp = math.pow((2.0 * ((U * -2.0) / (Om / (n * math.pow(l, 2.0))))), 0.5) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.3e+47) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); elseif (l <= 5.2e+169) tmp = Float64(2.0 * Float64(Float64(U * -2.0) / Float64(Om / Float64(n * (l ^ 2.0))))) ^ 0.5; else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 6.3e+47) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); elseif (l <= 5.2e+169) tmp = (2.0 * ((U * -2.0) / (Om / (n * (l ^ 2.0))))) ^ 0.5; else tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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, 6.3e+47], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 5.2e+169], N[Power[N[(2.0 * N[(N[(U * -2.0), $MachinePrecision] / N[(Om / N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.3 \cdot 10^{+47}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 5.2 \cdot 10^{+169}:\\
\;\;\;\;{\left(2 \cdot \frac{U \cdot -2}{\frac{Om}{n \cdot {\ell}^{2}}}\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 6.30000000000000003e47Initial program 50.9%
Simplified49.4%
Taylor expanded in n around 0 47.1%
if 6.30000000000000003e47 < l < 5.19999999999999999e169Initial program 53.5%
Simplified59.3%
Taylor expanded in n around 0 55.4%
pow1/274.3%
metadata-eval74.3%
cancel-sign-sub-inv74.3%
associate-*r*68.6%
cancel-sign-sub-inv68.6%
metadata-eval68.6%
+-commutative68.6%
*-commutative68.6%
fma-def68.6%
Applied egg-rr68.6%
Taylor expanded in l around inf 68.3%
associate-/l*68.3%
associate-*r/68.3%
*-commutative68.3%
Simplified68.3%
if 5.19999999999999999e169 < l Initial program 24.1%
Simplified46.0%
Taylor expanded in l around inf 73.3%
associate-/l*73.3%
associate-*r/73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in n around 0 44.5%
Final simplification49.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.5e+43)
(sqrt (fabs (* 2.0 (* U (* n t)))))
(if (<= l 2.35e+157)
(sqrt (* 2.0 (* -2.0 (/ U (/ Om (* n (pow l 2.0)))))))
(* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e+43) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else if (l <= 2.35e+157) {
tmp = sqrt((2.0 * (-2.0 * (U / (Om / (n * pow(l, 2.0)))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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.5d+43) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else if (l <= 2.35d+157) then
tmp = sqrt((2.0d0 * ((-2.0d0) * (u / (om / (n * (l ** 2.0d0)))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / 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.5e+43) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else if (l <= 2.35e+157) {
tmp = Math.sqrt((2.0 * (-2.0 * (U / (Om / (n * Math.pow(l, 2.0)))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e+43: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) elif l <= 2.35e+157: tmp = math.sqrt((2.0 * (-2.0 * (U / (Om / (n * math.pow(l, 2.0))))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e+43) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); elseif (l <= 2.35e+157) tmp = sqrt(Float64(2.0 * Float64(-2.0 * Float64(U / Float64(Om / Float64(n * (l ^ 2.0))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / 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.5e+43) tmp = sqrt(abs((2.0 * (U * (n * t))))); elseif (l <= 2.35e+157) tmp = sqrt((2.0 * (-2.0 * (U / (Om / (n * (l ^ 2.0))))))); else tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / 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.5e+43], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.35e+157], N[Sqrt[N[(2.0 * N[(-2.0 * N[(U / N[(Om / N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{+43}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;\ell \leq 2.35 \cdot 10^{+157}:\\
\;\;\;\;\sqrt{2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 1.50000000000000008e43Initial program 50.8%
Simplified53.7%
Taylor expanded in l around 0 41.7%
add-sqr-sqrt41.7%
pow1/241.7%
pow1/242.8%
pow-prod-down31.4%
pow231.4%
associate-*r*31.4%
Applied egg-rr31.4%
unpow1/231.4%
unpow231.4%
rem-sqrt-square43.4%
associate-*r*43.4%
Simplified43.4%
if 1.50000000000000008e43 < l < 2.35000000000000015e157Initial program 53.8%
Simplified53.8%
Taylor expanded in n around 0 51.9%
Taylor expanded in t around 0 49.4%
associate-/l*45.9%
*-commutative45.9%
Simplified45.9%
if 2.35000000000000015e157 < l Initial program 26.2%
Simplified50.5%
Taylor expanded in l around inf 75.5%
associate-/l*75.5%
associate-*r/75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in n around 0 45.0%
Final simplification43.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.8e+40) (sqrt (fabs (* 2.0 (* U (* n t))))) (* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ U (/ Om n)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.8e+40) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.8d+40) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else
tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * (u / (om / n))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.8e+40) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * (U / (Om / n))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.8e+40: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * (U / (Om / n)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.8e+40) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(U / Float64(Om / n))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.8e+40) tmp = sqrt(abs((2.0 * (U * (n * t))))); else tmp = (l * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.8e+40], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(U / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.8 \cdot 10^{+40}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\\
\end{array}
\end{array}
if l < 1.79999999999999998e40Initial program 50.8%
Simplified53.7%
Taylor expanded in l around 0 41.7%
add-sqr-sqrt41.7%
pow1/241.7%
pow1/242.8%
pow-prod-down31.4%
pow231.4%
associate-*r*31.4%
Applied egg-rr31.4%
unpow1/231.4%
unpow231.4%
rem-sqrt-square43.4%
associate-*r*43.4%
Simplified43.4%
if 1.79999999999999998e40 < l Initial program 40.8%
Simplified53.3%
Taylor expanded in l around inf 61.9%
associate-/l*61.9%
associate-*r/61.9%
metadata-eval61.9%
Simplified61.9%
Taylor expanded in n around 0 32.6%
associate-/l*38.2%
Simplified38.2%
Final simplification42.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U 1.85e-66) (sqrt (fabs (* 2.0 (* U (* n t))))) (pow (* 2.0 (* t (* n U))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.85e-66) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else {
tmp = pow((2.0 * (t * (n * U))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 1.85d-66) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else
tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.85e-66) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 1.85e-66: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) else: tmp = math.pow((2.0 * (t * (n * U))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 1.85e-66) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); else tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 1.85e-66) tmp = sqrt(abs((2.0 * (U * (n * t))))); else tmp = (2.0 * (t * (n * U))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 1.85e-66], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.85 \cdot 10^{-66}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if U < 1.8500000000000001e-66Initial program 44.4%
Simplified52.2%
Taylor expanded in l around 0 36.0%
add-sqr-sqrt36.0%
pow1/236.0%
pow1/238.1%
pow-prod-down28.8%
pow228.8%
associate-*r*28.8%
Applied egg-rr28.8%
unpow1/228.8%
unpow228.8%
rem-sqrt-square39.0%
associate-*r*39.0%
Simplified39.0%
if 1.8500000000000001e-66 < U Initial program 62.7%
Simplified58.2%
Taylor expanded in n around 0 50.1%
pow1/256.9%
metadata-eval56.9%
cancel-sign-sub-inv56.9%
associate-*r*64.5%
cancel-sign-sub-inv64.5%
metadata-eval64.5%
+-commutative64.5%
*-commutative64.5%
fma-def64.5%
Applied egg-rr64.5%
Taylor expanded in l around 0 38.0%
associate-*r*47.3%
Simplified47.3%
Final simplification41.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U 1.8e-254) (sqrt (fabs (* 2.0 (* U (* n t))))) (* (sqrt (* 2.0 U)) (sqrt (* n t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.8e-254) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 1.8d-254) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.8e-254) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 1.8e-254: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) else: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 1.8e-254) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); else tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 1.8e-254) tmp = sqrt(abs((2.0 * (U * (n * t))))); else tmp = sqrt((2.0 * U)) * sqrt((n * t)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 1.8e-254], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.8 \cdot 10^{-254}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\end{array}
\end{array}
if U < 1.79999999999999992e-254Initial program 44.7%
Simplified52.5%
Taylor expanded in l around 0 37.5%
add-sqr-sqrt37.5%
pow1/237.5%
pow1/240.0%
pow-prod-down30.2%
pow230.2%
associate-*r*30.2%
Applied egg-rr30.2%
unpow1/230.2%
unpow230.2%
rem-sqrt-square41.0%
associate-*r*41.0%
Simplified41.0%
if 1.79999999999999992e-254 < U Initial program 55.6%
Simplified55.5%
Taylor expanded in l around 0 33.6%
pow1/234.9%
associate-*r*34.9%
unpow-prod-down44.9%
pow1/243.8%
Applied egg-rr43.8%
unpow1/243.8%
Simplified43.8%
Final simplification42.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U 1e-66) (sqrt (* U (* (* 2.0 n) t))) (pow (* 2.0 (* t (* n U))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1e-66) {
tmp = sqrt((U * ((2.0 * n) * t)));
} else {
tmp = pow((2.0 * (t * (n * U))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 1d-66) then
tmp = sqrt((u * ((2.0d0 * n) * t)))
else
tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1e-66) {
tmp = Math.sqrt((U * ((2.0 * n) * t)));
} else {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 1e-66: tmp = math.sqrt((U * ((2.0 * n) * t))) else: tmp = math.pow((2.0 * (t * (n * U))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 1e-66) tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * t))); else tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 1e-66) tmp = sqrt((U * ((2.0 * n) * t))); else tmp = (2.0 * (t * (n * U))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 1e-66], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq 10^{-66}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if U < 9.9999999999999998e-67Initial program 44.4%
associate-*l/48.7%
Applied egg-rr48.7%
Taylor expanded in t around inf 29.2%
Taylor expanded in n around 0 36.0%
*-commutative36.0%
associate-*l*36.0%
*-commutative36.0%
associate-*l*36.0%
Simplified36.0%
if 9.9999999999999998e-67 < U Initial program 62.7%
Simplified58.2%
Taylor expanded in n around 0 50.1%
pow1/256.9%
metadata-eval56.9%
cancel-sign-sub-inv56.9%
associate-*r*64.5%
cancel-sign-sub-inv64.5%
metadata-eval64.5%
+-commutative64.5%
*-commutative64.5%
fma-def64.5%
Applied egg-rr64.5%
Taylor expanded in l around 0 38.0%
associate-*r*47.3%
Simplified47.3%
Final simplification38.7%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U 3e-66) (pow (* (* n t) (* 2.0 U)) 0.5) (pow (* 2.0 (* t (* n U))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 3e-66) {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = pow((2.0 * (t * (n * U))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 3d-66) then
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
else
tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 3e-66) {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 3e-66: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) else: tmp = math.pow((2.0 * (t * (n * U))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 3e-66) tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; else tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 3e-66) tmp = ((n * t) * (2.0 * U)) ^ 0.5; else tmp = (2.0 * (t * (n * U))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 3e-66], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq 3 \cdot 10^{-66}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if U < 3.0000000000000002e-66Initial program 44.4%
Simplified52.2%
Taylor expanded in l around 0 36.0%
pow1/238.1%
associate-*r*38.1%
Applied egg-rr38.1%
if 3.0000000000000002e-66 < U Initial program 62.7%
Simplified58.2%
Taylor expanded in n around 0 50.1%
pow1/256.9%
metadata-eval56.9%
cancel-sign-sub-inv56.9%
associate-*r*64.5%
cancel-sign-sub-inv64.5%
metadata-eval64.5%
+-commutative64.5%
*-commutative64.5%
fma-def64.5%
Applied egg-rr64.5%
Taylor expanded in l around 0 38.0%
associate-*r*47.3%
Simplified47.3%
Final simplification40.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * t))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 48.8%
Simplified53.7%
Taylor expanded in l around 0 36.0%
Final simplification36.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* U (* (* 2.0 n) t))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((U * ((2.0 * n) * t)));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((u * ((2.0d0 * n) * t)))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((U * ((2.0 * n) * t)));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((U * ((2.0 * n) * t)))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(U * Float64(Float64(2.0 * n) * t))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((U * ((2.0 * n) * t))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot t\right)}
\end{array}
Initial program 48.8%
associate-*l/52.5%
Applied egg-rr52.5%
Taylor expanded in t around inf 32.3%
Taylor expanded in n around 0 36.0%
*-commutative36.0%
associate-*l*36.1%
*-commutative36.1%
associate-*l*36.1%
Simplified36.1%
Final simplification36.1%
herbie shell --seed 2023318
(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*))))))