
(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 21 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)))
(t_2 (- t (fma 2.0 (* l (/ l Om)) (* t_1 (- U U*)))))
(t_3
(* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))
(t_4 (* 2.0 (* n U))))
(if (<= t_3 -1e-114)
(sqrt
(* t_4 (- t (* l (* l (+ (/ 2.0 Om) (* (/ (- U U*) Om) (/ n Om))))))))
(if (<= t_3 2e-322)
(* (sqrt (* 2.0 n)) (sqrt (* U t_2)))
(if (<= t_3 INFINITY)
(pow (sqrt (sqrt (* t_4 t_2))) 2.0)
(pow
(*
(exp
(*
0.25
(+
(log
(*
U
(* n (+ (* 2.0 (/ -1.0 Om)) (/ (* n (- U* U)) (pow Om 2.0))))))
(* -2.0 (log (/ 1.0 l))))))
(sqrt (sqrt 2.0)))
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);
double t_2 = t - fma(2.0, (l * (l / Om)), (t_1 * (U - U_42_)));
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)));
double t_4 = 2.0 * (n * U);
double tmp;
if (t_3 <= -1e-114) {
tmp = sqrt((t_4 * (t - (l * (l * ((2.0 / Om) + (((U - U_42_) / Om) * (n / Om))))))));
} else if (t_3 <= 2e-322) {
tmp = sqrt((2.0 * n)) * sqrt((U * t_2));
} else if (t_3 <= ((double) INFINITY)) {
tmp = pow(sqrt(sqrt((t_4 * t_2))), 2.0);
} else {
tmp = pow((exp((0.25 * (log((U * (n * ((2.0 * (-1.0 / Om)) + ((n * (U_42_ - U)) / pow(Om, 2.0)))))) + (-2.0 * log((1.0 / l)))))) * sqrt(sqrt(2.0))), 2.0);
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(t_1 * Float64(U - U_42_)))) t_3 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) t_4 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if (t_3 <= -1e-114) tmp = sqrt(Float64(t_4 * Float64(t - Float64(l * Float64(l * Float64(Float64(2.0 / Om) + Float64(Float64(Float64(U - U_42_) / Om) * Float64(n / Om)))))))); elseif (t_3 <= 2e-322) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t_2))); elseif (t_3 <= Inf) tmp = sqrt(sqrt(Float64(t_4 * t_2))) ^ 2.0; else tmp = Float64(exp(Float64(0.25 * Float64(log(Float64(U * Float64(n * Float64(Float64(2.0 * Float64(-1.0 / Om)) + Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)))))) + Float64(-2.0 * log(Float64(1.0 / l)))))) * sqrt(sqrt(2.0))) ^ 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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-114], N[Sqrt[N[(t$95$4 * N[(t - N[(l * N[(l * N[(N[(2.0 / Om), $MachinePrecision] + N[(N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 2e-322], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Power[N[Sqrt[N[Sqrt[N[(t$95$4 * t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(N[Exp[N[(0.25 * N[(N[Log[N[(U * N[(n * N[(N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(-2.0 * N[Log[N[(1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Sqrt[2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, t_1 \cdot \left(U - U*\right)\right)\\
t_3 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)\\
t_4 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-114}:\\
\;\;\;\;\sqrt{t_4 \cdot \left(t - \ell \cdot \left(\ell \cdot \left(\frac{2}{Om} + \frac{U - U*}{Om} \cdot \frac{n}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-322}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t_2}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;{\left(\sqrt{\sqrt{t_4 \cdot t_2}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{0.25 \cdot \left(\log \left(U \cdot \left(n \cdot \left(2 \cdot \frac{-1}{Om} + \frac{n \cdot \left(U* - U\right)}{{Om}^{2}}\right)\right)\right) + -2 \cdot \log \left(\frac{1}{\ell}\right)\right)} \cdot \sqrt{\sqrt{2}}\right)}^{2}\\
\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*)))) < -1.0000000000000001e-114Initial program 0.0%
Simplified20.0%
Taylor expanded in l around 0 20.9%
unpow220.9%
associate-*r/20.9%
metadata-eval20.9%
*-commutative20.9%
unpow220.9%
times-frac79.7%
Simplified79.7%
Taylor expanded in l around 0 20.9%
+-commutative20.9%
*-commutative20.9%
unpow220.9%
times-frac79.7%
unpow279.7%
+-commutative79.7%
associate-*r/79.7%
metadata-eval79.7%
associate-*r*99.7%
Simplified99.7%
if -1.0000000000000001e-114 < (*.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*)))) < 1.97626e-322Initial program 10.4%
Simplified10.4%
pow1/210.4%
fma-udef10.4%
associate-*l/10.4%
associate-*r*10.4%
*-commutative10.4%
associate--l-10.4%
associate-*r*10.4%
associate-*l*39.7%
Applied egg-rr39.8%
*-commutative39.8%
unpow1/239.8%
Simplified39.8%
if 1.97626e-322 < (*.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 73.5%
Simplified70.2%
Applied egg-rr75.4%
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%
Simplified3.4%
Applied egg-rr0.2%
Taylor expanded in l around inf 41.8%
Final simplification68.1%
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)))
(t_2 (* t_1 (- U* U)))
(t_3 (* (* 2.0 n) U))
(t_4 (* t_3 (+ (- t (* 2.0 (/ (* l l) Om))) t_2))))
(if (<= t_4 -1e-114)
(sqrt
(*
(* 2.0 (* n U))
(- t (* l (* l (+ (/ 2.0 Om) (* (/ (- U U*) Om) (/ n Om))))))))
(if (<= t_4 2e-322)
(*
(sqrt (* 2.0 n))
(sqrt (* U (- t (fma 2.0 (* l (/ l Om)) (* t_1 (- U U*)))))))
(if (<= t_4 2e+302)
(sqrt (* t_3 (+ (+ t (* 2.0 (/ -1.0 (/ Om (* l l))))) t_2)))
(pow
(*
(sqrt (sqrt 2.0))
(pow
(exp 0.25)
(-
(log (* (* n U) (- (/ (- 2.0) Om) (/ n (/ (* Om Om) (- U U*))))))
(* -2.0 (log l)))))
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);
double t_2 = t_1 * (U_42_ - U);
double t_3 = (2.0 * n) * U;
double t_4 = t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2);
double tmp;
if (t_4 <= -1e-114) {
tmp = sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) + (((U - U_42_) / Om) * (n / Om))))))));
} else if (t_4 <= 2e-322) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (l * (l / Om)), (t_1 * (U - U_42_))))));
} else if (t_4 <= 2e+302) {
tmp = sqrt((t_3 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_2)));
} else {
tmp = pow((sqrt(sqrt(2.0)) * pow(exp(0.25), (log(((n * U) * ((-2.0 / Om) - (n / ((Om * Om) / (U - U_42_)))))) - (-2.0 * log(l))))), 2.0);
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(t_1 * Float64(U_42_ - U)) t_3 = Float64(Float64(2.0 * n) * U) t_4 = Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2)) tmp = 0.0 if (t_4 <= -1e-114) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(l * Float64(Float64(2.0 / Om) + Float64(Float64(Float64(U - U_42_) / Om) * Float64(n / Om)))))))); elseif (t_4 <= 2e-322) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(t_1 * Float64(U - U_42_))))))); elseif (t_4 <= 2e+302) tmp = sqrt(Float64(t_3 * Float64(Float64(t + Float64(2.0 * Float64(-1.0 / Float64(Om / Float64(l * l))))) + t_2))); else tmp = Float64(sqrt(sqrt(2.0)) * (exp(0.25) ^ Float64(log(Float64(Float64(n * U) * Float64(Float64(Float64(-2.0) / Om) - Float64(n / Float64(Float64(Om * Om) / Float64(U - U_42_)))))) - Float64(-2.0 * log(l))))) ^ 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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -1e-114], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(l * N[(N[(2.0 / Om), $MachinePrecision] + N[(N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 2e-322], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+302], N[Sqrt[N[(t$95$3 * N[(N[(t + N[(2.0 * N[(-1.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[Sqrt[N[Sqrt[2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Exp[0.25], $MachinePrecision], N[(N[Log[N[(N[(n * U), $MachinePrecision] * N[(N[((-2.0) / Om), $MachinePrecision] - N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := t_1 \cdot \left(U* - U\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := t_3 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2\right)\\
\mathbf{if}\;t_4 \leq -1 \cdot 10^{-114}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \left(\frac{2}{Om} + \frac{U - U*}{Om} \cdot \frac{n}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{-322}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, t_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+302}:\\
\;\;\;\;\sqrt{t_3 \cdot \left(\left(t + 2 \cdot \frac{-1}{\frac{Om}{\ell \cdot \ell}}\right) + t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{\sqrt{2}} \cdot {\left(e^{0.25}\right)}^{\left(\log \left(\left(n \cdot U\right) \cdot \left(\frac{-2}{Om} - \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right) - -2 \cdot \log \ell\right)}\right)}^{2}\\
\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*)))) < -1.0000000000000001e-114Initial program 0.0%
Simplified20.0%
Taylor expanded in l around 0 20.9%
unpow220.9%
associate-*r/20.9%
metadata-eval20.9%
*-commutative20.9%
unpow220.9%
times-frac79.7%
Simplified79.7%
Taylor expanded in l around 0 20.9%
+-commutative20.9%
*-commutative20.9%
unpow220.9%
times-frac79.7%
unpow279.7%
+-commutative79.7%
associate-*r/79.7%
metadata-eval79.7%
associate-*r*99.7%
Simplified99.7%
if -1.0000000000000001e-114 < (*.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*)))) < 1.97626e-322Initial program 10.4%
Simplified10.4%
pow1/210.4%
fma-udef10.4%
associate-*l/10.4%
associate-*r*10.4%
*-commutative10.4%
associate--l-10.4%
associate-*r*10.4%
associate-*l*39.7%
Applied egg-rr39.8%
*-commutative39.8%
unpow1/239.8%
Simplified39.8%
if 1.97626e-322 < (*.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*)))) < 2.0000000000000002e302Initial program 95.7%
clear-num95.7%
inv-pow95.7%
Applied egg-rr95.7%
unpow-195.7%
Simplified95.7%
if 2.0000000000000002e302 < (*.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 29.3%
Simplified31.0%
Applied egg-rr33.1%
Taylor expanded in l around inf 26.9%
*-commutative26.9%
exp-prod26.6%
Simplified28.1%
Final simplification60.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 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1)))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= t_3 2e+151)
(sqrt (* t_2 (+ (+ t (* 2.0 (/ -1.0 (/ Om (* l l))))) t_1)))
(sqrt
(*
(* 2.0 (* n U))
(- t (* l (* l (+ (/ 2.0 Om) (* (/ (- U U*) Om) (/ n 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 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (t_3 <= 2e+151) {
tmp = sqrt((t_2 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_1)));
} else {
tmp = sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) + (((U - U_42_) / Om) * (n / Om))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (n * ((l / om) ** 2.0d0)) * (u_42 - u)
t_2 = (2.0d0 * n) * u
t_3 = sqrt((t_2 * ((t - (2.0d0 * ((l * l) / om))) + t_1)))
if (t_3 <= 0.0d0) then
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
else if (t_3 <= 2d+151) then
tmp = sqrt((t_2 * ((t + (2.0d0 * ((-1.0d0) / (om / (l * l))))) + t_1)))
else
tmp = sqrt(((2.0d0 * (n * u)) * (t - (l * (l * ((2.0d0 / om) + (((u - u_42) / om) * (n / om))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (t_3 <= 2e+151) {
tmp = Math.sqrt((t_2 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_1)));
} else {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) + (((U - U_42_) / Om) * (n / 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 = math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif t_3 <= 2e+151: tmp = math.sqrt((t_2 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_1))) else: tmp = math.sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) + (((U - U_42_) / Om) * (n / 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 = sqrt(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(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (t_3 <= 2e+151) tmp = sqrt(Float64(t_2 * Float64(Float64(t + Float64(2.0 * Float64(-1.0 / Float64(Om / Float64(l * l))))) + t_1))); else tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(l * Float64(Float64(2.0 / Om) + Float64(Float64(Float64(U - U_42_) / Om) * Float64(n / 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 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (t_3 <= 2e+151) tmp = sqrt((t_2 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_1))); else tmp = sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) + (((U - U_42_) / Om) * (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[(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[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+151], N[Sqrt[N[(t$95$2 * N[(N[(t + N[(2.0 * N[(-1.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(l * N[(N[(2.0 / Om), $MachinePrecision] + N[(N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $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 := \sqrt{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 U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t + 2 \cdot \frac{-1}{\frac{Om}{\ell \cdot \ell}}\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \left(\frac{2}{Om} + \frac{U - U*}{Om} \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 9.7%
Simplified9.7%
Taylor expanded in t around inf 32.4%
associate-*r*32.4%
Simplified32.4%
sqrt-prod34.9%
Applied egg-rr34.9%
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*))))) < 2.00000000000000003e151Initial program 95.1%
clear-num95.1%
inv-pow95.1%
Applied egg-rr95.1%
unpow-195.1%
Simplified95.1%
if 2.00000000000000003e151 < (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 28.0%
Simplified30.5%
Taylor expanded in l around 0 34.2%
unpow234.2%
associate-*r/34.2%
metadata-eval34.2%
*-commutative34.2%
unpow234.2%
times-frac39.7%
Simplified39.7%
Taylor expanded in l around 0 34.2%
+-commutative34.2%
*-commutative34.2%
unpow234.2%
times-frac39.7%
unpow239.7%
+-commutative39.7%
associate-*r/39.7%
metadata-eval39.7%
associate-*r*46.1%
Simplified46.1%
Final simplification67.1%
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 U)) (sqrt (* n t)))
(if (<= t_1 2e+151)
t_1
(sqrt
(*
(* 2.0 (* n U))
(- t (* l (* l (- (/ 2.0 Om) (* (/ n Om) (/ (- U* U) Om))))))))))))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 * U)) * sqrt((n * t));
} else if (t_1 <= 2e+151) {
tmp = t_1;
} else {
tmp = sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) - ((n / Om) * ((U_42_ - 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 = sqrt((((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)) * sqrt((n * t))
else if (t_1 <= 2d+151) then
tmp = t_1
else
tmp = sqrt(((2.0d0 * (n * u)) * (t - (l * (l * ((2.0d0 / om) - ((n / om) * ((u_42 - 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 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (t_1 <= 2e+151) {
tmp = t_1;
} else {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif t_1 <= 2e+151: tmp = t_1 else: tmp = math.sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om)))))))) 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 * U)) * sqrt(Float64(n * t))); elseif (t_1 <= 2e+151) tmp = t_1; else tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(l * Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (t_1 <= 2e+151) tmp = t_1; else tmp = sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) - ((n / Om) * ((U_42_ - 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[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 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+151], t$95$1, N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(l * N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U* - U}{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 9.7%
Simplified9.7%
Taylor expanded in t around inf 32.4%
associate-*r*32.4%
Simplified32.4%
sqrt-prod34.9%
Applied egg-rr34.9%
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*))))) < 2.00000000000000003e151Initial program 95.1%
if 2.00000000000000003e151 < (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 28.0%
Simplified30.5%
Taylor expanded in l around 0 34.2%
unpow234.2%
associate-*r/34.2%
metadata-eval34.2%
*-commutative34.2%
unpow234.2%
times-frac39.7%
Simplified39.7%
Taylor expanded in l around 0 34.2%
+-commutative34.2%
*-commutative34.2%
unpow234.2%
times-frac39.7%
unpow239.7%
+-commutative39.7%
associate-*r/39.7%
metadata-eval39.7%
associate-*r*46.1%
Simplified46.1%
Final simplification67.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -1.3e-307)
(sqrt
(*
(* 2.0 (* n U))
(- t (* l (* l (- (/ 2.0 Om) (* (/ n Om) (/ (- U* U) Om))))))))
(*
(sqrt (* 2.0 n))
(sqrt
(*
U
(- t (fma 2.0 (* l (/ l Om)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -1.3e-307) {
tmp = sqrt(((2.0 * (n * U)) * (t - (l * (l * ((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))))))));
} else {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (l * (l / Om)), ((n * pow((l / Om), 2.0)) * (U - U_42_))))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -1.3e-307) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(l * Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)))))))); else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))))); end return tmp end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -1.3e-307], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(l * N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.3 \cdot 10^{-307}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U* - U}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\\
\end{array}
\end{array}
if n < -1.29999999999999998e-307Initial program 61.6%
Simplified58.9%
Taylor expanded in l around 0 56.8%
unpow256.8%
associate-*r/56.8%
metadata-eval56.8%
*-commutative56.8%
unpow256.8%
times-frac62.1%
Simplified62.1%
Taylor expanded in l around 0 56.8%
+-commutative56.8%
*-commutative56.8%
unpow256.8%
times-frac62.1%
unpow262.1%
+-commutative62.1%
associate-*r/62.1%
metadata-eval62.1%
associate-*r*65.2%
Simplified65.2%
if -1.29999999999999998e-307 < n Initial program 50.6%
Simplified50.0%
pow1/250.9%
fma-udef50.9%
associate-*l/48.1%
associate-*r*50.6%
*-commutative50.6%
associate--l-50.6%
associate-*r*50.6%
associate-*l*56.3%
Applied egg-rr67.2%
*-commutative67.2%
unpow1/267.2%
Simplified67.2%
Final simplification66.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U))))
(if (<= l 2e-53)
(sqrt
(*
t_1
(+
(+ t (* (/ (* l l) Om) -2.0))
(* n (* (pow (/ l Om) 2.0) (- U* U))))))
(sqrt
(* t_1 (- t (* l (* l (- (/ 2.0 Om) (* (/ n Om) (/ (- U* U) Om)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (l <= 2e-53) {
tmp = sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (pow((l / Om), 2.0) * (U_42_ - U))))));
} else {
tmp = sqrt((t_1 * (t - (l * (l * ((2.0 / Om) - ((n / Om) * ((U_42_ - 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 = 2.0d0 * (n * u)
if (l <= 2d-53) then
tmp = sqrt((t_1 * ((t + (((l * l) / om) * (-2.0d0))) + (n * (((l / om) ** 2.0d0) * (u_42 - u))))))
else
tmp = sqrt((t_1 * (t - (l * (l * ((2.0d0 / om) - ((n / om) * ((u_42 - 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 = 2.0 * (n * U);
double tmp;
if (l <= 2e-53) {
tmp = Math.sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U))))));
} else {
tmp = Math.sqrt((t_1 * (t - (l * (l * ((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) tmp = 0 if l <= 2e-53: tmp = math.sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U)))))) else: tmp = math.sqrt((t_1 * (t - (l * (l * ((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if (l <= 2e-53) tmp = sqrt(Float64(t_1 * Float64(Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)))))); else tmp = sqrt(Float64(t_1 * Float64(t - Float64(l * Float64(l * Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * U); tmp = 0.0; if (l <= 2e-53) tmp = sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (((l / Om) ^ 2.0) * (U_42_ - U)))))); else tmp = sqrt((t_1 * (t - (l * (l * ((2.0 / Om) - ((n / Om) * ((U_42_ - 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[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 2e-53], N[Sqrt[N[(t$95$1 * N[(N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$1 * N[(t - N[(l * N[(l * N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;\ell \leq 2 \cdot 10^{-53}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t - \ell \cdot \left(\ell \cdot \left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U* - U}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 2.00000000000000006e-53Initial program 61.3%
Simplified60.6%
if 2.00000000000000006e-53 < l Initial program 43.3%
Simplified46.9%
Taylor expanded in l around 0 54.2%
unpow254.2%
associate-*r/54.2%
metadata-eval54.2%
*-commutative54.2%
unpow254.2%
times-frac57.4%
Simplified57.4%
Taylor expanded in l around 0 54.2%
+-commutative54.2%
*-commutative54.2%
unpow254.2%
times-frac57.4%
unpow257.4%
+-commutative57.4%
associate-*r/57.4%
metadata-eval57.4%
associate-*r*62.3%
Simplified62.3%
Final simplification61.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 (/ (- U* U) Om)))
(if (<= l 2.4e-165)
(sqrt (* (* 2.0 U) (* n t)))
(if (<= l 1.2e-52)
(sqrt (* t_1 (+ t (* (* (* l l) (/ n Om)) t_2))))
(sqrt (* t_1 (- t (* l (* l (- (/ 2.0 Om) (* (/ n Om) t_2)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double t_2 = (U_42_ - U) / Om;
double tmp;
if (l <= 2.4e-165) {
tmp = sqrt(((2.0 * U) * (n * t)));
} else if (l <= 1.2e-52) {
tmp = sqrt((t_1 * (t + (((l * l) * (n / Om)) * t_2))));
} else {
tmp = sqrt((t_1 * (t - (l * (l * ((2.0 / Om) - ((n / Om) * t_2)))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
t_2 = (u_42 - u) / om
if (l <= 2.4d-165) then
tmp = sqrt(((2.0d0 * u) * (n * t)))
else if (l <= 1.2d-52) then
tmp = sqrt((t_1 * (t + (((l * l) * (n / om)) * t_2))))
else
tmp = sqrt((t_1 * (t - (l * (l * ((2.0d0 / om) - ((n / om) * t_2)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double t_2 = (U_42_ - U) / Om;
double tmp;
if (l <= 2.4e-165) {
tmp = Math.sqrt(((2.0 * U) * (n * t)));
} else if (l <= 1.2e-52) {
tmp = Math.sqrt((t_1 * (t + (((l * l) * (n / Om)) * t_2))));
} else {
tmp = Math.sqrt((t_1 * (t - (l * (l * ((2.0 / Om) - ((n / Om) * t_2)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) t_2 = (U_42_ - U) / Om tmp = 0 if l <= 2.4e-165: tmp = math.sqrt(((2.0 * U) * (n * t))) elif l <= 1.2e-52: tmp = math.sqrt((t_1 * (t + (((l * l) * (n / Om)) * t_2)))) else: tmp = math.sqrt((t_1 * (t - (l * (l * ((2.0 / Om) - ((n / Om) * t_2))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) t_2 = Float64(Float64(U_42_ - U) / Om) tmp = 0.0 if (l <= 2.4e-165) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * t))); elseif (l <= 1.2e-52) tmp = sqrt(Float64(t_1 * Float64(t + Float64(Float64(Float64(l * l) * Float64(n / Om)) * t_2)))); else tmp = sqrt(Float64(t_1 * Float64(t - Float64(l * Float64(l * Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * t_2))))))); 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 = (U_42_ - U) / Om; tmp = 0.0; if (l <= 2.4e-165) tmp = sqrt(((2.0 * U) * (n * t))); elseif (l <= 1.2e-52) tmp = sqrt((t_1 * (t + (((l * l) * (n / Om)) * t_2)))); else tmp = sqrt((t_1 * (t - (l * (l * ((2.0 / Om) - ((n / Om) * t_2))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]}, If[LessEqual[l, 2.4e-165], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.2e-52], N[Sqrt[N[(t$95$1 * N[(t + N[(N[(N[(l * l), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$1 * N[(t - N[(l * N[(l * N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
t_2 := \frac{U* - U}{Om}\\
\mathbf{if}\;\ell \leq 2.4 \cdot 10^{-165}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}\\
\mathbf{elif}\;\ell \leq 1.2 \cdot 10^{-52}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \left(\left(\ell \cdot \ell\right) \cdot \frac{n}{Om}\right) \cdot t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t - \ell \cdot \left(\ell \cdot \left(\frac{2}{Om} - \frac{n}{Om} \cdot t_2\right)\right)\right)}\\
\end{array}
\end{array}
if l < 2.4000000000000002e-165Initial program 60.0%
Simplified55.5%
Taylor expanded in t around inf 42.6%
associate-*r*42.6%
Simplified42.6%
if 2.4000000000000002e-165 < l < 1.2000000000000001e-52Initial program 67.5%
Simplified67.5%
Taylor expanded in l around 0 67.1%
unpow267.1%
associate-*r/67.1%
metadata-eval67.1%
*-commutative67.1%
unpow267.1%
times-frac73.1%
Simplified73.1%
Taylor expanded in Om around 0 67.1%
associate-*r/67.1%
*-commutative67.1%
unpow267.1%
times-frac73.1%
*-commutative73.1%
associate-*l*73.2%
unpow273.2%
Simplified73.2%
if 1.2000000000000001e-52 < l Initial program 43.3%
Simplified46.9%
Taylor expanded in l around 0 54.2%
unpow254.2%
associate-*r/54.2%
metadata-eval54.2%
*-commutative54.2%
unpow254.2%
times-frac57.4%
Simplified57.4%
Taylor expanded in l around 0 54.2%
+-commutative54.2%
*-commutative54.2%
unpow254.2%
times-frac57.4%
unpow257.4%
+-commutative57.4%
associate-*r/57.4%
metadata-eval57.4%
associate-*r*62.3%
Simplified62.3%
Final simplification51.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (or (<= n -2e+19) (not (<= n 3.3e+102))) (sqrt (* (* 2.0 (* n U)) (+ t (* l (/ U* (/ (* Om Om) (* n l))))))) (sqrt (* (* 2.0 U) (* n (+ t (* l (* (/ l Om) -2.0))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -2e+19) || !(n <= 3.3e+102)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (l * (U_42_ / ((Om * Om) / (n * l)))))));
} else {
tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((n <= (-2d+19)) .or. (.not. (n <= 3.3d+102))) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (l * (u_42 / ((om * om) / (n * l)))))))
else
tmp = sqrt(((2.0d0 * u) * (n * (t + (l * ((l / om) * (-2.0d0)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -2e+19) || !(n <= 3.3e+102)) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (l * (U_42_ / ((Om * Om) / (n * l)))))));
} else {
tmp = Math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (n <= -2e+19) or not (n <= 3.3e+102): tmp = math.sqrt(((2.0 * (n * U)) * (t + (l * (U_42_ / ((Om * Om) / (n * l))))))) else: tmp = math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((n <= -2e+19) || !(n <= 3.3e+102)) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(l * Float64(U_42_ / Float64(Float64(Om * Om) / Float64(n * l))))))); else tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(l * Float64(Float64(l / Om) * -2.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((n <= -2e+19) || ~((n <= 3.3e+102))) tmp = sqrt(((2.0 * (n * U)) * (t + (l * (U_42_ / ((Om * Om) / (n * l))))))); else tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[n, -2e+19], N[Not[LessEqual[n, 3.3e+102]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(l * N[(U$42$ / N[(N[(Om * Om), $MachinePrecision] / N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -2 \cdot 10^{+19} \lor \neg \left(n \leq 3.3 \cdot 10^{+102}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \ell \cdot \frac{U*}{\frac{Om \cdot Om}{n \cdot \ell}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if n < -2e19 or 3.29999999999999999e102 < n Initial program 59.9%
Simplified50.9%
Taylor expanded in l around 0 55.4%
unpow255.4%
associate-*r/55.4%
metadata-eval55.4%
*-commutative55.4%
unpow255.4%
times-frac64.2%
Simplified64.2%
Taylor expanded in l around 0 55.4%
+-commutative55.4%
*-commutative55.4%
unpow255.4%
times-frac64.2%
unpow264.2%
+-commutative64.2%
associate-*r/64.2%
metadata-eval64.2%
associate-*r*66.3%
Simplified66.3%
Taylor expanded in U* around inf 64.9%
mul-1-neg64.9%
associate-/l*65.9%
unpow265.9%
Simplified65.9%
if -2e19 < n < 3.29999999999999999e102Initial program 54.0%
Simplified57.5%
Taylor expanded in n around 0 51.2%
associate-*r*51.2%
cancel-sign-sub-inv51.2%
metadata-eval51.2%
+-commutative51.2%
unpow251.2%
associate-*r/56.4%
*-commutative56.4%
associate-*l*56.4%
fma-def56.4%
Simplified56.4%
fma-udef56.4%
Applied egg-rr56.4%
Final simplification60.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om -2.8e-179)
(sqrt (* (* 2.0 (* n U)) (- t (* l (* 2.0 (/ l Om))))))
(if (<= Om 2.2e-202)
(sqrt (/ (* U -2.0) (* (/ Om (* l l)) (/ Om (* (- U U*) (* n n))))))
(sqrt (* (* 2.0 U) (* n (+ t (* l (* (/ l Om) -2.0)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -2.8e-179) {
tmp = sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om))))));
} else if (Om <= 2.2e-202) {
tmp = sqrt(((U * -2.0) / ((Om / (l * l)) * (Om / ((U - U_42_) * (n * n))))));
} else {
tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (om <= (-2.8d-179)) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (l * (2.0d0 * (l / om))))))
else if (om <= 2.2d-202) then
tmp = sqrt(((u * (-2.0d0)) / ((om / (l * l)) * (om / ((u - u_42) * (n * n))))))
else
tmp = sqrt(((2.0d0 * u) * (n * (t + (l * ((l / om) * (-2.0d0)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -2.8e-179) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om))))));
} else if (Om <= 2.2e-202) {
tmp = Math.sqrt(((U * -2.0) / ((Om / (l * l)) * (Om / ((U - U_42_) * (n * n))))));
} else {
tmp = Math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -2.8e-179: tmp = math.sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om)))))) elif Om <= 2.2e-202: tmp = math.sqrt(((U * -2.0) / ((Om / (l * l)) * (Om / ((U - U_42_) * (n * n)))))) else: tmp = math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -2.8e-179) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))))); elseif (Om <= 2.2e-202) tmp = sqrt(Float64(Float64(U * -2.0) / Float64(Float64(Om / Float64(l * l)) * Float64(Om / Float64(Float64(U - U_42_) * Float64(n * n)))))); else tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(l * Float64(Float64(l / Om) * -2.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -2.8e-179) tmp = sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om)))))); elseif (Om <= 2.2e-202) tmp = sqrt(((U * -2.0) / ((Om / (l * l)) * (Om / ((U - U_42_) * (n * n)))))); else tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -2.8e-179], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 2.2e-202], N[Sqrt[N[(N[(U * -2.0), $MachinePrecision] / N[(N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(Om / N[(N[(U - U$42$), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -2.8 \cdot 10^{-179}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}\\
\mathbf{elif}\;Om \leq 2.2 \cdot 10^{-202}:\\
\;\;\;\;\sqrt{\frac{U \cdot -2}{\frac{Om}{\ell \cdot \ell} \cdot \frac{Om}{\left(U - U*\right) \cdot \left(n \cdot n\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if Om < -2.8000000000000001e-179Initial program 55.8%
Simplified54.7%
Taylor expanded in l around 0 51.0%
unpow251.0%
associate-*r/51.0%
metadata-eval51.0%
*-commutative51.0%
unpow251.0%
times-frac56.7%
Simplified56.7%
Taylor expanded in l around 0 51.0%
+-commutative51.0%
*-commutative51.0%
unpow251.0%
times-frac56.7%
unpow256.7%
+-commutative56.7%
associate-*r/56.7%
metadata-eval56.7%
associate-*r*60.8%
Simplified60.8%
Taylor expanded in Om around inf 50.2%
if -2.8000000000000001e-179 < Om < 2.20000000000000008e-202Initial program 42.5%
Simplified42.5%
Taylor expanded in n around inf 48.3%
associate-/l*48.4%
associate-*r/48.4%
unpow248.4%
times-frac56.7%
unpow256.7%
*-commutative56.7%
unpow256.7%
Simplified56.7%
if 2.20000000000000008e-202 < Om Initial program 61.9%
Simplified59.0%
Taylor expanded in n around 0 58.7%
associate-*r*58.7%
cancel-sign-sub-inv58.7%
metadata-eval58.7%
+-commutative58.7%
unpow258.7%
associate-*r/62.3%
*-commutative62.3%
associate-*l*62.3%
fma-def62.3%
Simplified62.3%
fma-udef62.3%
Applied egg-rr62.3%
Final simplification56.4%
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))))
(if (<= n -1.8e+19)
(sqrt (* t_1 (+ t (* (* (* l l) (/ n Om)) (/ (- U* U) Om)))))
(if (<= n 3.3e+102)
(sqrt (* (* 2.0 U) (* n (+ t (* l (* (/ l Om) -2.0))))))
(sqrt (* t_1 (+ t (* l (/ U* (/ (* Om Om) (* n l)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (n <= -1.8e+19) {
tmp = sqrt((t_1 * (t + (((l * l) * (n / Om)) * ((U_42_ - U) / Om)))));
} else if (n <= 3.3e+102) {
tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
} else {
tmp = sqrt((t_1 * (t + (l * (U_42_ / ((Om * Om) / (n * l)))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
if (n <= (-1.8d+19)) then
tmp = sqrt((t_1 * (t + (((l * l) * (n / om)) * ((u_42 - u) / om)))))
else if (n <= 3.3d+102) then
tmp = sqrt(((2.0d0 * u) * (n * (t + (l * ((l / om) * (-2.0d0)))))))
else
tmp = sqrt((t_1 * (t + (l * (u_42 / ((om * om) / (n * l)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (n <= -1.8e+19) {
tmp = Math.sqrt((t_1 * (t + (((l * l) * (n / Om)) * ((U_42_ - U) / Om)))));
} else if (n <= 3.3e+102) {
tmp = Math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
} else {
tmp = Math.sqrt((t_1 * (t + (l * (U_42_ / ((Om * Om) / (n * l)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) tmp = 0 if n <= -1.8e+19: tmp = math.sqrt((t_1 * (t + (((l * l) * (n / Om)) * ((U_42_ - U) / Om))))) elif n <= 3.3e+102: tmp = math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))) else: tmp = math.sqrt((t_1 * (t + (l * (U_42_ / ((Om * Om) / (n * l))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if (n <= -1.8e+19) tmp = sqrt(Float64(t_1 * Float64(t + Float64(Float64(Float64(l * l) * Float64(n / Om)) * Float64(Float64(U_42_ - U) / Om))))); elseif (n <= 3.3e+102) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(l * Float64(Float64(l / Om) * -2.0)))))); else tmp = sqrt(Float64(t_1 * Float64(t + Float64(l * Float64(U_42_ / Float64(Float64(Om * Om) / Float64(n * l))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * U); tmp = 0.0; if (n <= -1.8e+19) tmp = sqrt((t_1 * (t + (((l * l) * (n / Om)) * ((U_42_ - U) / Om))))); elseif (n <= 3.3e+102) tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))); else tmp = sqrt((t_1 * (t + (l * (U_42_ / ((Om * Om) / (n * l))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[n, -1.8e+19], N[Sqrt[N[(t$95$1 * N[(t + N[(N[(N[(l * l), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 3.3e+102], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$1 * N[(t + N[(l * N[(U$42$ / N[(N[(Om * Om), $MachinePrecision] / N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;n \leq -1.8 \cdot 10^{+19}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \left(\left(\ell \cdot \ell\right) \cdot \frac{n}{Om}\right) \cdot \frac{U* - U}{Om}\right)}\\
\mathbf{elif}\;n \leq 3.3 \cdot 10^{+102}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \ell \cdot \frac{U*}{\frac{Om \cdot Om}{n \cdot \ell}}\right)}\\
\end{array}
\end{array}
if n < -1.8e19Initial program 61.9%
Simplified54.0%
Taylor expanded in l around 0 56.7%
unpow256.7%
associate-*r/56.7%
metadata-eval56.7%
*-commutative56.7%
unpow256.7%
times-frac65.3%
Simplified65.3%
Taylor expanded in Om around 0 53.8%
associate-*r/55.1%
*-commutative55.1%
unpow255.1%
times-frac63.8%
*-commutative63.8%
associate-*l*67.0%
unpow267.0%
Simplified67.0%
if -1.8e19 < n < 3.29999999999999999e102Initial program 54.0%
Simplified57.5%
Taylor expanded in n around 0 51.2%
associate-*r*51.2%
cancel-sign-sub-inv51.2%
metadata-eval51.2%
+-commutative51.2%
unpow251.2%
associate-*r/56.4%
*-commutative56.4%
associate-*l*56.4%
fma-def56.4%
Simplified56.4%
fma-udef56.4%
Applied egg-rr56.4%
if 3.29999999999999999e102 < n Initial program 55.9%
Simplified44.4%
Taylor expanded in l around 0 52.7%
unpow252.7%
associate-*r/52.7%
metadata-eval52.7%
*-commutative52.7%
unpow252.7%
times-frac61.9%
Simplified61.9%
Taylor expanded in l around 0 52.7%
+-commutative52.7%
*-commutative52.7%
unpow252.7%
times-frac61.9%
unpow261.9%
+-commutative61.9%
associate-*r/61.9%
metadata-eval61.9%
associate-*r*62.2%
Simplified62.2%
Taylor expanded in U* around inf 69.8%
mul-1-neg69.8%
associate-/l*70.0%
unpow270.0%
Simplified70.0%
Final simplification61.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om -3e-199)
(sqrt (* (* 2.0 (* n U)) (- t (* l (* 2.0 (/ l Om))))))
(if (<= Om 6e-202)
(sqrt (/ (* U -2.0) (* (/ Om (* l l)) (/ Om (- (* U* (* n n)))))))
(sqrt (* (* 2.0 U) (* n (+ t (* l (* (/ l Om) -2.0)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -3e-199) {
tmp = sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om))))));
} else if (Om <= 6e-202) {
tmp = sqrt(((U * -2.0) / ((Om / (l * l)) * (Om / -(U_42_ * (n * n))))));
} else {
tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (om <= (-3d-199)) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (l * (2.0d0 * (l / om))))))
else if (om <= 6d-202) then
tmp = sqrt(((u * (-2.0d0)) / ((om / (l * l)) * (om / -(u_42 * (n * n))))))
else
tmp = sqrt(((2.0d0 * u) * (n * (t + (l * ((l / om) * (-2.0d0)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -3e-199) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om))))));
} else if (Om <= 6e-202) {
tmp = Math.sqrt(((U * -2.0) / ((Om / (l * l)) * (Om / -(U_42_ * (n * n))))));
} else {
tmp = Math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -3e-199: tmp = math.sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om)))))) elif Om <= 6e-202: tmp = math.sqrt(((U * -2.0) / ((Om / (l * l)) * (Om / -(U_42_ * (n * n)))))) else: tmp = math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -3e-199) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))))); elseif (Om <= 6e-202) tmp = sqrt(Float64(Float64(U * -2.0) / Float64(Float64(Om / Float64(l * l)) * Float64(Om / Float64(-Float64(U_42_ * Float64(n * n))))))); else tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(l * Float64(Float64(l / Om) * -2.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -3e-199) tmp = sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om)))))); elseif (Om <= 6e-202) tmp = sqrt(((U * -2.0) / ((Om / (l * l)) * (Om / -(U_42_ * (n * n)))))); else tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -3e-199], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 6e-202], N[Sqrt[N[(N[(U * -2.0), $MachinePrecision] / N[(N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(Om / (-N[(U$42$ * N[(n * n), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -3 \cdot 10^{-199}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}\\
\mathbf{elif}\;Om \leq 6 \cdot 10^{-202}:\\
\;\;\;\;\sqrt{\frac{U \cdot -2}{\frac{Om}{\ell \cdot \ell} \cdot \frac{Om}{-U* \cdot \left(n \cdot n\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if Om < -2.99999999999999983e-199Initial program 55.8%
Simplified54.7%
Taylor expanded in l around 0 49.6%
unpow249.6%
associate-*r/49.6%
metadata-eval49.6%
*-commutative49.6%
unpow249.6%
times-frac57.0%
Simplified57.0%
Taylor expanded in l around 0 49.6%
+-commutative49.6%
*-commutative49.6%
unpow249.6%
times-frac57.0%
unpow257.0%
+-commutative57.0%
associate-*r/57.0%
metadata-eval57.0%
associate-*r*60.9%
Simplified60.9%
Taylor expanded in Om around inf 49.7%
if -2.99999999999999983e-199 < Om < 6.00000000000000022e-202Initial program 41.3%
Simplified41.3%
Taylor expanded in n around inf 52.5%
associate-/l*52.6%
associate-*r/52.6%
unpow252.6%
times-frac58.6%
unpow258.6%
*-commutative58.6%
unpow258.6%
Simplified58.6%
Taylor expanded in U around 0 58.6%
mul-1-neg58.6%
*-commutative58.6%
distribute-rgt-neg-in58.6%
unpow258.6%
Simplified58.6%
if 6.00000000000000022e-202 < Om Initial program 61.9%
Simplified59.0%
Taylor expanded in n around 0 58.7%
associate-*r*58.7%
cancel-sign-sub-inv58.7%
metadata-eval58.7%
+-commutative58.7%
unpow258.7%
associate-*r/62.3%
*-commutative62.3%
associate-*l*62.3%
fma-def62.3%
Simplified62.3%
fma-udef62.3%
Applied egg-rr62.3%
Final simplification56.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om -2.5e-199)
(sqrt (* (* 2.0 (* n U)) (- t (* l (* 2.0 (/ l Om))))))
(if (<= Om 7.5e-204)
(sqrt (* 2.0 (* (/ U Om) (/ (* U* (* (* l l) (* n n))) Om))))
(sqrt (* (* 2.0 U) (* n (+ t (* l (* (/ l Om) -2.0)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -2.5e-199) {
tmp = sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om))))));
} else if (Om <= 7.5e-204) {
tmp = sqrt((2.0 * ((U / Om) * ((U_42_ * ((l * l) * (n * n))) / Om))));
} else {
tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (om <= (-2.5d-199)) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (l * (2.0d0 * (l / om))))))
else if (om <= 7.5d-204) then
tmp = sqrt((2.0d0 * ((u / om) * ((u_42 * ((l * l) * (n * n))) / om))))
else
tmp = sqrt(((2.0d0 * u) * (n * (t + (l * ((l / om) * (-2.0d0)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -2.5e-199) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om))))));
} else if (Om <= 7.5e-204) {
tmp = Math.sqrt((2.0 * ((U / Om) * ((U_42_ * ((l * l) * (n * n))) / Om))));
} else {
tmp = Math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -2.5e-199: tmp = math.sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om)))))) elif Om <= 7.5e-204: tmp = math.sqrt((2.0 * ((U / Om) * ((U_42_ * ((l * l) * (n * n))) / Om)))) else: tmp = math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -2.5e-199) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))))); elseif (Om <= 7.5e-204) tmp = sqrt(Float64(2.0 * Float64(Float64(U / Om) * Float64(Float64(U_42_ * Float64(Float64(l * l) * Float64(n * n))) / Om)))); else tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(l * Float64(Float64(l / Om) * -2.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -2.5e-199) tmp = sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om)))))); elseif (Om <= 7.5e-204) tmp = sqrt((2.0 * ((U / Om) * ((U_42_ * ((l * l) * (n * n))) / Om)))); else tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -2.5e-199], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 7.5e-204], N[Sqrt[N[(2.0 * N[(N[(U / Om), $MachinePrecision] * N[(N[(U$42$ * N[(N[(l * l), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -2.5 \cdot 10^{-199}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}\\
\mathbf{elif}\;Om \leq 7.5 \cdot 10^{-204}:\\
\;\;\;\;\sqrt{2 \cdot \left(\frac{U}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot n\right)\right)}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if Om < -2.4999999999999998e-199Initial program 55.8%
Simplified54.7%
Taylor expanded in l around 0 49.6%
unpow249.6%
associate-*r/49.6%
metadata-eval49.6%
*-commutative49.6%
unpow249.6%
times-frac57.0%
Simplified57.0%
Taylor expanded in l around 0 49.6%
+-commutative49.6%
*-commutative49.6%
unpow249.6%
times-frac57.0%
unpow257.0%
+-commutative57.0%
associate-*r/57.0%
metadata-eval57.0%
associate-*r*60.9%
Simplified60.9%
Taylor expanded in Om around inf 49.7%
if -2.4999999999999998e-199 < Om < 7.5000000000000003e-204Initial program 41.3%
Simplified41.3%
Taylor expanded in U* around inf 52.5%
unpow252.5%
times-frac55.9%
unpow255.9%
unpow255.9%
Simplified55.9%
if 7.5000000000000003e-204 < Om Initial program 61.9%
Simplified59.0%
Taylor expanded in n around 0 58.7%
associate-*r*58.7%
cancel-sign-sub-inv58.7%
metadata-eval58.7%
+-commutative58.7%
unpow258.7%
associate-*r/62.3%
*-commutative62.3%
associate-*l*62.3%
fma-def62.3%
Simplified62.3%
fma-udef62.3%
Applied egg-rr62.3%
Final simplification56.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= Om -7e-68) (sqrt (* (* 2.0 (* n U)) (- t (* l (* 2.0 (/ l Om)))))) (sqrt (* (* 2.0 U) (* n (+ t (* l (* (/ l Om) -2.0))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -7e-68) {
tmp = sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om))))));
} else {
tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (om <= (-7d-68)) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (l * (2.0d0 * (l / om))))))
else
tmp = sqrt(((2.0d0 * u) * (n * (t + (l * ((l / om) * (-2.0d0)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -7e-68) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om))))));
} else {
tmp = Math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -7e-68: tmp = math.sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om)))))) else: tmp = math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -7e-68) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))))); else tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(l * Float64(Float64(l / Om) * -2.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -7e-68) tmp = sqrt(((2.0 * (n * U)) * (t - (l * (2.0 * (l / Om)))))); else tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -7e-68], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -7 \cdot 10^{-68}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if Om < -7.00000000000000026e-68Initial program 54.8%
Simplified53.6%
Taylor expanded in l around 0 51.4%
unpow251.4%
associate-*r/51.4%
metadata-eval51.4%
*-commutative51.4%
unpow251.4%
times-frac58.3%
Simplified58.3%
Taylor expanded in l around 0 51.4%
+-commutative51.4%
*-commutative51.4%
unpow251.4%
times-frac58.3%
unpow258.3%
+-commutative58.3%
associate-*r/58.3%
metadata-eval58.3%
associate-*r*63.0%
Simplified63.0%
Taylor expanded in Om around inf 52.2%
if -7.00000000000000026e-68 < Om Initial program 57.4%
Simplified55.4%
Taylor expanded in n around 0 50.8%
associate-*r*50.8%
cancel-sign-sub-inv50.8%
metadata-eval50.8%
+-commutative50.8%
unpow250.8%
associate-*r/53.1%
*-commutative53.1%
associate-*l*53.1%
fma-def53.1%
Simplified53.1%
fma-udef53.1%
Applied egg-rr53.1%
Final simplification52.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 9e+47) (pow (* 2.0 (* U (* n t))) 0.5) (sqrt (* (* 2.0 U) (* n (* l (* (/ l Om) -2.0)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 9e+47) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = sqrt(((2.0 * U) * (n * (l * ((l / Om) * -2.0)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 9d+47) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = sqrt(((2.0d0 * u) * (n * (l * ((l / om) * (-2.0d0))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 9e+47) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.sqrt(((2.0 * U) * (n * (l * ((l / Om) * -2.0)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 9e+47: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.sqrt(((2.0 * U) * (n * (l * ((l / Om) * -2.0))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 9e+47) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(l * Float64(Float64(l / Om) * -2.0))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 9e+47) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = sqrt(((2.0 * U) * (n * (l * ((l / Om) * -2.0))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 9e+47], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 9 \cdot 10^{+47}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(\ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if l < 8.99999999999999958e47Initial program 60.1%
Simplified56.8%
Taylor expanded in t around inf 42.0%
associate-*r*42.0%
Simplified42.0%
pow1/244.0%
associate-*l*44.0%
Applied egg-rr44.0%
if 8.99999999999999958e47 < l Initial program 42.3%
Simplified47.0%
Taylor expanded in n around 0 37.5%
associate-*r*37.5%
cancel-sign-sub-inv37.5%
metadata-eval37.5%
+-commutative37.5%
unpow237.5%
associate-*r/46.7%
*-commutative46.7%
associate-*l*46.7%
fma-def46.7%
Simplified46.7%
Taylor expanded in l around inf 34.1%
*-commutative34.1%
unpow234.1%
associate-*r/40.9%
associate-*r*40.9%
*-commutative40.9%
Simplified40.9%
Final simplification43.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 (* (/ l Om) -2.0)))))))
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 + (l * ((l / Om) * -2.0))))));
}
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 + (l * ((l / om) * (-2.0d0)))))))
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 * ((l / Om) * -2.0))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(l * Float64(Float64(l / Om) * -2.0)))))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * U) * (n * (t + (l * ((l / Om) * -2.0)))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)}
\end{array}
Initial program 56.4%
Simplified54.7%
Taylor expanded in n around 0 47.5%
associate-*r*47.5%
cancel-sign-sub-inv47.5%
metadata-eval47.5%
+-commutative47.5%
unpow247.5%
associate-*r/50.1%
*-commutative50.1%
associate-*l*50.1%
fma-def50.1%
Simplified50.1%
fma-udef50.1%
Applied egg-rr50.1%
Final simplification50.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.95e+48) (pow (* 2.0 (* U (* n t))) 0.5) (sqrt (* -4.0 (/ U (/ Om (* n (* l l))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.95e+48) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = sqrt((-4.0 * (U / (Om / (n * (l * l))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.95d+48) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = sqrt(((-4.0d0) * (u / (om / (n * (l * l))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.95e+48) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.sqrt((-4.0 * (U / (Om / (n * (l * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.95e+48: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.sqrt((-4.0 * (U / (Om / (n * (l * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.95e+48) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * Float64(l * l)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.95e+48) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = sqrt((-4.0 * (U / (Om / (n * (l * l)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.95e+48], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.95 \cdot 10^{+48}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot \left(\ell \cdot \ell\right)}}}\\
\end{array}
\end{array}
if l < 1.95e48Initial program 60.1%
Simplified56.8%
Taylor expanded in t around inf 42.0%
associate-*r*42.0%
Simplified42.0%
pow1/244.0%
associate-*l*44.0%
Applied egg-rr44.0%
if 1.95e48 < l Initial program 42.3%
Simplified47.0%
Taylor expanded in n around 0 37.5%
associate-*r*37.5%
cancel-sign-sub-inv37.5%
metadata-eval37.5%
+-commutative37.5%
unpow237.5%
associate-*r/46.7%
*-commutative46.7%
associate-*l*46.7%
fma-def46.7%
Simplified46.7%
Taylor expanded in l around inf 34.1%
associate-/l*30.5%
*-commutative30.5%
unpow230.5%
Simplified30.5%
Final simplification41.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 6.9e+50) (pow (* 2.0 (* U (* n t))) 0.5) (sqrt (* -4.0 (/ (* U (* n (* l l))) Om)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.9e+50) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = sqrt((-4.0 * ((U * (n * (l * l))) / 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.9d+50) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = sqrt(((-4.0d0) * ((u * (n * (l * l))) / 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.9e+50) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.sqrt((-4.0 * ((U * (n * (l * l))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.9e+50: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.sqrt((-4.0 * ((U * (n * (l * l))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.9e+50) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = sqrt(Float64(-4.0 * Float64(Float64(U * Float64(n * Float64(l * l))) / 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.9e+50) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = sqrt((-4.0 * ((U * (n * (l * l))) / 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.9e+50], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(N[(U * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.9 \cdot 10^{+50}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 6.90000000000000032e50Initial program 60.1%
Simplified56.8%
Taylor expanded in t around inf 42.0%
associate-*r*42.0%
Simplified42.0%
pow1/244.0%
associate-*l*44.0%
Applied egg-rr44.0%
if 6.90000000000000032e50 < l Initial program 42.3%
Simplified47.0%
Taylor expanded in n around 0 37.5%
associate-*r*37.5%
cancel-sign-sub-inv37.5%
metadata-eval37.5%
+-commutative37.5%
unpow237.5%
associate-*r/46.7%
*-commutative46.7%
associate-*l*46.7%
fma-def46.7%
Simplified46.7%
Taylor expanded in l around inf 34.1%
*-commutative34.1%
unpow234.1%
Simplified34.1%
Final simplification42.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 6e+48) (pow (* 2.0 (* U (* n t))) 0.5) (sqrt (/ (* U -4.0) (/ Om (* l (* n l)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6e+48) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = sqrt(((U * -4.0) / (Om / (l * (n * 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 <= 6d+48) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = sqrt(((u * (-4.0d0)) / (om / (l * (n * 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 <= 6e+48) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.sqrt(((U * -4.0) / (Om / (l * (n * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6e+48: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.sqrt(((U * -4.0) / (Om / (l * (n * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6e+48) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = sqrt(Float64(Float64(U * -4.0) / Float64(Om / Float64(l * Float64(n * l))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 6e+48) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = sqrt(((U * -4.0) / (Om / (l * (n * 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, 6e+48], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(U * -4.0), $MachinePrecision] / N[(Om / N[(l * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6 \cdot 10^{+48}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{U \cdot -4}{\frac{Om}{\ell \cdot \left(n \cdot \ell\right)}}}\\
\end{array}
\end{array}
if l < 5.9999999999999999e48Initial program 60.1%
Simplified56.8%
Taylor expanded in t around inf 42.0%
associate-*r*42.0%
Simplified42.0%
pow1/244.0%
associate-*l*44.0%
Applied egg-rr44.0%
if 5.9999999999999999e48 < l Initial program 42.3%
Simplified47.0%
Taylor expanded in l around inf 47.4%
associate-*r*47.4%
unpow247.4%
associate-*r/47.4%
metadata-eval47.4%
*-commutative47.4%
unpow247.4%
times-frac48.0%
Simplified48.0%
Taylor expanded in n around 0 34.1%
associate-/l*30.5%
associate-*r/30.5%
unpow230.5%
associate-*l*40.9%
Simplified40.9%
Final simplification43.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= Om -3.7e+191) (sqrt (* t (* 2.0 (* n U)))) (pow (* 2.0 (* U (* n t))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -3.7e+191) {
tmp = sqrt((t * (2.0 * (n * U))));
} else {
tmp = pow((2.0 * (U * (n * t))), 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 <= (-3.7d+191)) then
tmp = sqrt((t * (2.0d0 * (n * u))))
else
tmp = (2.0d0 * (u * (n * t))) ** 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 <= -3.7e+191) {
tmp = Math.sqrt((t * (2.0 * (n * U))));
} else {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -3.7e+191: tmp = math.sqrt((t * (2.0 * (n * U)))) else: tmp = math.pow((2.0 * (U * (n * t))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -3.7e+191) tmp = sqrt(Float64(t * Float64(2.0 * Float64(n * U)))); else tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 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 <= -3.7e+191) tmp = sqrt((t * (2.0 * (n * U)))); else tmp = (2.0 * (U * (n * t))) ^ 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, -3.7e+191], N[Sqrt[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -3.7 \cdot 10^{+191}:\\
\;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if Om < -3.70000000000000019e191Initial program 60.6%
Simplified60.6%
Taylor expanded in t around inf 55.3%
if -3.70000000000000019e191 < Om Initial program 55.9%
Simplified53.5%
Taylor expanded in t around inf 35.9%
associate-*r*35.9%
Simplified35.9%
pow1/238.1%
associate-*l*38.1%
Applied egg-rr38.1%
Final simplification40.0%
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(Float64(2.0 * 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[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}
\end{array}
Initial program 56.4%
Simplified54.7%
Taylor expanded in t around inf 36.2%
associate-*r*36.2%
Simplified36.2%
Final simplification36.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* t (* 2.0 (* n U)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((t * (2.0 * (n * U))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((t * (2.0d0 * (n * u))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((t * (2.0 * (n * U))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((t * (2.0 * (n * U))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(t * Float64(2.0 * Float64(n * U)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((t * (2.0 * (n * U)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}
\end{array}
Initial program 56.4%
Simplified55.5%
Taylor expanded in t around inf 36.8%
Final simplification36.8%
herbie shell --seed 2023299
(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*))))))