
(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 13 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
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(sqrt (* 2.0 (* n (* U (+ t (* -2.0 (* l (/ l Om))))))))
(if (<= t_1 5e+291)
(sqrt t_1)
(*
(* l (sqrt 2.0))
(sqrt (* n (* U (- (/ n (* Om (/ Om U*))) (/ 2.0 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) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
} else if (t_1 <= 5e+291) {
tmp = sqrt(t_1);
} else {
tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))
if (t_1 <= 0.0d0) then
tmp = sqrt((2.0d0 * (n * (u * (t + ((-2.0d0) * (l * (l / om))))))))
else if (t_1 <= 5d+291) then
tmp = sqrt(t_1)
else
tmp = (l * sqrt(2.0d0)) * sqrt((n * (u * ((n / (om * (om / u_42))) - (2.0d0 / om)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
} else if (t_1 <= 5e+291) {
tmp = Math.sqrt(t_1);
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om)))))))) elif t_1 <= 5e+291: tmp = math.sqrt(t_1) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))))); elseif (t_1 <= 5e+291) tmp = sqrt(t_1); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n * Float64(U * Float64(Float64(n / Float64(Om * Float64(Om / U_42_))) - Float64(2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om)))))))); elseif (t_1 <= 5e+291) tmp = sqrt(t_1); else tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+291], N[Sqrt[t$95$1], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n * N[(U * N[(N[(n / N[(Om * N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+291}:\\
\;\;\;\;\sqrt{t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{Om \cdot \frac{Om}{U*}} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 0.0Initial program 12.5%
Simplified12.2%
associate-*l/20.3%
Applied egg-rr20.3%
Taylor expanded in n around 0 30.7%
*-commutative30.7%
unpow230.7%
associate-*r/36.0%
Simplified36.0%
if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5.0000000000000001e291Initial program 99.6%
if 5.0000000000000001e291 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) Initial program 21.4%
Simplified30.1%
Taylor expanded in l around inf 22.1%
*-commutative22.1%
*-commutative22.1%
associate-/l*22.1%
unpow222.1%
associate-*r/22.1%
metadata-eval22.1%
Simplified22.1%
Taylor expanded in U* around inf 22.4%
unpow222.4%
associate-*l/23.9%
Simplified23.9%
Final simplification53.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.6e+184)
(sqrt
(*
(* 2.0 (* n U))
(+ (+ t (* -2.0 (* l (/ l Om)))) (* n (* (pow (/ l Om) 2.0) (- U* U))))))
(*
(* l (sqrt 2.0))
(sqrt (* n (* U (- (/ n (* Om (/ Om U*))) (/ 2.0 Om))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.6e+184) {
tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n * (pow((l / Om), 2.0) * (U_42_ - U))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.6d+184) then
tmp = sqrt(((2.0d0 * (n * u)) * ((t + ((-2.0d0) * (l * (l / om)))) + (n * (((l / om) ** 2.0d0) * (u_42 - u))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt((n * (u * ((n / (om * (om / u_42))) - (2.0d0 / om)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.6e+184) {
tmp = Math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.6e+184: tmp = math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U)))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.6e+184) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n * Float64(U * Float64(Float64(n / Float64(Om * Float64(Om / U_42_))) - Float64(2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.6e+184) tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n * (((l / Om) ^ 2.0) * (U_42_ - U)))))); else tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.6e+184], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n * N[(U * N[(N[(n / N[(Om * N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.6 \cdot 10^{+184}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{Om \cdot \frac{Om}{U*}} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 1.59999999999999991e184Initial program 53.5%
Simplified53.0%
associate-*l/56.9%
Applied egg-rr56.9%
if 1.59999999999999991e184 < l Initial program 17.2%
Simplified33.1%
Taylor expanded in l around inf 52.9%
*-commutative52.9%
*-commutative52.9%
associate-/l*52.9%
unpow252.9%
associate-*r/52.9%
metadata-eval52.9%
Simplified52.9%
Taylor expanded in U* around inf 52.9%
unpow252.9%
associate-*l/55.8%
Simplified55.8%
Final simplification56.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* l (sqrt 2.0))))
(if (<= l 2.8e-132)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l 7e+142)
(sqrt
(*
(* 2.0 (* n U))
(+ (+ t (* -2.0 (* l (/ l Om)))) (/ n (* (/ Om U*) (/ Om (* l l)))))))
(if (<= l 1.05e+214)
(sqrt
(*
-2.0
(*
(- (/ 2.0 Om) (/ (* n (- U* U)) (* Om Om)))
(* n (* l (* U l))))))
(if (or (<= l 1.75e+259) (not (<= l 6.1e+289)))
(* t_1 (sqrt (* n (* -2.0 (/ U Om)))))
(* t_1 (sqrt (* n (* (/ 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 = l * sqrt(2.0);
double tmp;
if (l <= 2.8e-132) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 7e+142) {
tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
} else if (l <= 1.05e+214) {
tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
} else if ((l <= 1.75e+259) || !(l <= 6.1e+289)) {
tmp = t_1 * sqrt((n * (-2.0 * (U / Om))));
} else {
tmp = t_1 * sqrt((n * ((n / Om) * ((U * U_42_) / Om))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = l * sqrt(2.0d0)
if (l <= 2.8d-132) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l <= 7d+142) then
tmp = sqrt(((2.0d0 * (n * u)) * ((t + ((-2.0d0) * (l * (l / om)))) + (n / ((om / u_42) * (om / (l * l)))))))
else if (l <= 1.05d+214) then
tmp = sqrt(((-2.0d0) * (((2.0d0 / om) - ((n * (u_42 - u)) / (om * om))) * (n * (l * (u * l))))))
else if ((l <= 1.75d+259) .or. (.not. (l <= 6.1d+289))) then
tmp = t_1 * sqrt((n * ((-2.0d0) * (u / om))))
else
tmp = t_1 * sqrt((n * ((n / om) * ((u * u_42) / om))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l * Math.sqrt(2.0);
double tmp;
if (l <= 2.8e-132) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 7e+142) {
tmp = Math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
} else if (l <= 1.05e+214) {
tmp = Math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
} else if ((l <= 1.75e+259) || !(l <= 6.1e+289)) {
tmp = t_1 * Math.sqrt((n * (-2.0 * (U / Om))));
} else {
tmp = t_1 * Math.sqrt((n * ((n / Om) * ((U * U_42_) / Om))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = l * math.sqrt(2.0) tmp = 0 if l <= 2.8e-132: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l <= 7e+142: tmp = math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l))))))) elif l <= 1.05e+214: tmp = math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l)))))) elif (l <= 1.75e+259) or not (l <= 6.1e+289): tmp = t_1 * math.sqrt((n * (-2.0 * (U / Om)))) else: tmp = t_1 * math.sqrt((n * ((n / Om) * ((U * U_42_) / Om)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l * sqrt(2.0)) tmp = 0.0 if (l <= 2.8e-132) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l <= 7e+142) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))) + Float64(n / Float64(Float64(Om / U_42_) * Float64(Om / Float64(l * l))))))); elseif (l <= 1.05e+214) tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n * Float64(U_42_ - U)) / Float64(Om * Om))) * Float64(n * Float64(l * Float64(U * l)))))); elseif ((l <= 1.75e+259) || !(l <= 6.1e+289)) tmp = Float64(t_1 * sqrt(Float64(n * Float64(-2.0 * Float64(U / Om))))); else tmp = Float64(t_1 * sqrt(Float64(n * Float64(Float64(n / Om) * Float64(Float64(U * U_42_) / Om))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = l * sqrt(2.0); tmp = 0.0; if (l <= 2.8e-132) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l <= 7e+142) tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l))))))); elseif (l <= 1.05e+214) tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l)))))); elseif ((l <= 1.75e+259) || ~((l <= 6.1e+289))) tmp = t_1 * sqrt((n * (-2.0 * (U / Om)))); else tmp = t_1 * sqrt((n * ((n / Om) * ((U * U_42_) / Om)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 2.8e-132], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 7e+142], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n / N[(N[(Om / U$42$), $MachinePrecision] * N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.05e+214], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l, 1.75e+259], N[Not[LessEqual[l, 6.1e+289]], $MachinePrecision]], N[(t$95$1 * N[Sqrt[N[(n * N[(-2.0 * N[(U / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(n * N[(N[(n / Om), $MachinePrecision] * N[(N[(U * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \sqrt{2}\\
\mathbf{if}\;\ell \leq 2.8 \cdot 10^{-132}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 7 \cdot 10^{+142}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{U*} \cdot \frac{Om}{\ell \cdot \ell}}\right)}\\
\mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+214}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+259} \lor \neg \left(\ell \leq 6.1 \cdot 10^{+289}\right):\\
\;\;\;\;t_1 \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt{n \cdot \left(\frac{n}{Om} \cdot \frac{U \cdot U*}{Om}\right)}\\
\end{array}
\end{array}
if l < 2.80000000000000002e-132Initial program 51.5%
Simplified50.8%
associate-*l/56.2%
Applied egg-rr56.2%
Taylor expanded in t around inf 43.0%
associate-*r*40.3%
Simplified40.3%
pow1/242.1%
*-commutative42.1%
Applied egg-rr42.1%
if 2.80000000000000002e-132 < l < 6.99999999999999995e142Initial program 63.6%
Simplified63.6%
associate-*l/63.6%
Applied egg-rr63.6%
Taylor expanded in U around 0 58.3%
mul-1-neg58.3%
associate-/l*58.2%
distribute-neg-frac58.2%
unpow258.2%
times-frac63.5%
unpow263.5%
Simplified63.5%
if 6.99999999999999995e142 < l < 1.05e214Initial program 14.0%
Simplified13.7%
associate-*l/32.2%
Applied egg-rr32.2%
Taylor expanded in l around inf 31.8%
unpow231.8%
associate-*r/31.8%
metadata-eval31.8%
*-commutative31.8%
unpow231.8%
Simplified31.8%
Taylor expanded in l around 0 31.8%
unpow231.8%
associate-*r/31.8%
metadata-eval31.8%
*-commutative31.8%
unpow231.8%
associate-*r*50.2%
*-commutative50.2%
Simplified50.2%
if 1.05e214 < l < 1.7499999999999999e259 or 6.10000000000000029e289 < l Initial program 27.0%
Simplified33.7%
Taylor expanded in l around inf 67.2%
*-commutative67.2%
*-commutative67.2%
associate-/l*67.2%
unpow267.2%
associate-*r/67.2%
metadata-eval67.2%
Simplified67.2%
Taylor expanded in n around 0 67.2%
if 1.7499999999999999e259 < l < 6.10000000000000029e289Initial program 1.1%
Simplified17.7%
Taylor expanded in l around inf 34.8%
*-commutative34.8%
*-commutative34.8%
associate-/l*34.8%
unpow234.8%
associate-*r/34.8%
metadata-eval34.8%
Simplified34.8%
Taylor expanded in U* around inf 18.5%
*-commutative18.5%
unpow218.5%
times-frac18.5%
Simplified18.5%
Final simplification48.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.1e-131)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l 1.15e+148)
(sqrt
(*
(* 2.0 (* n U))
(+ (+ t (* -2.0 (* l (/ l Om)))) (/ n (* (/ Om U*) (/ Om (* l l)))))))
(*
(* l (sqrt 2.0))
(sqrt (* n (* U (- (/ n (* Om (/ Om U*))) (/ 2.0 Om)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.1e-131) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 1.15e+148) {
tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 2.1d-131) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l <= 1.15d+148) then
tmp = sqrt(((2.0d0 * (n * u)) * ((t + ((-2.0d0) * (l * (l / om)))) + (n / ((om / u_42) * (om / (l * l)))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt((n * (u * ((n / (om * (om / u_42))) - (2.0d0 / om)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.1e-131) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 1.15e+148) {
tmp = Math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.1e-131: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l <= 1.15e+148: tmp = math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l))))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.1e-131) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l <= 1.15e+148) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))) + Float64(n / Float64(Float64(Om / U_42_) * Float64(Om / Float64(l * l))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n * Float64(U * Float64(Float64(n / Float64(Om * Float64(Om / U_42_))) - Float64(2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.1e-131) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l <= 1.15e+148) tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l))))))); else tmp = (l * sqrt(2.0)) * sqrt((n * (U * ((n / (Om * (Om / U_42_))) - (2.0 / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.1e-131], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 1.15e+148], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n / N[(N[(Om / U$42$), $MachinePrecision] * N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n * N[(U * N[(N[(n / N[(Om * N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.1 \cdot 10^{-131}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 1.15 \cdot 10^{+148}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{U*} \cdot \frac{Om}{\ell \cdot \ell}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{Om \cdot \frac{Om}{U*}} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 2.09999999999999997e-131Initial program 51.5%
Simplified50.8%
associate-*l/56.2%
Applied egg-rr56.2%
Taylor expanded in t around inf 43.0%
associate-*r*40.3%
Simplified40.3%
pow1/242.1%
*-commutative42.1%
Applied egg-rr42.1%
if 2.09999999999999997e-131 < l < 1.15e148Initial program 64.3%
Simplified64.2%
associate-*l/64.2%
Applied egg-rr64.2%
Taylor expanded in U around 0 59.0%
mul-1-neg59.0%
associate-/l*59.0%
distribute-neg-frac59.0%
unpow259.0%
times-frac64.2%
unpow264.2%
Simplified64.2%
if 1.15e148 < l Initial program 14.9%
Simplified28.5%
Taylor expanded in l around inf 48.8%
*-commutative48.8%
*-commutative48.8%
associate-/l*48.8%
unpow248.8%
associate-*r/48.8%
metadata-eval48.8%
Simplified48.8%
Taylor expanded in U* around inf 48.9%
unpow248.9%
associate-*l/54.1%
Simplified54.1%
Final simplification48.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.6e-132)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l 4.6e+142)
(sqrt
(*
(* 2.0 (* n U))
(+ (+ t (* -2.0 (* l (/ l Om)))) (/ n (* (/ Om U*) (/ Om (* l l)))))))
(if (or (<= l 1.07e+214) (and (not (<= l 4.4e+262)) (<= l 1.25e+288)))
(sqrt
(*
-2.0
(* (- (/ 2.0 Om) (/ (* n (- U* U)) (* Om Om))) (* n (* l (* U l))))))
(* (* l (sqrt 2.0)) (sqrt (* n (* -2.0 (/ U Om)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.6e-132) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 4.6e+142) {
tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
} else if ((l <= 1.07e+214) || (!(l <= 4.4e+262) && (l <= 1.25e+288))) {
tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((n * (-2.0 * (U / Om))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4.6d-132) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l <= 4.6d+142) then
tmp = sqrt(((2.0d0 * (n * u)) * ((t + ((-2.0d0) * (l * (l / om)))) + (n / ((om / u_42) * (om / (l * l)))))))
else if ((l <= 1.07d+214) .or. (.not. (l <= 4.4d+262)) .and. (l <= 1.25d+288)) then
tmp = sqrt(((-2.0d0) * (((2.0d0 / om) - ((n * (u_42 - u)) / (om * om))) * (n * (l * (u * l))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt((n * ((-2.0d0) * (u / om))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.6e-132) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 4.6e+142) {
tmp = Math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
} else if ((l <= 1.07e+214) || (!(l <= 4.4e+262) && (l <= 1.25e+288))) {
tmp = Math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((n * (-2.0 * (U / Om))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.6e-132: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l <= 4.6e+142: tmp = math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l))))))) elif (l <= 1.07e+214) or (not (l <= 4.4e+262) and (l <= 1.25e+288)): tmp = math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l)))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((n * (-2.0 * (U / Om)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.6e-132) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l <= 4.6e+142) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))) + Float64(n / Float64(Float64(Om / U_42_) * Float64(Om / Float64(l * l))))))); elseif ((l <= 1.07e+214) || (!(l <= 4.4e+262) && (l <= 1.25e+288))) tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n * Float64(U_42_ - U)) / Float64(Om * Om))) * Float64(n * Float64(l * Float64(U * l)))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n * Float64(-2.0 * Float64(U / Om))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.6e-132) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l <= 4.6e+142) tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l))))))); elseif ((l <= 1.07e+214) || (~((l <= 4.4e+262)) && (l <= 1.25e+288))) tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l)))))); else tmp = (l * sqrt(2.0)) * sqrt((n * (-2.0 * (U / Om)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.6e-132], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 4.6e+142], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n / N[(N[(Om / U$42$), $MachinePrecision] * N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l, 1.07e+214], And[N[Not[LessEqual[l, 4.4e+262]], $MachinePrecision], LessEqual[l, 1.25e+288]]], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n * N[(-2.0 * N[(U / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.6 \cdot 10^{-132}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 4.6 \cdot 10^{+142}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{U*} \cdot \frac{Om}{\ell \cdot \ell}}\right)}\\
\mathbf{elif}\;\ell \leq 1.07 \cdot 10^{+214} \lor \neg \left(\ell \leq 4.4 \cdot 10^{+262}\right) \land \ell \leq 1.25 \cdot 10^{+288}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{Om}\right)}\\
\end{array}
\end{array}
if l < 4.60000000000000006e-132Initial program 51.5%
Simplified50.8%
associate-*l/56.2%
Applied egg-rr56.2%
Taylor expanded in t around inf 43.0%
associate-*r*40.3%
Simplified40.3%
pow1/242.1%
*-commutative42.1%
Applied egg-rr42.1%
if 4.60000000000000006e-132 < l < 4.60000000000000004e142Initial program 63.6%
Simplified63.6%
associate-*l/63.6%
Applied egg-rr63.6%
Taylor expanded in U around 0 58.3%
mul-1-neg58.3%
associate-/l*58.2%
distribute-neg-frac58.2%
unpow258.2%
times-frac63.5%
unpow263.5%
Simplified63.5%
if 4.60000000000000004e142 < l < 1.07e214 or 4.40000000000000021e262 < l < 1.2500000000000001e288Initial program 11.5%
Simplified11.3%
associate-*l/26.1%
Applied egg-rr26.1%
Taylor expanded in l around inf 26.4%
unpow226.4%
associate-*r/26.4%
metadata-eval26.4%
*-commutative26.4%
unpow226.4%
Simplified26.4%
Taylor expanded in l around 0 26.4%
unpow226.4%
associate-*r/26.4%
metadata-eval26.4%
*-commutative26.4%
unpow226.4%
associate-*r*45.9%
*-commutative45.9%
Simplified45.9%
if 1.07e214 < l < 4.40000000000000021e262 or 1.2500000000000001e288 < l Initial program 23.8%
Simplified35.6%
Taylor expanded in l around inf 59.6%
*-commutative59.6%
*-commutative59.6%
associate-/l*59.6%
unpow259.6%
associate-*r/59.6%
metadata-eval59.6%
Simplified59.6%
Taylor expanded in n around 0 59.6%
Final simplification48.2%
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))))))))))
(if (<= l 1.32e-79)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l 16500000.0)
t_1
(if (<= l 1e+75)
(sqrt (* 2.0 (* (/ (* n U) (/ Om U*)) (/ n (/ (/ Om l) l)))))
(if (<= l 1e+194)
t_1
(sqrt
(*
-2.0
(*
(- (/ 2.0 Om) (/ (* n (- U* U)) (* Om Om)))
(* n (* l (* U l))))))))))))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))))))));
double tmp;
if (l <= 1.32e-79) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 16500000.0) {
tmp = t_1;
} else if (l <= 1e+75) {
tmp = sqrt((2.0 * (((n * U) / (Om / U_42_)) * (n / ((Om / l) / l)))));
} else if (l <= 1e+194) {
tmp = t_1;
} else {
tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * 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 = sqrt((2.0d0 * (n * (u * (t + ((-2.0d0) * (l * (l / om))))))))
if (l <= 1.32d-79) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l <= 16500000.0d0) then
tmp = t_1
else if (l <= 1d+75) then
tmp = sqrt((2.0d0 * (((n * u) / (om / u_42)) * (n / ((om / l) / l)))))
else if (l <= 1d+194) then
tmp = t_1
else
tmp = sqrt(((-2.0d0) * (((2.0d0 / om) - ((n * (u_42 - u)) / (om * om))) * (n * (l * (u * 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 = Math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
double tmp;
if (l <= 1.32e-79) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 16500000.0) {
tmp = t_1;
} else if (l <= 1e+75) {
tmp = Math.sqrt((2.0 * (((n * U) / (Om / U_42_)) * (n / ((Om / l) / l)))));
} else if (l <= 1e+194) {
tmp = t_1;
} else {
tmp = Math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
}
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)))))))) tmp = 0 if l <= 1.32e-79: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l <= 16500000.0: tmp = t_1 elif l <= 1e+75: tmp = math.sqrt((2.0 * (((n * U) / (Om / U_42_)) * (n / ((Om / l) / l))))) elif l <= 1e+194: tmp = t_1 else: tmp = math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))))) tmp = 0.0 if (l <= 1.32e-79) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l <= 16500000.0) tmp = t_1; elseif (l <= 1e+75) tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(n * U) / Float64(Om / U_42_)) * Float64(n / Float64(Float64(Om / l) / l))))); elseif (l <= 1e+194) tmp = t_1; else tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n * Float64(U_42_ - U)) / Float64(Om * Om))) * Float64(n * Float64(l * Float64(U * l)))))); 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)))))))); tmp = 0.0; if (l <= 1.32e-79) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l <= 16500000.0) tmp = t_1; elseif (l <= 1e+75) tmp = sqrt((2.0 * (((n * U) / (Om / U_42_)) * (n / ((Om / l) / l))))); elseif (l <= 1e+194) tmp = t_1; else tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * 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[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, 1.32e-79], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 16500000.0], t$95$1, If[LessEqual[l, 1e+75], N[Sqrt[N[(2.0 * N[(N[(N[(n * U), $MachinePrecision] / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision] * N[(n / N[(N[(Om / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1e+194], t$95$1, N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{if}\;\ell \leq 1.32 \cdot 10^{-79}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 16500000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq 10^{+75}:\\
\;\;\;\;\sqrt{2 \cdot \left(\frac{n \cdot U}{\frac{Om}{U*}} \cdot \frac{n}{\frac{\frac{Om}{\ell}}{\ell}}\right)}\\
\mathbf{elif}\;\ell \leq 10^{+194}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 1.32e-79Initial program 52.9%
Simplified52.3%
associate-*l/57.3%
Applied egg-rr57.3%
Taylor expanded in t around inf 43.9%
associate-*r*41.3%
Simplified41.3%
pow1/243.6%
*-commutative43.6%
Applied egg-rr43.6%
if 1.32e-79 < l < 1.65e7 or 9.99999999999999927e74 < l < 9.99999999999999945e193Initial program 53.6%
Simplified53.5%
associate-*l/55.7%
Applied egg-rr55.7%
Taylor expanded in n around 0 43.8%
*-commutative43.8%
unpow243.8%
associate-*r/46.2%
Simplified46.2%
if 1.65e7 < l < 9.99999999999999927e74Initial program 47.5%
Simplified47.5%
Taylor expanded in U* around inf 35.7%
associate-/l*35.9%
unpow235.9%
*-commutative35.9%
unpow235.9%
Simplified35.9%
associate-*r/46.3%
times-frac57.2%
Applied egg-rr57.2%
times-frac46.6%
associate-/r*46.6%
Simplified46.6%
if 9.99999999999999945e193 < l Initial program 18.8%
Simplified18.8%
associate-*l/33.0%
Applied egg-rr33.0%
Taylor expanded in l around inf 24.7%
unpow224.7%
associate-*r/24.7%
metadata-eval24.7%
*-commutative24.7%
unpow224.7%
Simplified24.7%
Taylor expanded in l around 0 24.7%
unpow224.7%
associate-*r/24.7%
metadata-eval24.7%
*-commutative24.7%
unpow224.7%
associate-*r*35.0%
*-commutative35.0%
Simplified35.0%
Final simplification43.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.75e-132)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l 1.6e+143)
(sqrt
(*
(* 2.0 (* n U))
(+ (+ t (* -2.0 (* l (/ l Om)))) (/ n (* (/ Om U*) (/ Om (* l l)))))))
(sqrt
(*
-2.0
(* (- (/ 2.0 Om) (/ (* n (- U* U)) (* Om Om))) (* n (* l (* U l)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.75e-132) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 1.6e+143) {
tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
} else {
tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * 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 <= 2.75d-132) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l <= 1.6d+143) then
tmp = sqrt(((2.0d0 * (n * u)) * ((t + ((-2.0d0) * (l * (l / om)))) + (n / ((om / u_42) * (om / (l * l)))))))
else
tmp = sqrt(((-2.0d0) * (((2.0d0 / om) - ((n * (u_42 - u)) / (om * om))) * (n * (l * (u * 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 <= 2.75e-132) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 1.6e+143) {
tmp = Math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
} else {
tmp = Math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.75e-132: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l <= 1.6e+143: tmp = math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l))))))) else: tmp = math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.75e-132) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l <= 1.6e+143) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))) + Float64(n / Float64(Float64(Om / U_42_) * Float64(Om / Float64(l * l))))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n * Float64(U_42_ - U)) / Float64(Om * Om))) * Float64(n * Float64(l * Float64(U * l)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.75e-132) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l <= 1.6e+143) tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l))))))); else tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * 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, 2.75e-132], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 1.6e+143], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n / N[(N[(Om / U$42$), $MachinePrecision] * N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.75 \cdot 10^{-132}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 1.6 \cdot 10^{+143}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{U*} \cdot \frac{Om}{\ell \cdot \ell}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 2.75e-132Initial program 51.5%
Simplified50.8%
associate-*l/56.2%
Applied egg-rr56.2%
Taylor expanded in t around inf 43.0%
associate-*r*40.3%
Simplified40.3%
pow1/242.1%
*-commutative42.1%
Applied egg-rr42.1%
if 2.75e-132 < l < 1.60000000000000008e143Initial program 63.6%
Simplified63.6%
associate-*l/63.6%
Applied egg-rr63.6%
Taylor expanded in U around 0 58.3%
mul-1-neg58.3%
associate-/l*58.2%
distribute-neg-frac58.2%
unpow258.2%
times-frac63.5%
unpow263.5%
Simplified63.5%
if 1.60000000000000008e143 < l Initial program 17.2%
Simplified17.0%
associate-*l/30.5%
Applied egg-rr30.5%
Taylor expanded in l around inf 26.5%
unpow226.5%
associate-*r/26.5%
metadata-eval26.5%
*-commutative26.5%
unpow226.5%
Simplified26.5%
Taylor expanded in l around 0 26.5%
unpow226.5%
associate-*r/26.5%
metadata-eval26.5%
*-commutative26.5%
unpow226.5%
associate-*r*37.0%
*-commutative37.0%
Simplified37.0%
Final simplification46.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.2e-83)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l 1.65e+145)
(sqrt
(*
(* 2.0 (* n U))
(- t (* (* l l) (+ (/ 2.0 Om) (/ n (/ (* Om Om) (- U U*))))))))
(sqrt
(*
-2.0
(* (- (/ 2.0 Om) (/ (* n (- U* U)) (* Om Om))) (* n (* l (* U l)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.2e-83) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 1.65e+145) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_))))))));
} else {
tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * 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 <= 5.2d-83) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l <= 1.65d+145) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - ((l * l) * ((2.0d0 / om) + (n / ((om * om) / (u - u_42))))))))
else
tmp = sqrt(((-2.0d0) * (((2.0d0 / om) - ((n * (u_42 - u)) / (om * om))) * (n * (l * (u * 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 <= 5.2e-83) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 1.65e+145) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_))))))));
} else {
tmp = Math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5.2e-83: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l <= 1.65e+145: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_)))))))) else: tmp = math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.2e-83) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l <= 1.65e+145) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(l * l) * Float64(Float64(2.0 / Om) + Float64(n / Float64(Float64(Om * Om) / Float64(U - U_42_)))))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n * Float64(U_42_ - U)) / Float64(Om * Om))) * Float64(n * Float64(l * Float64(U * l)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 5.2e-83) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l <= 1.65e+145) tmp = sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_)))))))); else tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * 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, 5.2e-83], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 1.65e+145], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] + N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.2 \cdot 10^{-83}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+145}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{2}{Om} + \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 5.20000000000000018e-83Initial program 52.6%
Simplified52.1%
associate-*l/57.1%
Applied egg-rr57.1%
Taylor expanded in t around inf 44.1%
associate-*r*41.6%
Simplified41.6%
pow1/243.9%
*-commutative43.9%
Applied egg-rr43.9%
if 5.20000000000000018e-83 < l < 1.65000000000000013e145Initial program 61.7%
Simplified61.7%
Taylor expanded in l around 0 61.7%
*-commutative61.7%
unpow261.7%
+-commutative61.7%
associate-*r/61.7%
metadata-eval61.7%
associate-/l*61.7%
unpow261.7%
Simplified61.7%
if 1.65000000000000013e145 < l Initial program 17.2%
Simplified17.0%
associate-*l/30.5%
Applied egg-rr30.5%
Taylor expanded in l around inf 26.5%
unpow226.5%
associate-*r/26.5%
metadata-eval26.5%
*-commutative26.5%
unpow226.5%
Simplified26.5%
Taylor expanded in l around 0 26.5%
unpow226.5%
associate-*r/26.5%
metadata-eval26.5%
*-commutative26.5%
unpow226.5%
associate-*r*37.0%
*-commutative37.0%
Simplified37.0%
Final simplification46.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.95e+125) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* -2.0 (* 2.0 (/ n (/ Om (* l (* U l)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.95e+125) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((-2.0 * (2.0 * (n / (Om / (l * (U * 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 <= 2.95d+125) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((-2.0d0) * (2.0d0 * (n / (om / (l * (u * 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 <= 2.95e+125) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((-2.0 * (2.0 * (n / (Om / (l * (U * l)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.95e+125: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((-2.0 * (2.0 * (n / (Om / (l * (U * l))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.95e+125) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(-2.0 * Float64(2.0 * Float64(n / Float64(Om / Float64(l * Float64(U * l))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.95e+125) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((-2.0 * (2.0 * (n / (Om / (l * (U * 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, 2.95e+125], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(2.0 * N[(n / N[(Om / N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.95 \cdot 10^{+125}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(2 \cdot \frac{n}{\frac{Om}{\ell \cdot \left(U \cdot \ell\right)}}\right)}\\
\end{array}
\end{array}
if l < 2.95e125Initial program 53.9%
Simplified57.5%
Taylor expanded in l around 0 42.1%
pow1/243.9%
*-commutative43.9%
Applied egg-rr43.9%
if 2.95e125 < l Initial program 23.3%
Simplified23.2%
associate-*l/35.6%
Applied egg-rr35.6%
Taylor expanded in l around inf 27.1%
unpow227.1%
associate-*r/27.1%
metadata-eval27.1%
*-commutative27.1%
unpow227.1%
Simplified27.1%
Taylor expanded in n around 0 21.5%
associate-/l*21.5%
*-commutative21.5%
unpow221.5%
associate-*r*31.2%
*-commutative31.2%
Simplified31.2%
Final simplification41.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U (+ t (* -2.0 (* l (/ l Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (n * (u * (t + ((-2.0d0) * (l * (l / om))))))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om)))))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}
\end{array}
Initial program 49.1%
Simplified48.7%
associate-*l/54.0%
Applied egg-rr54.0%
Taylor expanded in n around 0 42.8%
*-commutative42.8%
unpow242.8%
associate-*r/46.5%
Simplified46.5%
Final simplification46.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* -2e+69) (pow (* 2.0 (* U (* n t))) 0.5) (sqrt (* 2.0 (* n (* U t))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -2e+69) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= (-2d+69)) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (n * (u * t))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -2e+69) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -2e+69: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.sqrt((2.0 * (n * (U * t)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -2e+69) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -2e+69) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = sqrt((2.0 * (n * (U * t)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, -2e+69], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -2 \cdot 10^{+69}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if U* < -2.0000000000000001e69Initial program 48.2%
Simplified48.2%
associate-*l/55.9%
Applied egg-rr55.9%
Taylor expanded in t around inf 25.6%
associate-*r*27.7%
Simplified27.7%
pow1/237.0%
*-commutative37.0%
Applied egg-rr37.0%
if -2.0000000000000001e69 < U* Initial program 49.4%
Simplified53.4%
Taylor expanded in l around 0 39.9%
Final simplification39.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* n (* U t))) 0.5))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow((2.0 * (n * (U * t))), 0.5);
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = (2.0d0 * (n * (u * t))) ** 0.5d0
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow((2.0 * (n * (U * t))), 0.5);
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * (n * (U * t))), 0.5)
l = abs(l) function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5 end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * (n * (U * t))) ^ 0.5; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}
\end{array}
Initial program 49.1%
Simplified54.0%
Taylor expanded in l around 0 36.2%
pow1/238.6%
*-commutative38.6%
Applied egg-rr38.6%
Final simplification38.6%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (n * (U * t))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (n * (u * t))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (n * (U * t))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (n * (U * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (n * (U * t)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 49.1%
Simplified54.0%
Taylor expanded in l around 0 36.2%
Final simplification36.2%
herbie shell --seed 2023279
(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*))))))