
(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 16 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 (- t (* 2.0 (/ (* l l) Om))))
(t_3 (* t_1 (+ t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_3 0.0)
(pow
(*
2.0
(+
(* n (* U t))
(/ (+ (/ n (/ Om (* l U*))) (* l -2.0)) (/ Om (* n (* U l))))))
0.5)
(if (<= t_3 5e+307)
(sqrt (* t_1 (+ t_2 (* (/ n (* (/ Om l) (/ Om l))) (- U* U)))))
(*
(* l (sqrt 2.0))
(sqrt (* (/ n Om) (* U (+ -2.0 (* (/ n Om) (- U* U)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = t - (2.0 * ((l * l) / Om));
double t_3 = t_1 * (t_2 + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_3 <= 0.0) {
tmp = pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
} else if (t_3 <= 5e+307) {
tmp = sqrt((t_1 * (t_2 + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
} else {
tmp = (l * sqrt(2.0)) * sqrt(((n / Om) * (U * (-2.0 + ((n / Om) * (U_42_ - U))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (2.0d0 * n) * u
t_2 = t - (2.0d0 * ((l * l) / om))
t_3 = t_1 * (t_2 + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))
if (t_3 <= 0.0d0) then
tmp = (2.0d0 * ((n * (u * t)) + (((n / (om / (l * u_42))) + (l * (-2.0d0))) / (om / (n * (u * l)))))) ** 0.5d0
else if (t_3 <= 5d+307) then
tmp = sqrt((t_1 * (t_2 + ((n / ((om / l) * (om / l))) * (u_42 - u)))))
else
tmp = (l * sqrt(2.0d0)) * sqrt(((n / om) * (u * ((-2.0d0) + ((n / om) * (u_42 - u))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = t - (2.0 * ((l * l) / Om));
double t_3 = t_1 * (t_2 + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
} else if (t_3 <= 5e+307) {
tmp = Math.sqrt((t_1 * (t_2 + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt(((n / Om) * (U * (-2.0 + ((n / Om) * (U_42_ - U))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (2.0 * n) * U t_2 = t - (2.0 * ((l * l) / Om)) t_3 = t_1 * (t_2 + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))) tmp = 0 if t_3 <= 0.0: tmp = math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5) elif t_3 <= 5e+307: tmp = math.sqrt((t_1 * (t_2 + ((n / ((Om / l) * (Om / l))) * (U_42_ - U))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt(((n / Om) * (U * (-2.0 + ((n / Om) * (U_42_ - U)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) t_3 = Float64(t_1 * Float64(t_2 + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(n / Float64(Om / Float64(l * U_42_))) + Float64(l * -2.0)) / Float64(Om / Float64(n * Float64(U * l)))))) ^ 0.5; elseif (t_3 <= 5e+307) tmp = sqrt(Float64(t_1 * Float64(t_2 + Float64(Float64(n / Float64(Float64(Om / l) * Float64(Om / l))) * Float64(U_42_ - U))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n / Om) * Float64(U * Float64(-2.0 + Float64(Float64(n / Om) * Float64(U_42_ - U))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (2.0 * n) * U; t_2 = t - (2.0 * ((l * l) / Om)); t_3 = t_1 * (t_2 + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))); tmp = 0.0; if (t_3 <= 0.0) tmp = (2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))) ^ 0.5; elseif (t_3 <= 5e+307) tmp = sqrt((t_1 * (t_2 + ((n / ((Om / l) * (Om / l))) * (U_42_ - U))))); else tmp = (l * sqrt(2.0)) * sqrt(((n / Om) * (U * (-2.0 + ((n / Om) * (U_42_ - U)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t$95$2 + 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$3, 0.0], N[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(n / N[(Om / N[(l * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$3, 5e+307], N[Sqrt[N[(t$95$1 * N[(t$95$2 + N[(N[(n / N[(N[(Om / l), $MachinePrecision] * N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n / Om), $MachinePrecision] * N[(U * N[(-2.0 + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := t - 2 \cdot \frac{\ell \cdot \ell}{Om}\\
t_3 := t_1 \cdot \left(t_2 + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{n}{\frac{Om}{\ell \cdot U*}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t_2 + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n}{Om} \cdot \left(U \cdot \left(-2 + \frac{n}{Om} \cdot \left(U* - U\right)\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 5.3%
Simplified38.1%
Taylor expanded in t around inf 38.1%
Taylor expanded in U* around inf 38.1%
pow1/238.1%
distribute-lft-out38.1%
associate-/l*38.1%
associate-/l*38.1%
*-commutative38.1%
*-commutative38.1%
Applied egg-rr38.1%
if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5e307Initial program 94.6%
Taylor expanded in n around 0 80.4%
associate-/l*81.7%
unpow281.7%
unpow281.7%
Simplified81.7%
*-un-lft-identity81.7%
times-frac94.7%
Applied egg-rr94.7%
*-lft-identity94.7%
Simplified94.7%
if 5e307 < (*.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 19.1%
Simplified32.4%
Taylor expanded in t around inf 40.2%
Taylor expanded in l around inf 26.9%
*-un-lft-identity26.9%
associate-/l*26.1%
*-commutative26.1%
sub-neg26.1%
associate-/l*27.6%
metadata-eval27.6%
Applied egg-rr27.6%
*-lft-identity27.6%
associate-/r/27.6%
+-commutative27.6%
associate-/r/29.2%
Simplified29.2%
Final simplification59.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 400000.0)
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (* l (/ l Om))))
(* (/ n (* (/ Om l) (/ Om l))) (- U* U)))))
(if (<= l 1.3e+147)
(sqrt
(*
(* 2.0 n)
(+ (* U t) (/ (- (/ n (/ Om (- U* U))) 2.0) (/ (/ Om U) (* l l))))))
(* (sqrt 2.0) (* l (sqrt (/ (* U (* n (+ -2.0 (/ n (/ Om U*))))) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 400000.0) {
tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
} else if (l <= 1.3e+147) {
tmp = sqrt(((2.0 * n) * ((U * t) + (((n / (Om / (U_42_ - U))) - 2.0) / ((Om / U) / (l * l))))));
} else {
tmp = sqrt(2.0) * (l * sqrt(((U * (n * (-2.0 + (n / (Om / U_42_))))) / Om)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 400000.0d0) then
tmp = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * (l * (l / om)))) + ((n / ((om / l) * (om / l))) * (u_42 - u)))))
else if (l <= 1.3d+147) then
tmp = sqrt(((2.0d0 * n) * ((u * t) + (((n / (om / (u_42 - u))) - 2.0d0) / ((om / u) / (l * l))))))
else
tmp = sqrt(2.0d0) * (l * sqrt(((u * (n * ((-2.0d0) + (n / (om / u_42))))) / om)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 400000.0) {
tmp = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
} else if (l <= 1.3e+147) {
tmp = Math.sqrt(((2.0 * n) * ((U * t) + (((n / (Om / (U_42_ - U))) - 2.0) / ((Om / U) / (l * l))))));
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt(((U * (n * (-2.0 + (n / (Om / U_42_))))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 400000.0: tmp = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U))))) elif l <= 1.3e+147: tmp = math.sqrt(((2.0 * n) * ((U * t) + (((n / (Om / (U_42_ - U))) - 2.0) / ((Om / U) / (l * l)))))) else: tmp = math.sqrt(2.0) * (l * math.sqrt(((U * (n * (-2.0 + (n / (Om / U_42_))))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 400000.0) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + Float64(Float64(n / Float64(Float64(Om / l) * Float64(Om / l))) * Float64(U_42_ - U))))); elseif (l <= 1.3e+147) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(U * t) + Float64(Float64(Float64(n / Float64(Om / Float64(U_42_ - U))) - 2.0) / Float64(Float64(Om / U) / Float64(l * l)))))); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(Float64(U * Float64(n * Float64(-2.0 + Float64(n / Float64(Om / U_42_))))) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 400000.0) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U))))); elseif (l <= 1.3e+147) tmp = sqrt(((2.0 * n) * ((U * t) + (((n / (Om / (U_42_ - U))) - 2.0) / ((Om / U) / (l * l)))))); else tmp = sqrt(2.0) * (l * sqrt(((U * (n * (-2.0 + (n / (Om / U_42_))))) / Om))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 400000.0], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n / N[(N[(Om / l), $MachinePrecision] * N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.3e+147], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(U * t), $MachinePrecision] + N[(N[(N[(n / N[(Om / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision] / N[(N[(Om / U), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(N[(U * N[(n * N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 400000:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.3 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t + \frac{\frac{n}{\frac{Om}{U* - U}} - 2}{\frac{\frac{Om}{U}}{\ell \cdot \ell}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{U \cdot \left(n \cdot \left(-2 + \frac{n}{\frac{Om}{U*}}\right)\right)}{Om}}\right)\\
\end{array}
\end{array}
if l < 4e5Initial program 56.7%
Taylor expanded in n around 0 47.1%
associate-/l*47.9%
unpow247.9%
unpow247.9%
Simplified47.9%
*-un-lft-identity47.9%
times-frac56.7%
Applied egg-rr56.7%
*-lft-identity56.7%
Simplified56.7%
associate-/l*60.1%
associate-/r/60.1%
Applied egg-rr60.1%
if 4e5 < l < 1.2999999999999999e147Initial program 56.6%
Simplified81.2%
Taylor expanded in l around -inf 73.2%
mul-1-neg73.2%
unsub-neg73.2%
*-commutative73.2%
associate-/l*73.1%
mul-1-neg73.1%
unsub-neg73.1%
associate-/l*73.0%
*-commutative73.0%
associate-/r*77.4%
unpow277.4%
Simplified77.4%
if 1.2999999999999999e147 < l Initial program 15.8%
Simplified47.8%
Taylor expanded in t around inf 33.4%
Taylor expanded in U* around inf 34.0%
Taylor expanded in l around inf 70.1%
associate-*l*70.2%
associate-*r*70.1%
sub-neg70.1%
associate-/l*70.1%
metadata-eval70.1%
Simplified70.1%
Final simplification62.8%
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 (* (/ Om l) (/ Om l))) (- U* U)))))))
(if (<= U -1.2e-33)
t_1
(if (<= U 2.3e-178)
(pow
(*
2.0
(+
(* n (* U t))
(/ (+ (/ n (/ Om (* l U*))) (* l -2.0)) (/ Om (* n (* U l))))))
0.5)
(if (<= U 3.2e-99)
t_1
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) 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 / ((Om / l) * (Om / l))) * (U_42_ - U)))));
double tmp;
if (U <= -1.2e-33) {
tmp = t_1;
} else if (U <= 2.3e-178) {
tmp = pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
} else if (U <= 3.2e-99) {
tmp = t_1;
} else {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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 / ((om / l) * (om / l))) * (u_42 - u)))))
if (u <= (-1.2d-33)) then
tmp = t_1
else if (u <= 2.3d-178) then
tmp = (2.0d0 * ((n * (u * t)) + (((n / (om / (l * u_42))) + (l * (-2.0d0))) / (om / (n * (u * l)))))) ** 0.5d0
else if (u <= 3.2d-99) then
tmp = t_1
else
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / 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 / ((Om / l) * (Om / l))) * (U_42_ - U)))));
double tmp;
if (U <= -1.2e-33) {
tmp = t_1;
} else if (U <= 2.3e-178) {
tmp = Math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
} else if (U <= 3.2e-99) {
tmp = t_1;
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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 / ((Om / l) * (Om / l))) * (U_42_ - U))))) tmp = 0 if U <= -1.2e-33: tmp = t_1 elif U <= 2.3e-178: tmp = math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5) elif U <= 3.2e-99: tmp = t_1 else: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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(l * Float64(l / Om)))) + Float64(Float64(n / Float64(Float64(Om / l) * Float64(Om / l))) * Float64(U_42_ - U))))) tmp = 0.0 if (U <= -1.2e-33) tmp = t_1; elseif (U <= 2.3e-178) tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(n / Float64(Om / Float64(l * U_42_))) + Float64(l * -2.0)) / Float64(Om / Float64(n * Float64(U * l)))))) ^ 0.5; elseif (U <= 3.2e-99) tmp = t_1; else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); 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 / ((Om / l) * (Om / l))) * (U_42_ - U))))); tmp = 0.0; if (U <= -1.2e-33) tmp = t_1; elseif (U <= 2.3e-178) tmp = (2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))) ^ 0.5; elseif (U <= 3.2e-99) tmp = t_1; else tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n / N[(N[(Om / l), $MachinePrecision] * N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[U, -1.2e-33], t$95$1, If[LessEqual[U, 2.3e-178], N[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(n / N[(Om / N[(l * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[U, 3.2e-99], t$95$1, N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\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 \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;U \leq -1.2 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;U \leq 2.3 \cdot 10^{-178}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{n}{\frac{Om}{\ell \cdot U*}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\
\mathbf{elif}\;U \leq 3.2 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if U < -1.2e-33 or 2.29999999999999994e-178 < U < 3.2000000000000001e-99Initial program 56.4%
Taylor expanded in n around 0 46.5%
associate-/l*47.9%
unpow247.9%
unpow247.9%
Simplified47.9%
*-un-lft-identity47.9%
times-frac56.4%
Applied egg-rr56.4%
*-lft-identity56.4%
Simplified56.4%
associate-/l*65.2%
associate-/r/65.2%
Applied egg-rr65.2%
if -1.2e-33 < U < 2.29999999999999994e-178Initial program 44.6%
Simplified59.1%
Taylor expanded in t around inf 63.1%
Taylor expanded in U* around inf 63.1%
pow1/263.1%
distribute-lft-out63.1%
associate-/l*64.2%
associate-/l*62.3%
*-commutative62.3%
*-commutative62.3%
Applied egg-rr62.3%
if 3.2000000000000001e-99 < U Initial program 56.6%
Simplified56.8%
Taylor expanded in U around 0 64.2%
Final simplification63.8%
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 (* (/ Om l) (/ Om l))) (- U* U))))))
(t_2 (+ (* l -2.0) (/ (* n (* l U*)) Om))))
(if (<= U -1.7e-36)
t_1
(if (<= U 1.25e-211)
(sqrt (+ (* 2.0 (* n (* U t))) (* 2.0 (/ (* (* n (* U l)) t_2) Om))))
(if (<= U 1.02e-99)
t_1
(sqrt (* (* 2.0 n) (* U (+ t (/ (* l t_2) 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 / ((Om / l) * (Om / l))) * (U_42_ - U)))));
double t_2 = (l * -2.0) + ((n * (l * U_42_)) / Om);
double tmp;
if (U <= -1.7e-36) {
tmp = t_1;
} else if (U <= 1.25e-211) {
tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * t_2) / Om))));
} else if (U <= 1.02e-99) {
tmp = t_1;
} else {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * t_2) / Om)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * (l * (l / om)))) + ((n / ((om / l) * (om / l))) * (u_42 - u)))))
t_2 = (l * (-2.0d0)) + ((n * (l * u_42)) / om)
if (u <= (-1.7d-36)) then
tmp = t_1
else if (u <= 1.25d-211) then
tmp = sqrt(((2.0d0 * (n * (u * t))) + (2.0d0 * (((n * (u * l)) * t_2) / om))))
else if (u <= 1.02d-99) then
tmp = t_1
else
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * t_2) / 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 / ((Om / l) * (Om / l))) * (U_42_ - U)))));
double t_2 = (l * -2.0) + ((n * (l * U_42_)) / Om);
double tmp;
if (U <= -1.7e-36) {
tmp = t_1;
} else if (U <= 1.25e-211) {
tmp = Math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * t_2) / Om))));
} else if (U <= 1.02e-99) {
tmp = t_1;
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * t_2) / 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 / ((Om / l) * (Om / l))) * (U_42_ - U))))) t_2 = (l * -2.0) + ((n * (l * U_42_)) / Om) tmp = 0 if U <= -1.7e-36: tmp = t_1 elif U <= 1.25e-211: tmp = math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * t_2) / Om)))) elif U <= 1.02e-99: tmp = t_1 else: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * t_2) / 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(l * Float64(l / Om)))) + Float64(Float64(n / Float64(Float64(Om / l) * Float64(Om / l))) * Float64(U_42_ - U))))) t_2 = Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om)) tmp = 0.0 if (U <= -1.7e-36) tmp = t_1; elseif (U <= 1.25e-211) tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(Float64(n * Float64(U * l)) * t_2) / Om)))); elseif (U <= 1.02e-99) tmp = t_1; else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * t_2) / 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 / ((Om / l) * (Om / l))) * (U_42_ - U))))); t_2 = (l * -2.0) + ((n * (l * U_42_)) / Om); tmp = 0.0; if (U <= -1.7e-36) tmp = t_1; elseif (U <= 1.25e-211) tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * t_2) / Om)))); elseif (U <= 1.02e-99) tmp = t_1; else tmp = sqrt(((2.0 * n) * (U * (t + ((l * t_2) / 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[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n / N[(N[(Om / l), $MachinePrecision] * N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[U, -1.7e-36], t$95$1, If[LessEqual[U, 1.25e-211], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 1.02e-99], t$95$1, N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * t$95$2), $MachinePrecision] / Om), $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 \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\
t_2 := \ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\\
\mathbf{if}\;U \leq -1.7 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;U \leq 1.25 \cdot 10^{-211}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot t_2}{Om}}\\
\mathbf{elif}\;U \leq 1.02 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot t_2}{Om}\right)\right)}\\
\end{array}
\end{array}
if U < -1.7000000000000001e-36 or 1.2500000000000001e-211 < U < 1.02e-99Initial program 54.4%
Taylor expanded in n around 0 44.6%
associate-/l*45.7%
unpow245.7%
unpow245.7%
Simplified45.7%
*-un-lft-identity45.7%
times-frac54.5%
Applied egg-rr54.5%
*-lft-identity54.5%
Simplified54.5%
associate-/l*64.4%
associate-/r/64.4%
Applied egg-rr64.4%
if -1.7000000000000001e-36 < U < 1.2500000000000001e-211Initial program 45.1%
Simplified57.2%
Taylor expanded in t around inf 63.9%
Taylor expanded in U* around inf 63.9%
if 1.02e-99 < U Initial program 56.6%
Simplified56.8%
Taylor expanded in U around 0 64.2%
Final simplification64.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))))
(* (/ n (* (/ Om l) (/ Om l))) (- U* U)))))))
(if (<= U -3.7e-34)
t_1
(if (<= U 4.8e-216)
(sqrt
(+
(* 2.0 (* n (* U t)))
(*
2.0
(/
(* (+ (/ (* n (* l (- U* U))) Om) (* l -2.0)) (* n (* U l)))
Om))))
(if (<= U 2.65e-99)
t_1
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) 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 / ((Om / l) * (Om / l))) * (U_42_ - U)))));
double tmp;
if (U <= -3.7e-34) {
tmp = t_1;
} else if (U <= 4.8e-216) {
tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (n * (U * l))) / Om))));
} else if (U <= 2.65e-99) {
tmp = t_1;
} else {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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 / ((om / l) * (om / l))) * (u_42 - u)))))
if (u <= (-3.7d-34)) then
tmp = t_1
else if (u <= 4.8d-216) then
tmp = sqrt(((2.0d0 * (n * (u * t))) + (2.0d0 * (((((n * (l * (u_42 - u))) / om) + (l * (-2.0d0))) * (n * (u * l))) / om))))
else if (u <= 2.65d-99) then
tmp = t_1
else
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / 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 / ((Om / l) * (Om / l))) * (U_42_ - U)))));
double tmp;
if (U <= -3.7e-34) {
tmp = t_1;
} else if (U <= 4.8e-216) {
tmp = Math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (n * (U * l))) / Om))));
} else if (U <= 2.65e-99) {
tmp = t_1;
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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 / ((Om / l) * (Om / l))) * (U_42_ - U))))) tmp = 0 if U <= -3.7e-34: tmp = t_1 elif U <= 4.8e-216: tmp = math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (n * (U * l))) / Om)))) elif U <= 2.65e-99: tmp = t_1 else: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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(l * Float64(l / Om)))) + Float64(Float64(n / Float64(Float64(Om / l) * Float64(Om / l))) * Float64(U_42_ - U))))) tmp = 0.0 if (U <= -3.7e-34) tmp = t_1; elseif (U <= 4.8e-216) tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(Float64(Float64(Float64(n * Float64(l * Float64(U_42_ - U))) / Om) + Float64(l * -2.0)) * Float64(n * Float64(U * l))) / Om)))); elseif (U <= 2.65e-99) tmp = t_1; else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); 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 / ((Om / l) * (Om / l))) * (U_42_ - U))))); tmp = 0.0; if (U <= -3.7e-34) tmp = t_1; elseif (U <= 4.8e-216) tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (n * (U * l))) / Om)))); elseif (U <= 2.65e-99) tmp = t_1; else tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n / N[(N[(Om / l), $MachinePrecision] * N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[U, -3.7e-34], t$95$1, If[LessEqual[U, 4.8e-216], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(N[(N[(N[(n * N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 2.65e-99], t$95$1, N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\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 \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;U \leq -3.7 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;U \leq 4.8 \cdot 10^{-216}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(\frac{n \cdot \left(\ell \cdot \left(U* - U\right)\right)}{Om} + \ell \cdot -2\right) \cdot \left(n \cdot \left(U \cdot \ell\right)\right)}{Om}}\\
\mathbf{elif}\;U \leq 2.65 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if U < -3.69999999999999988e-34 or 4.80000000000000007e-216 < U < 2.6500000000000002e-99Initial program 54.4%
Taylor expanded in n around 0 44.6%
associate-/l*45.7%
unpow245.7%
unpow245.7%
Simplified45.7%
*-un-lft-identity45.7%
times-frac54.5%
Applied egg-rr54.5%
*-lft-identity54.5%
Simplified54.5%
associate-/l*64.4%
associate-/r/64.4%
Applied egg-rr64.4%
if -3.69999999999999988e-34 < U < 4.80000000000000007e-216Initial program 45.1%
Simplified57.2%
Taylor expanded in t around inf 63.9%
if 2.6500000000000002e-99 < U Initial program 56.6%
Simplified56.8%
Taylor expanded in U around 0 64.2%
Final simplification64.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U -2.5e+162)
(sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0))))
(pow
(*
2.0
(+
(* n (* U t))
(/ (+ (/ n (/ Om (* l U*))) (* l -2.0)) (/ Om (* n (* U l))))))
0.5)))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -2.5e+162) {
tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else {
tmp = pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= (-2.5d+162)) then
tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
else
tmp = (2.0d0 * ((n * (u * t)) + (((n / (om / (l * u_42))) + (l * (-2.0d0))) / (om / (n * (u * l)))))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -2.5e+162) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else {
tmp = Math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -2.5e+162: tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))) else: tmp = math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -2.5e+162) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)))); else tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(n / Float64(Om / Float64(l * U_42_))) + Float64(l * -2.0)) / Float64(Om / Float64(n * Float64(U * l)))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -2.5e+162) tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))); else tmp = (2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -2.5e+162], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(n / N[(Om / N[(l * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -2.5 \cdot 10^{+162}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{n}{\frac{Om}{\ell \cdot U*}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if U < -2.4999999999999998e162Initial program 54.8%
Taylor expanded in n around 0 48.9%
associate-/l*48.9%
unpow248.9%
unpow248.9%
Simplified48.9%
*-un-lft-identity48.9%
times-frac54.8%
Applied egg-rr54.8%
*-lft-identity54.8%
Simplified54.8%
Taylor expanded in Om around inf 54.8%
unpow254.8%
Simplified54.8%
if -2.4999999999999998e162 < U Initial program 51.8%
Simplified56.7%
Taylor expanded in t around inf 60.1%
Taylor expanded in U* around inf 60.1%
pow1/260.2%
distribute-lft-out60.2%
associate-/l*59.8%
associate-/l*59.0%
*-commutative59.0%
*-commutative59.0%
Applied egg-rr59.0%
Final simplification58.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.45e-196)
(sqrt (* 2.0 (* n (* U t))))
(if (<= l 5e+28)
(sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0))))
(if (<= l 1.75e+169)
(sqrt
(* -2.0 (/ (* (* n (+ 2.0 (* (- U U*) (/ n Om)))) (* U (* l l))) Om)))
(if (<= l 1.65e+254)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))
(sqrt
(* -2.0 (/ n (/ Om (* (* l l) (* U (- 2.0 (/ n (/ Om U*))))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.45e-196) {
tmp = sqrt((2.0 * (n * (U * t))));
} else if (l <= 5e+28) {
tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else if (l <= 1.75e+169) {
tmp = sqrt((-2.0 * (((n * (2.0 + ((U - U_42_) * (n / Om)))) * (U * (l * l))) / Om)));
} else if (l <= 1.65e+254) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * (n / (Om / ((l * l) * (U * (2.0 - (n / (Om / U_42_)))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.45d-196) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else if (l <= 5d+28) then
tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
else if (l <= 1.75d+169) then
tmp = sqrt(((-2.0d0) * (((n * (2.0d0 + ((u - u_42) * (n / om)))) * (u * (l * l))) / om)))
else if (l <= 1.65d+254) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt(((-2.0d0) * (n / (om / ((l * l) * (u * (2.0d0 - (n / (om / u_42)))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.45e-196) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else if (l <= 5e+28) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else if (l <= 1.75e+169) {
tmp = Math.sqrt((-2.0 * (((n * (2.0 + ((U - U_42_) * (n / Om)))) * (U * (l * l))) / Om)));
} else if (l <= 1.65e+254) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * (n / (Om / ((l * l) * (U * (2.0 - (n / (Om / U_42_)))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.45e-196: tmp = math.sqrt((2.0 * (n * (U * t)))) elif l <= 5e+28: tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))) elif l <= 1.75e+169: tmp = math.sqrt((-2.0 * (((n * (2.0 + ((U - U_42_) * (n / Om)))) * (U * (l * l))) / Om))) elif l <= 1.65e+254: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * (n / (Om / ((l * l) * (U * (2.0 - (n / (Om / U_42_))))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.45e-196) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); elseif (l <= 5e+28) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)))); elseif (l <= 1.75e+169) tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(n * Float64(2.0 + Float64(Float64(U - U_42_) * Float64(n / Om)))) * Float64(U * Float64(l * l))) / Om))); elseif (l <= 1.65e+254) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Om / Float64(Float64(l * l) * Float64(U * Float64(2.0 - Float64(n / Float64(Om / U_42_))))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.45e-196) tmp = sqrt((2.0 * (n * (U * t)))); elseif (l <= 5e+28) tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))); elseif (l <= 1.75e+169) tmp = sqrt((-2.0 * (((n * (2.0 + ((U - U_42_) * (n / Om)))) * (U * (l * l))) / Om))); elseif (l <= 1.65e+254) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * (n / (Om / ((l * l) * (U * (2.0 - (n / (Om / U_42_))))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.45e-196], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 5e+28], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.75e+169], N[Sqrt[N[(-2.0 * N[(N[(N[(n * N[(2.0 + N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.65e+254], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n / N[(Om / N[(N[(l * l), $MachinePrecision] * N[(U * N[(2.0 - N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.45 \cdot 10^{-196}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 5 \cdot 10^{+28}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\
\mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+169}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{\left(n \cdot \left(2 + \left(U - U*\right) \cdot \frac{n}{Om}\right)\right) \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)}{Om}}\\
\mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+254}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \left(U \cdot \left(2 - \frac{n}{\frac{Om}{U*}}\right)\right)}}}\\
\end{array}
\end{array}
if l < 1.44999999999999994e-196Initial program 51.4%
Simplified50.6%
Taylor expanded in t around inf 40.8%
if 1.44999999999999994e-196 < l < 4.99999999999999957e28Initial program 74.2%
Taylor expanded in n around 0 68.2%
associate-/l*68.3%
unpow268.3%
unpow268.3%
Simplified68.3%
*-un-lft-identity68.3%
times-frac74.2%
Applied egg-rr74.2%
*-lft-identity74.2%
Simplified74.2%
Taylor expanded in Om around inf 63.4%
unpow263.4%
Simplified63.4%
if 4.99999999999999957e28 < l < 1.75000000000000009e169Initial program 43.2%
Simplified74.8%
Taylor expanded in l around -inf 62.2%
unpow262.2%
*-commutative62.2%
mul-1-neg62.2%
Simplified62.2%
Taylor expanded in l around 0 62.2%
associate-*r*62.2%
associate-/l*57.8%
associate-/r/62.2%
*-commutative62.2%
unpow262.2%
Simplified62.2%
if 1.75000000000000009e169 < l < 1.64999999999999996e254Initial program 2.8%
associate-*l*2.8%
sub-neg2.8%
associate-+l-2.8%
sub-neg2.8%
associate-/l*31.7%
remove-double-neg31.7%
associate-*l*31.1%
Simplified31.1%
Taylor expanded in Om around inf 3.7%
unpow23.7%
associate-*r/32.2%
Simplified32.2%
if 1.64999999999999996e254 < l Initial program 45.0%
Simplified68.7%
Taylor expanded in l around -inf 68.7%
unpow268.7%
*-commutative68.7%
mul-1-neg68.7%
Simplified68.7%
Taylor expanded in U around 0 68.7%
associate-/l*68.7%
unpow268.7%
*-commutative68.7%
associate-/l*68.7%
Simplified68.7%
Final simplification47.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.1e-198)
(sqrt (* 2.0 (* n (* U t))))
(if (<= l 3.2e+29)
(sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0))))
(sqrt
(*
2.0
(/ (* n (* (+ (/ (* n (* l (- U* U))) Om) (* l -2.0)) (* U l))) Om))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.1e-198) {
tmp = sqrt((2.0 * (n * (U * t))));
} else if (l <= 3.2e+29) {
tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else {
tmp = sqrt((2.0 * ((n * ((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (U * 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 <= 4.1d-198) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else if (l <= 3.2d+29) then
tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
else
tmp = sqrt((2.0d0 * ((n * ((((n * (l * (u_42 - u))) / om) + (l * (-2.0d0))) * (u * 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 <= 4.1e-198) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else if (l <= 3.2e+29) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else {
tmp = Math.sqrt((2.0 * ((n * ((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (U * l))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.1e-198: tmp = math.sqrt((2.0 * (n * (U * t)))) elif l <= 3.2e+29: tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))) else: tmp = math.sqrt((2.0 * ((n * ((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (U * l))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.1e-198) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); elseif (l <= 3.2e+29) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(Float64(Float64(Float64(n * Float64(l * Float64(U_42_ - U))) / Om) + Float64(l * -2.0)) * Float64(U * 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 <= 4.1e-198) tmp = sqrt((2.0 * (n * (U * t)))); elseif (l <= 3.2e+29) tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))); else tmp = sqrt((2.0 * ((n * ((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (U * 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, 4.1e-198], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.2e+29], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(N[(N[(N[(n * N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.1 \cdot 10^{-198}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 3.2 \cdot 10^{+29}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\left(\frac{n \cdot \left(\ell \cdot \left(U* - U\right)\right)}{Om} + \ell \cdot -2\right) \cdot \left(U \cdot \ell\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 4.10000000000000012e-198Initial program 51.4%
Simplified50.6%
Taylor expanded in t around inf 40.8%
if 4.10000000000000012e-198 < l < 3.19999999999999987e29Initial program 74.2%
Taylor expanded in n around 0 68.2%
associate-/l*68.3%
unpow268.3%
unpow268.3%
Simplified68.3%
*-un-lft-identity68.3%
times-frac74.2%
Applied egg-rr74.2%
*-lft-identity74.2%
Simplified74.2%
Taylor expanded in Om around inf 63.4%
unpow263.4%
Simplified63.4%
if 3.19999999999999987e29 < l Initial program 29.2%
Simplified60.8%
Taylor expanded in t around 0 48.4%
Final simplification47.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U -5e-9)
(sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0))))
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -5e-9) {
tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= (-5d-9)) then
tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -5e-9) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -5e-9: tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -5e-9) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -5e-9) tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))); else tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -5e-9], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -5 \cdot 10^{-9}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if U < -5.0000000000000001e-9Initial program 56.6%
Taylor expanded in n around 0 46.5%
associate-/l*46.5%
unpow246.5%
unpow246.5%
Simplified46.5%
*-un-lft-identity46.5%
times-frac56.6%
Applied egg-rr56.6%
*-lft-identity56.6%
Simplified56.6%
Taylor expanded in Om around inf 51.5%
unpow251.5%
Simplified51.5%
if -5.0000000000000001e-9 < U Initial program 50.8%
Simplified57.4%
Taylor expanded in U around 0 57.5%
Final simplification56.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 7e-199)
(sqrt (* 2.0 (* n (* U t))))
(if (<= l 1.02e+61)
(sqrt (* (* (* 2.0 n) U) t))
(sqrt (* -2.0 (/ (* n (* 2.0 (* U (* 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 <= 7e-199) {
tmp = sqrt((2.0 * (n * (U * t))));
} else if (l <= 1.02e+61) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = sqrt((-2.0 * ((n * (2.0 * (U * (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 <= 7d-199) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else if (l <= 1.02d+61) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = sqrt(((-2.0d0) * ((n * (2.0d0 * (u * (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 <= 7e-199) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else if (l <= 1.02e+61) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.sqrt((-2.0 * ((n * (2.0 * (U * (l * l)))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 7e-199: tmp = math.sqrt((2.0 * (n * (U * t)))) elif l <= 1.02e+61: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.sqrt((-2.0 * ((n * (2.0 * (U * (l * l)))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 7e-199) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); elseif (l <= 1.02e+61) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = sqrt(Float64(-2.0 * Float64(Float64(n * Float64(2.0 * Float64(U * 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 <= 7e-199) tmp = sqrt((2.0 * (n * (U * t)))); elseif (l <= 1.02e+61) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = sqrt((-2.0 * ((n * (2.0 * (U * (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, 7e-199], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.02e+61], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(n * N[(2.0 * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7 \cdot 10^{-199}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.02 \cdot 10^{+61}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n \cdot \left(2 \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 6.9999999999999998e-199Initial program 51.4%
Simplified50.6%
Taylor expanded in t around inf 40.8%
if 6.9999999999999998e-199 < l < 1.01999999999999999e61Initial program 70.2%
Taylor expanded in n around 0 64.7%
associate-/l*64.7%
unpow264.7%
unpow264.7%
Simplified64.7%
*-un-lft-identity64.7%
times-frac70.2%
Applied egg-rr70.2%
*-lft-identity70.2%
Simplified70.2%
Taylor expanded in t around inf 57.0%
if 1.01999999999999999e61 < l Initial program 29.5%
Simplified64.6%
Taylor expanded in l around -inf 44.7%
unpow244.7%
*-commutative44.7%
mul-1-neg44.7%
Simplified44.7%
Taylor expanded in n around 0 30.1%
*-commutative30.1%
unpow230.1%
Simplified30.1%
Final simplification42.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U -1.3e+140) (sqrt (* (* (* 2.0 n) U) t)) (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_) {
double tmp;
if (U <= -1.3e+140) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (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 (u <= (-1.3d+140)) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (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 (U <= -1.3e+140) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -1.3e+140: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -1.3e+140) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -1.3e+140) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (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[U, -1.3e+140], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1.3 \cdot 10^{+140}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if U < -1.3000000000000001e140Initial program 56.5%
Taylor expanded in n around 0 46.7%
associate-/l*46.7%
unpow246.7%
unpow246.7%
Simplified46.7%
*-un-lft-identity46.7%
times-frac56.5%
Applied egg-rr56.5%
*-lft-identity56.5%
Simplified56.5%
Taylor expanded in t around inf 43.8%
if -1.3000000000000001e140 < U Initial program 51.6%
associate-*l*51.7%
sub-neg51.7%
associate-+l-51.7%
sub-neg51.7%
associate-/l*55.9%
remove-double-neg55.9%
associate-*l*55.8%
Simplified55.8%
Taylor expanded in Om around inf 46.1%
unpow246.1%
associate-*r/49.8%
Simplified49.8%
Final simplification49.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U -1.55e+51) (sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0)))) (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_) {
double tmp;
if (U <= -1.55e+51) {
tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (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 (u <= (-1.55d+51)) then
tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (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 (U <= -1.55e+51) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -1.55e+51: tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))) else: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -1.55e+51) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -1.55e+51) tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0)))); else tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (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[U, -1.55e+51], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1.55 \cdot 10^{+51}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if U < -1.55000000000000006e51Initial program 52.2%
Taylor expanded in n around 0 43.7%
associate-/l*43.7%
unpow243.7%
unpow243.7%
Simplified43.7%
*-un-lft-identity43.7%
times-frac52.2%
Applied egg-rr52.2%
*-lft-identity52.2%
Simplified52.2%
Taylor expanded in Om around inf 47.7%
unpow247.7%
Simplified47.7%
if -1.55000000000000006e51 < U Initial program 52.0%
associate-*l*52.5%
sub-neg52.5%
associate-+l-52.5%
sub-neg52.5%
associate-/l*57.1%
remove-double-neg57.1%
associate-*l*57.0%
Simplified57.0%
Taylor expanded in Om around inf 46.4%
unpow246.4%
associate-*r/50.5%
Simplified50.5%
Final simplification50.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= n -1.4e-233) (pow (* 2.0 (* n (* U 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 (n <= -1.4e-233) {
tmp = pow((2.0 * (n * (U * 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 (n <= (-1.4d-233)) then
tmp = (2.0d0 * (n * (u * 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 (n <= -1.4e-233) {
tmp = Math.pow((2.0 * (n * (U * 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 n <= -1.4e-233: tmp = math.pow((2.0 * (n * (U * 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 (n <= -1.4e-233) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -1.4e-233) tmp = (2.0 * (n * (U * 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[n, -1.4e-233], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.4 \cdot 10^{-233}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\end{array}
\end{array}
if n < -1.4000000000000001e-233Initial program 51.7%
Simplified59.9%
Taylor expanded in t around inf 42.7%
pow1/243.7%
Applied egg-rr43.7%
if -1.4000000000000001e-233 < n Initial program 52.2%
Taylor expanded in n around 0 45.5%
associate-/l*45.5%
unpow245.5%
unpow245.5%
Simplified45.5%
*-un-lft-identity45.5%
times-frac52.3%
Applied egg-rr52.3%
*-lft-identity52.3%
Simplified52.3%
Taylor expanded in t around inf 38.0%
Final simplification40.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U -1e-24) (sqrt (* 2.0 (* U (* n t)))) (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 <= -1e-24) {
tmp = sqrt((2.0 * (U * (n * t))));
} 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 <= (-1d-24)) then
tmp = sqrt((2.0d0 * (u * (n * t))))
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 <= -1e-24) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} 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 <= -1e-24: tmp = math.sqrt((2.0 * (U * (n * t)))) 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 <= -1e-24) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); 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 <= -1e-24) tmp = sqrt((2.0 * (U * (n * t)))); 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, -1e-24], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 -1 \cdot 10^{-24}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if U < -9.99999999999999924e-25Initial program 56.3%
Taylor expanded in n around 0 46.6%
associate-/l*46.6%
unpow246.6%
unpow246.6%
Simplified46.6%
Taylor expanded in t around inf 33.4%
associate-*r*41.9%
Simplified41.9%
if -9.99999999999999924e-25 < U Initial program 50.8%
Simplified57.0%
Taylor expanded in t around inf 38.3%
Final simplification39.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= n -3.4e-233) (sqrt (* 2.0 (* n (* U t)))) (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 (n <= -3.4e-233) {
tmp = sqrt((2.0 * (n * (U * t))));
} 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 (n <= (-3.4d-233)) then
tmp = sqrt((2.0d0 * (n * (u * t))))
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 (n <= -3.4e-233) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} 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 n <= -3.4e-233: tmp = math.sqrt((2.0 * (n * (U * t)))) 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 (n <= -3.4e-233) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -3.4e-233) tmp = sqrt((2.0 * (n * (U * t)))); 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[n, -3.4e-233], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -3.4 \cdot 10^{-233}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\end{array}
\end{array}
if n < -3.4000000000000002e-233Initial program 51.7%
Simplified59.9%
Taylor expanded in t around inf 42.7%
if -3.4000000000000002e-233 < n Initial program 52.2%
Taylor expanded in n around 0 45.5%
associate-/l*45.5%
unpow245.5%
unpow245.5%
Simplified45.5%
*-un-lft-identity45.5%
times-frac52.3%
Applied egg-rr52.3%
*-lft-identity52.3%
Simplified52.3%
Taylor expanded in t around inf 38.0%
Final simplification39.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)))))
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 52.0%
Simplified54.3%
Taylor expanded in t around inf 37.2%
Final simplification37.2%
herbie shell --seed 2023255
(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*))))))