
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (- U* U)))
(t_2
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_2 5e-309)
(sqrt
(* (* 2.0 n) (* U (+ t (* (/ l Om) (fma l -2.0 (* (/ l Om) t_1)))))))
(if (<= t_2 2e+301)
(sqrt t_2)
(* (sqrt 2.0) (* l (sqrt (/ (* n (* U (- (/ t_1 Om) 2.0))) Om))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_2 <= 5e-309) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l / Om) * fma(l, -2.0, ((l / Om) * t_1)))))));
} else if (t_2 <= 2e+301) {
tmp = sqrt(t_2);
} else {
tmp = sqrt(2.0) * (l * sqrt(((n * (U * ((t_1 / Om) - 2.0))) / Om)));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * Float64(U_42_ - U)) t_2 = 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_2 <= 5e-309) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(Float64(l / Om) * t_1))))))); elseif (t_2 <= 2e+301) tmp = sqrt(t_2); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(t_1 / Om) - 2.0))) / Om)))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$2, 5e-309], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(N[(l / Om), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 2e+301], N[Sqrt[t$95$2], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(N[(n * N[(U * N[(N[(t$95$1 / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot \left(U* - U\right)\\
t_2 := \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_2 \leq 5 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot t_1\right)\right)\right)}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\sqrt{t_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{t_1}{Om} - 2\right)\right)}{Om}}\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*)))) < 4.9999999999999995e-309Initial program 18.7%
Simplified47.7%
if 4.9999999999999995e-309 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 2.00000000000000011e301Initial program 99.3%
if 2.00000000000000011e301 < (*.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.6%
Simplified40.8%
Taylor expanded in t around 0 42.0%
Taylor expanded in l around 0 32.4%
Final simplification61.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (- U* U))) (t_2 (- (/ t_1 Om) 2.0)))
(if (<= l 1.35e-6)
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (* l (/ l Om)))) (* (* n (pow (/ l Om) 2.0)) (- U* U)))))
(if (<= l 5.1e+179)
(sqrt
(* (* 2.0 n) (* U (+ t (* (/ l Om) (fma l -2.0 (* (/ l Om) t_1)))))))
(if (<= l 6.4e+240)
(* (sqrt 2.0) (* l (sqrt (/ (* n (* U t_2)) Om))))
(sqrt (* (* 2.0 n) (* (/ l Om) (* t_2 (* U l))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * (U_42_ - U);
double t_2 = (t_1 / Om) - 2.0;
double tmp;
if (l <= 1.35e-6) {
tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
} else if (l <= 5.1e+179) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l / Om) * fma(l, -2.0, ((l / Om) * t_1)))))));
} else if (l <= 6.4e+240) {
tmp = sqrt(2.0) * (l * sqrt(((n * (U * t_2)) / Om)));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * (t_2 * (U * l)))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * Float64(U_42_ - U)) t_2 = Float64(Float64(t_1 / Om) - 2.0) tmp = 0.0 if (l <= 1.35e-6) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))); elseif (l <= 5.1e+179) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(Float64(l / Om) * t_1))))))); elseif (l <= 6.4e+240) tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(Float64(n * Float64(U * t_2)) / Om)))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(t_2 * Float64(U * l))))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 / Om), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[l, 1.35e-6], 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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 5.1e+179], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(N[(l / Om), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 6.4e+240], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(N[(n * N[(U * t$95$2), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(t$95$2 * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot \left(U* - U\right)\\
t_2 := \frac{t_1}{Om} - 2\\
\mathbf{if}\;\ell \leq 1.35 \cdot 10^{-6}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{elif}\;\ell \leq 5.1 \cdot 10^{+179}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot t_1\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 6.4 \cdot 10^{+240}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n \cdot \left(U \cdot t_2\right)}{Om}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(t_2 \cdot \left(U \cdot \ell\right)\right)\right)}\\
\end{array}
\end{array}
if l < 1.34999999999999999e-6Initial program 56.6%
associate-/l*60.1%
associate-/r/60.1%
Applied egg-rr60.1%
if 1.34999999999999999e-6 < l < 5.1000000000000002e179Initial program 67.1%
Simplified70.9%
if 5.1000000000000002e179 < l < 6.39999999999999994e240Initial program 1.7%
Simplified34.5%
Taylor expanded in t around 0 45.9%
Taylor expanded in l around 0 78.3%
if 6.39999999999999994e240 < l Initial program 7.7%
Simplified51.7%
Taylor expanded in t around 0 51.4%
associate-*r*51.4%
associate-*l/51.4%
*-commutative51.4%
+-commutative51.4%
*-commutative51.4%
associate-*r*51.7%
*-commutative51.7%
associate-*r*52.0%
associate-*l/51.7%
fma-udef51.7%
associate-*l/51.7%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in l around 0 86.5%
Final simplification64.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 6.2e-51)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(if (<= l 1.76e+192)
(sqrt
(* (* 2.0 n) (* U (+ t (/ l (/ (/ Om (+ -2.0 (/ n (/ Om U*)))) l))))))
(if (<= l 4.7e+242)
(*
(sqrt 2.0)
(* l (sqrt (/ n (/ Om (* U (- -2.0 (* (- U U*) (/ n Om)))))))))
(sqrt
(*
(* 2.0 n)
(* (/ l Om) (* (- (/ (* n (- U* U)) Om) 2.0) (* U l)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.2e-51) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 1.76e+192) {
tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} else if (l <= 4.7e+242) {
tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 - ((U - U_42_) * (n / Om))))))));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (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 <= 6.2d-51) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else if (l <= 1.76d+192) then
tmp = sqrt(((2.0d0 * n) * (u * (t + (l / ((om / ((-2.0d0) + (n / (om / u_42)))) / l))))))
else if (l <= 4.7d+242) then
tmp = sqrt(2.0d0) * (l * sqrt((n / (om / (u * ((-2.0d0) - ((u - u_42) * (n / om))))))))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * ((((n * (u_42 - u)) / om) - 2.0d0) * (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 <= 6.2e-51) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 1.76e+192) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} else if (l <= 4.7e+242) {
tmp = Math.sqrt(2.0) * (l * Math.sqrt((n / (Om / (U * (-2.0 - ((U - U_42_) * (n / Om))))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (U * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.2e-51: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) elif l <= 1.76e+192: tmp = math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))) elif l <= 4.7e+242: tmp = math.sqrt(2.0) * (l * math.sqrt((n / (Om / (U * (-2.0 - ((U - U_42_) * (n / Om)))))))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (U * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.2e-51) 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))))); elseif (l <= 1.76e+192) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(l / Float64(Float64(Om / Float64(-2.0 + Float64(n / Float64(Om / U_42_)))) / l)))))); elseif (l <= 4.7e+242) tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 - Float64(Float64(U - U_42_) * Float64(n / Om))))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 2.0) * 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 <= 6.2e-51) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); elseif (l <= 1.76e+192) tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))); elseif (l <= 4.7e+242) tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 - ((U - U_42_) * (n / Om)))))))); else tmp = sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (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, 6.2e-51], 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], If[LessEqual[l, 1.76e+192], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(l / N[(N[(Om / N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 4.7e+242], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 - N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.2 \cdot 10^{-51}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.76 \cdot 10^{+192}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{\frac{\frac{Om}{-2 + \frac{n}{\frac{Om}{U*}}}}{\ell}}\right)\right)}\\
\mathbf{elif}\;\ell \leq 4.7 \cdot 10^{+242}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 - \left(U - U*\right) \cdot \frac{n}{Om}\right)}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(\left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right) \cdot \left(U \cdot \ell\right)\right)\right)}\\
\end{array}
\end{array}
if l < 6.1999999999999995e-51Initial program 55.5%
Simplified57.6%
Taylor expanded in U around 0 56.8%
if 6.1999999999999995e-51 < l < 1.76e192Initial program 64.5%
Simplified69.4%
Taylor expanded in U around 0 61.2%
Taylor expanded in l around 0 65.3%
associate-/l*65.4%
unpow265.4%
associate-/l*69.4%
sub-neg69.4%
associate-/l*69.4%
metadata-eval69.4%
Simplified69.4%
if 1.76e192 < l < 4.69999999999999971e242Initial program 1.8%
Simplified27.0%
Taylor expanded in t around 0 33.5%
Taylor expanded in l around 0 80.9%
*-commutative80.9%
associate-/l*73.8%
*-commutative73.8%
sub-neg73.8%
associate-*l/73.8%
*-commutative73.8%
metadata-eval73.8%
Simplified73.8%
if 4.69999999999999971e242 < l Initial program 7.7%
Simplified51.7%
Taylor expanded in t around 0 51.4%
associate-*r*51.4%
associate-*l/51.4%
*-commutative51.4%
+-commutative51.4%
*-commutative51.4%
associate-*r*51.7%
*-commutative51.7%
associate-*r*52.0%
associate-*l/51.7%
fma-udef51.7%
associate-*l/51.7%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in l around 0 86.5%
Final simplification61.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (- (/ (* n (- U* U)) Om) 2.0)))
(if (<= l 5e-51)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(if (<= l 2.25e+181)
(sqrt
(* (* 2.0 n) (* U (+ t (/ l (/ (/ Om (+ -2.0 (/ n (/ Om U*)))) l))))))
(if (<= l 1.66e+239)
(* (sqrt 2.0) (* l (sqrt (/ (* n (* U t_1)) Om))))
(sqrt (* (* 2.0 n) (* (/ l Om) (* t_1 (* U l))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((n * (U_42_ - U)) / Om) - 2.0;
double tmp;
if (l <= 5e-51) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 2.25e+181) {
tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} else if (l <= 1.66e+239) {
tmp = sqrt(2.0) * (l * sqrt(((n * (U * t_1)) / Om)));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * (t_1 * (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 = ((n * (u_42 - u)) / om) - 2.0d0
if (l <= 5d-51) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else if (l <= 2.25d+181) then
tmp = sqrt(((2.0d0 * n) * (u * (t + (l / ((om / ((-2.0d0) + (n / (om / u_42)))) / l))))))
else if (l <= 1.66d+239) then
tmp = sqrt(2.0d0) * (l * sqrt(((n * (u * t_1)) / om)))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * (t_1 * (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 = ((n * (U_42_ - U)) / Om) - 2.0;
double tmp;
if (l <= 5e-51) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 2.25e+181) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} else if (l <= 1.66e+239) {
tmp = Math.sqrt(2.0) * (l * Math.sqrt(((n * (U * t_1)) / Om)));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (t_1 * (U * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = ((n * (U_42_ - U)) / Om) - 2.0 tmp = 0 if l <= 5e-51: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) elif l <= 2.25e+181: tmp = math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))) elif l <= 1.66e+239: tmp = math.sqrt(2.0) * (l * math.sqrt(((n * (U * t_1)) / Om))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (t_1 * (U * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 2.0) tmp = 0.0 if (l <= 5e-51) 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))))); elseif (l <= 2.25e+181) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(l / Float64(Float64(Om / Float64(-2.0 + Float64(n / Float64(Om / U_42_)))) / l)))))); elseif (l <= 1.66e+239) tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(Float64(n * Float64(U * t_1)) / Om)))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(t_1 * Float64(U * l))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = ((n * (U_42_ - U)) / Om) - 2.0; tmp = 0.0; if (l <= 5e-51) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); elseif (l <= 2.25e+181) tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))); elseif (l <= 1.66e+239) tmp = sqrt(2.0) * (l * sqrt(((n * (U * t_1)) / Om))); else tmp = sqrt(((2.0 * n) * ((l / Om) * (t_1 * (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[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[l, 5e-51], 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], If[LessEqual[l, 2.25e+181], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(l / N[(N[(Om / N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.66e+239], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(N[(n * N[(U * t$95$1), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(t$95$1 * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{n \cdot \left(U* - U\right)}{Om} - 2\\
\mathbf{if}\;\ell \leq 5 \cdot 10^{-51}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.25 \cdot 10^{+181}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{\frac{\frac{Om}{-2 + \frac{n}{\frac{Om}{U*}}}}{\ell}}\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.66 \cdot 10^{+239}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n \cdot \left(U \cdot t_1\right)}{Om}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(t_1 \cdot \left(U \cdot \ell\right)\right)\right)}\\
\end{array}
\end{array}
if l < 5.00000000000000004e-51Initial program 55.5%
Simplified57.6%
Taylor expanded in U around 0 56.8%
if 5.00000000000000004e-51 < l < 2.25e181Initial program 68.9%
Simplified69.5%
Taylor expanded in U around 0 62.9%
Taylor expanded in l around 0 67.4%
associate-/l*67.4%
unpow267.4%
associate-/l*69.5%
sub-neg69.5%
associate-/l*69.5%
metadata-eval69.5%
Simplified69.5%
if 2.25e181 < l < 1.6599999999999999e239Initial program 1.7%
Simplified34.5%
Taylor expanded in t around 0 45.9%
Taylor expanded in l around 0 78.3%
if 1.6599999999999999e239 < l Initial program 7.7%
Simplified51.7%
Taylor expanded in t around 0 51.4%
associate-*r*51.4%
associate-*l/51.4%
*-commutative51.4%
+-commutative51.4%
*-commutative51.4%
associate-*r*51.7%
*-commutative51.7%
associate-*r*52.0%
associate-*l/51.7%
fma-udef51.7%
associate-*l/51.7%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in l around 0 86.5%
Final simplification62.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (or (<= U* -1e+30) (not (<= U* 2.6e-142))) (sqrt (* (* 2.0 n) (* U (+ t (/ l (/ (/ Om (+ -2.0 (/ n (/ Om U*)))) l)))))) (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_42_ <= -1e+30) || !(U_42_ <= 2.6e-142)) {
tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} 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_42 <= (-1d+30)) .or. (.not. (u_42 <= 2.6d-142))) then
tmp = sqrt(((2.0d0 * n) * (u * (t + (l / ((om / ((-2.0d0) + (n / (om / u_42)))) / l))))))
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_42_ <= -1e+30) || !(U_42_ <= 2.6e-142)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} 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_42_ <= -1e+30) or not (U_42_ <= 2.6e-142): tmp = math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))) 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_42_ <= -1e+30) || !(U_42_ <= 2.6e-142)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(l / Float64(Float64(Om / Float64(-2.0 + Float64(n / Float64(Om / U_42_)))) / l)))))); else tmp = sqrt(Float64(Float64(Float64(2.0 * n) * 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_42_ <= -1e+30) || ~((U_42_ <= 2.6e-142))) tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))); 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[Or[LessEqual[U$42$, -1e+30], N[Not[LessEqual[U$42$, 2.6e-142]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(l / N[(N[(Om / N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1 \cdot 10^{+30} \lor \neg \left(U* \leq 2.6 \cdot 10^{-142}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{\frac{\frac{Om}{-2 + \frac{n}{\frac{Om}{U*}}}}{\ell}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}\\
\end{array}
\end{array}
if U* < -1e30 or 2.6e-142 < U* Initial program 47.7%
Simplified60.0%
Taylor expanded in U around 0 57.6%
Taylor expanded in l around 0 54.3%
associate-/l*52.3%
unpow252.3%
associate-/l*57.6%
sub-neg57.6%
associate-/l*59.5%
metadata-eval59.5%
Simplified59.5%
if -1e30 < U* < 2.6e-142Initial program 58.3%
associate-/l*63.2%
associate-/r/63.1%
Applied egg-rr63.1%
Taylor expanded in Om around inf 57.5%
*-commutative57.5%
unpow257.5%
associate-*r/62.3%
Simplified62.3%
Final simplification60.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.2e-112)
(sqrt (* (* (* 2.0 n) U) t))
(if (<= l 9.2e+179)
(sqrt
(* (* 2.0 n) (* U (+ t (/ l (/ (/ Om (+ -2.0 (/ n (/ Om U*)))) l))))))
(sqrt
(* (* 2.0 n) (* (/ l Om) (* (- (/ (* n (- U* U)) Om) 2.0) (* U l))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.2e-112) {
tmp = sqrt((((2.0 * n) * U) * t));
} else if (l <= 9.2e+179) {
tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (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 <= 4.2d-112) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else if (l <= 9.2d+179) then
tmp = sqrt(((2.0d0 * n) * (u * (t + (l / ((om / ((-2.0d0) + (n / (om / u_42)))) / l))))))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * ((((n * (u_42 - u)) / om) - 2.0d0) * (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 <= 4.2e-112) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else if (l <= 9.2e+179) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (U * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.2e-112: tmp = math.sqrt((((2.0 * n) * U) * t)) elif l <= 9.2e+179: tmp = math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (U * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.2e-112) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); elseif (l <= 9.2e+179) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(l / Float64(Float64(Om / Float64(-2.0 + Float64(n / Float64(Om / U_42_)))) / l)))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 2.0) * 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 <= 4.2e-112) tmp = sqrt((((2.0 * n) * U) * t)); elseif (l <= 9.2e+179) tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))); else tmp = sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (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, 4.2e-112], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 9.2e+179], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(l / N[(N[(Om / N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.2 \cdot 10^{-112}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{elif}\;\ell \leq 9.2 \cdot 10^{+179}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{\frac{\frac{Om}{-2 + \frac{n}{\frac{Om}{U*}}}}{\ell}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(\left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right) \cdot \left(U \cdot \ell\right)\right)\right)}\\
\end{array}
\end{array}
if l < 4.2000000000000001e-112Initial program 54.7%
associate-/l*58.7%
associate-/r/58.7%
Applied egg-rr58.7%
Taylor expanded in t around inf 42.2%
if 4.2000000000000001e-112 < l < 9.19999999999999976e179Initial program 68.1%
Simplified68.3%
Taylor expanded in U around 0 63.3%
Taylor expanded in l around 0 66.7%
associate-/l*64.9%
unpow264.9%
associate-/l*66.6%
sub-neg66.6%
associate-/l*66.6%
metadata-eval66.6%
Simplified66.6%
if 9.19999999999999976e179 < l Initial program 4.5%
Simplified42.5%
Taylor expanded in t around 0 45.2%
associate-*r*32.4%
associate-*l/32.4%
*-commutative32.4%
+-commutative32.4%
*-commutative32.4%
associate-*r*33.0%
*-commutative33.0%
associate-*r*33.1%
associate-*l/32.9%
fma-udef32.9%
associate-*l/42.5%
associate-*l*68.2%
Simplified68.2%
Taylor expanded in l around 0 68.4%
Final simplification50.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.4e-51)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(if (<= l 3.35e+179)
(sqrt
(* (* 2.0 n) (* U (+ t (/ l (/ (/ Om (+ -2.0 (/ n (/ Om U*)))) l))))))
(sqrt
(* (* 2.0 n) (* (/ l Om) (* (- (/ (* n (- U* U)) Om) 2.0) (* U l))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.4e-51) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 3.35e+179) {
tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (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 <= 4.4d-51) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else if (l <= 3.35d+179) then
tmp = sqrt(((2.0d0 * n) * (u * (t + (l / ((om / ((-2.0d0) + (n / (om / u_42)))) / l))))))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * ((((n * (u_42 - u)) / om) - 2.0d0) * (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 <= 4.4e-51) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 3.35e+179) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (U * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.4e-51: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) elif l <= 3.35e+179: tmp = math.sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (U * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.4e-51) 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))))); elseif (l <= 3.35e+179) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(l / Float64(Float64(Om / Float64(-2.0 + Float64(n / Float64(Om / U_42_)))) / l)))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 2.0) * 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 <= 4.4e-51) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); elseif (l <= 3.35e+179) tmp = sqrt(((2.0 * n) * (U * (t + (l / ((Om / (-2.0 + (n / (Om / U_42_)))) / l)))))); else tmp = sqrt(((2.0 * n) * ((l / Om) * ((((n * (U_42_ - U)) / Om) - 2.0) * (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, 4.4e-51], 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], If[LessEqual[l, 3.35e+179], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(l / N[(N[(Om / N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.4 \cdot 10^{-51}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;\ell \leq 3.35 \cdot 10^{+179}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{\frac{\frac{Om}{-2 + \frac{n}{\frac{Om}{U*}}}}{\ell}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(\left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right) \cdot \left(U \cdot \ell\right)\right)\right)}\\
\end{array}
\end{array}
if l < 4.4e-51Initial program 55.5%
Simplified57.6%
Taylor expanded in U around 0 56.8%
if 4.4e-51 < l < 3.3499999999999999e179Initial program 68.9%
Simplified69.5%
Taylor expanded in U around 0 62.9%
Taylor expanded in l around 0 67.4%
associate-/l*67.4%
unpow267.4%
associate-/l*69.5%
sub-neg69.5%
associate-/l*69.5%
metadata-eval69.5%
Simplified69.5%
if 3.3499999999999999e179 < l Initial program 4.5%
Simplified42.5%
Taylor expanded in t around 0 45.2%
associate-*r*32.4%
associate-*l/32.4%
*-commutative32.4%
+-commutative32.4%
*-commutative32.4%
associate-*r*33.0%
*-commutative33.0%
associate-*r*33.1%
associate-*l/32.9%
fma-udef32.9%
associate-*l/42.5%
associate-*l*68.2%
Simplified68.2%
Taylor expanded in l around 0 68.4%
Final simplification60.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U* -1.22e+150)
(sqrt (* (* 2.0 n) (* (/ l Om) (/ n (/ (/ (/ Om l) U) U*)))))
(if (<= U* 4.2e+127)
(sqrt (* (* (* 2.0 n) U) (+ t (* -2.0 (* l (/ l Om))))))
(sqrt (* (* 2.0 n) (* U (+ t (/ n (/ (* Om Om) (* (* l l) U*))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.22e+150) {
tmp = sqrt(((2.0 * n) * ((l / Om) * (n / (((Om / l) / U) / U_42_)))));
} else if (U_42_ <= 4.2e+127) {
tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_)))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= (-1.22d+150)) then
tmp = sqrt(((2.0d0 * n) * ((l / om) * (n / (((om / l) / u) / u_42)))))
else if (u_42 <= 4.2d+127) then
tmp = sqrt((((2.0d0 * n) * u) * (t + ((-2.0d0) * (l * (l / om))))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t + (n / ((om * om) / ((l * l) * u_42)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.22e+150) {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (n / (((Om / l) / U) / U_42_)))));
} else if (U_42_ <= 4.2e+127) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -1.22e+150: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (n / (((Om / l) / U) / U_42_))))) elif U_42_ <= 4.2e+127: tmp = math.sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om)))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -1.22e+150) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(n / Float64(Float64(Float64(Om / l) / U) / U_42_))))); elseif (U_42_ <= 4.2e+127) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(n / Float64(Float64(Om * Om) / Float64(Float64(l * l) * U_42_))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -1.22e+150) tmp = sqrt(((2.0 * n) * ((l / Om) * (n / (((Om / l) / U) / U_42_))))); elseif (U_42_ <= 4.2e+127) tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om)))))); else tmp = sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, -1.22e+150], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(n / N[(N[(N[(Om / l), $MachinePrecision] / U), $MachinePrecision] / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[U$42$, 4.2e+127], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1.22 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \frac{n}{\frac{\frac{\frac{Om}{\ell}}{U}}{U*}}\right)}\\
\mathbf{elif}\;U* \leq 4.2 \cdot 10^{+127}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{n}{\frac{Om \cdot Om}{\left(\ell \cdot \ell\right) \cdot U*}}\right)\right)}\\
\end{array}
\end{array}
if U* < -1.22e150Initial program 33.7%
Simplified57.7%
Taylor expanded in t around 0 39.6%
associate-*r*42.4%
associate-*l/39.8%
*-commutative39.8%
+-commutative39.8%
*-commutative39.8%
associate-*r*40.0%
*-commutative40.0%
associate-*r*37.5%
associate-*l/40.1%
fma-udef40.1%
associate-*l/42.6%
associate-*l*50.1%
Simplified50.1%
Taylor expanded in U* around inf 47.2%
associate-/l*47.2%
*-commutative47.2%
associate-*r*44.6%
associate-/r*44.8%
associate-/r*47.4%
Simplified47.4%
if -1.22e150 < U* < 4.19999999999999983e127Initial program 54.8%
associate-/l*59.9%
associate-/r/59.9%
Applied egg-rr59.9%
Taylor expanded in Om around inf 51.5%
*-commutative51.5%
unpow251.5%
associate-*r/56.0%
Simplified56.0%
if 4.19999999999999983e127 < U* Initial program 55.7%
Simplified59.5%
Taylor expanded in U around 0 64.1%
Taylor expanded in n around inf 55.8%
associate-/l*55.7%
unpow255.7%
*-commutative55.7%
unpow255.7%
Simplified55.7%
Final simplification54.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U* -1.22e+150)
(sqrt (* (* 2.0 n) (* (/ l Om) (/ (* (* n l) (* U (- U* U))) Om))))
(if (<= U* 1.4e+127)
(sqrt (* (* (* 2.0 n) U) (+ t (* -2.0 (* l (/ l Om))))))
(sqrt (* (* 2.0 n) (* U (+ t (/ n (/ (* Om Om) (* (* l l) U*))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.22e+150) {
tmp = sqrt(((2.0 * n) * ((l / Om) * (((n * l) * (U * (U_42_ - U))) / Om))));
} else if (U_42_ <= 1.4e+127) {
tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_)))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= (-1.22d+150)) then
tmp = sqrt(((2.0d0 * n) * ((l / om) * (((n * l) * (u * (u_42 - u))) / om))))
else if (u_42 <= 1.4d+127) then
tmp = sqrt((((2.0d0 * n) * u) * (t + ((-2.0d0) * (l * (l / om))))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t + (n / ((om * om) / ((l * l) * u_42)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.22e+150) {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (((n * l) * (U * (U_42_ - U))) / Om))));
} else if (U_42_ <= 1.4e+127) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -1.22e+150: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (((n * l) * (U * (U_42_ - U))) / Om)))) elif U_42_ <= 1.4e+127: tmp = math.sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om)))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -1.22e+150) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(Float64(Float64(n * l) * Float64(U * Float64(U_42_ - U))) / Om)))); elseif (U_42_ <= 1.4e+127) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(n / Float64(Float64(Om * Om) / Float64(Float64(l * l) * U_42_))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -1.22e+150) tmp = sqrt(((2.0 * n) * ((l / Om) * (((n * l) * (U * (U_42_ - U))) / Om)))); elseif (U_42_ <= 1.4e+127) tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om)))))); else tmp = sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, -1.22e+150], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(n * l), $MachinePrecision] * N[(U * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[U$42$, 1.4e+127], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1.22 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \frac{\left(n \cdot \ell\right) \cdot \left(U \cdot \left(U* - U\right)\right)}{Om}\right)}\\
\mathbf{elif}\;U* \leq 1.4 \cdot 10^{+127}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{n}{\frac{Om \cdot Om}{\left(\ell \cdot \ell\right) \cdot U*}}\right)\right)}\\
\end{array}
\end{array}
if U* < -1.22e150Initial program 33.7%
Simplified57.7%
Taylor expanded in t around 0 39.6%
associate-*r*42.4%
associate-*l/39.8%
*-commutative39.8%
+-commutative39.8%
*-commutative39.8%
associate-*r*40.0%
*-commutative40.0%
associate-*r*37.5%
associate-*l/40.1%
fma-udef40.1%
associate-*l/42.6%
associate-*l*50.1%
Simplified50.1%
Taylor expanded in n around inf 47.2%
associate-*r*49.7%
*-commutative49.7%
Simplified49.7%
if -1.22e150 < U* < 1.4000000000000001e127Initial program 54.8%
associate-/l*59.9%
associate-/r/59.9%
Applied egg-rr59.9%
Taylor expanded in Om around inf 51.5%
*-commutative51.5%
unpow251.5%
associate-*r/56.0%
Simplified56.0%
if 1.4000000000000001e127 < U* Initial program 55.7%
Simplified59.5%
Taylor expanded in U around 0 64.1%
Taylor expanded in n around inf 55.8%
associate-/l*55.7%
unpow255.7%
*-commutative55.7%
unpow255.7%
Simplified55.7%
Final simplification55.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 3.5e+54)
(pow (* 2.0 (* n (* U t))) 0.5)
(if (<= l 7.2e+103)
(sqrt (* (* 2.0 n) (* -2.0 (/ (* l l) (/ Om U)))))
(if (<= l 9.5e+120)
(sqrt (* (* (* 2.0 n) U) t))
(sqrt (* (* 2.0 n) (* (/ l Om) (* U (* l -2.0)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 3.5e+54) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else if (l <= 7.2e+103) {
tmp = sqrt(((2.0 * n) * (-2.0 * ((l * l) / (Om / U)))));
} else if (l <= 9.5e+120) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 3.5d+54) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else if (l <= 7.2d+103) then
tmp = sqrt(((2.0d0 * n) * ((-2.0d0) * ((l * l) / (om / u)))))
else if (l <= 9.5d+120) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * (u * (l * (-2.0d0))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 3.5e+54) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else if (l <= 7.2e+103) {
tmp = Math.sqrt(((2.0 * n) * (-2.0 * ((l * l) / (Om / U)))));
} else if (l <= 9.5e+120) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 3.5e+54: tmp = math.pow((2.0 * (n * (U * t))), 0.5) elif l <= 7.2e+103: tmp = math.sqrt(((2.0 * n) * (-2.0 * ((l * l) / (Om / U))))) elif l <= 9.5e+120: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 3.5e+54) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; elseif (l <= 7.2e+103) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(-2.0 * Float64(Float64(l * l) / Float64(Om / U))))); elseif (l <= 9.5e+120) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(U * Float64(l * -2.0))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 3.5e+54) tmp = (2.0 * (n * (U * t))) ^ 0.5; elseif (l <= 7.2e+103) tmp = sqrt(((2.0 * n) * (-2.0 * ((l * l) / (Om / U))))); elseif (l <= 9.5e+120) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 3.5e+54], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 7.2e+103], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(-2.0 * N[(N[(l * l), $MachinePrecision] / N[(Om / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 9.5e+120], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(U * N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.5 \cdot 10^{+54}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 7.2 \cdot 10^{+103}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(-2 \cdot \frac{\ell \cdot \ell}{\frac{Om}{U}}\right)}\\
\mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+120}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(\ell \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if l < 3.5000000000000001e54Initial program 57.4%
Simplified58.9%
Taylor expanded in t around inf 41.5%
pow1/243.5%
associate-*l*43.5%
*-commutative43.5%
Applied egg-rr43.5%
if 3.5000000000000001e54 < l < 7.20000000000000033e103Initial program 56.6%
Simplified57.0%
Taylor expanded in l around -inf 42.6%
associate-*r/42.6%
mul-1-neg42.6%
mul-1-neg42.6%
unsub-neg42.6%
associate-/l*42.6%
*-commutative42.6%
unpow242.6%
Simplified42.6%
Taylor expanded in n around 0 30.1%
associate-/l*30.1%
unpow230.1%
Simplified30.1%
if 7.20000000000000033e103 < l < 9.5e120Initial program 100.0%
associate-/l*100.0%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 100.0%
if 9.5e120 < l Initial program 14.7%
Simplified50.8%
Taylor expanded in t around 0 47.9%
associate-*r*37.4%
associate-*l/38.6%
*-commutative38.6%
+-commutative38.6%
*-commutative38.6%
associate-*r*39.0%
*-commutative39.0%
associate-*r*39.1%
associate-*l/39.0%
fma-udef39.0%
associate-*l/46.9%
associate-*l*67.6%
Simplified67.6%
Taylor expanded in n around 0 40.4%
*-commutative40.4%
Simplified40.4%
Final simplification43.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.9e+153) (sqrt (* (* 2.0 n) (* U (+ t (/ (* (* l l) -2.0) Om))))) (sqrt (* (* 2.0 n) (* (/ l Om) (* U (* l -2.0)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.9e+153) {
tmp = sqrt(((2.0 * n) * (U * (t + (((l * l) * -2.0) / Om)))));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 2.9d+153) then
tmp = sqrt(((2.0d0 * n) * (u * (t + (((l * l) * (-2.0d0)) / om)))))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * (u * (l * (-2.0d0))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.9e+153) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (((l * l) * -2.0) / Om)))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.9e+153: tmp = math.sqrt(((2.0 * n) * (U * (t + (((l * l) * -2.0) / Om))))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.9e+153) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(Float64(l * l) * -2.0) / Om))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(U * Float64(l * -2.0))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.9e+153) tmp = sqrt(((2.0 * n) * (U * (t + (((l * l) * -2.0) / Om))))); else tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.9e+153], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(N[(l * l), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(U * N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.9 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(\ell \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if l < 2.90000000000000002e153Initial program 58.2%
Simplified59.6%
Taylor expanded in n around 0 48.5%
*-commutative48.5%
associate-*r/48.5%
unpow248.5%
Simplified48.5%
if 2.90000000000000002e153 < l Initial program 7.4%
Simplified46.1%
Taylor expanded in t around 0 45.7%
associate-*r*33.6%
associate-*l/33.6%
*-commutative33.6%
+-commutative33.6%
*-commutative33.6%
associate-*r*34.1%
*-commutative34.1%
associate-*r*34.2%
associate-*l/34.1%
fma-udef34.1%
associate-*l/43.2%
associate-*l*67.2%
Simplified67.2%
Taylor expanded in n around 0 38.8%
*-commutative38.8%
Simplified38.8%
Final simplification47.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.8e+180) (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om))))))) (sqrt (* (* 2.0 n) (* (/ l Om) (* U (* l -2.0)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.8e+180) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.8d+180) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * (u * (l * (-2.0d0))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.8e+180) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.8e+180: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.8e+180) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(U * Float64(l * -2.0))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.8e+180) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); else tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.8e+180], 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[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(U * N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.8 \cdot 10^{+180}:\\
\;\;\;\;\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{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(\ell \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if l < 1.8000000000000001e180Initial program 58.1%
associate-*l*56.5%
sub-neg56.5%
associate-+l-56.5%
sub-neg56.5%
associate-/l*60.0%
remove-double-neg60.0%
associate-*l*58.7%
Simplified58.7%
Taylor expanded in Om around inf 48.5%
unpow248.5%
associate-*r/51.5%
Simplified51.5%
if 1.8000000000000001e180 < l Initial program 4.5%
Simplified42.5%
Taylor expanded in t around 0 45.2%
associate-*r*32.4%
associate-*l/32.4%
*-commutative32.4%
+-commutative32.4%
*-commutative32.4%
associate-*r*33.0%
*-commutative33.0%
associate-*r*33.1%
associate-*l/32.9%
fma-udef32.9%
associate-*l/42.5%
associate-*l*68.2%
Simplified68.2%
Taylor expanded in n around 0 37.8%
*-commutative37.8%
Simplified37.8%
Final simplification49.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 5.8e+183) (sqrt (* (* (* 2.0 n) U) (+ t (* -2.0 (* l (/ l Om)))))) (sqrt (* (* 2.0 n) (* (/ l Om) (* U (* l -2.0)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.8e+183) {
tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om))))));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 5.8d+183) then
tmp = sqrt((((2.0d0 * n) * u) * (t + ((-2.0d0) * (l * (l / om))))))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * (u * (l * (-2.0d0))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.8e+183) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5.8e+183: tmp = math.sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om)))))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.8e+183) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(U * Float64(l * -2.0))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 5.8e+183) tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * (l * (l / Om)))))); else tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * -2.0))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.8e+183], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(U * N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.8 \cdot 10^{+183}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(\ell \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if l < 5.8000000000000001e183Initial program 58.1%
associate-/l*61.6%
associate-/r/61.6%
Applied egg-rr61.6%
Taylor expanded in Om around inf 49.7%
*-commutative49.7%
unpow249.7%
associate-*r/52.7%
Simplified52.7%
if 5.8000000000000001e183 < l Initial program 4.5%
Simplified42.5%
Taylor expanded in t around 0 45.2%
associate-*r*32.4%
associate-*l/32.4%
*-commutative32.4%
+-commutative32.4%
*-commutative32.4%
associate-*r*33.0%
*-commutative33.0%
associate-*r*33.1%
associate-*l/32.9%
fma-udef32.9%
associate-*l/42.5%
associate-*l*68.2%
Simplified68.2%
Taylor expanded in n around 0 37.8%
*-commutative37.8%
Simplified37.8%
Final simplification51.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 4e+54) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* (* 2.0 n) (* -2.0 (/ (* l l) (/ Om U)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4e+54) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt(((2.0 * n) * (-2.0 * ((l * l) / (Om / U)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4d+54) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((2.0d0 * n) * ((-2.0d0) * ((l * l) / (om / u)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4e+54) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt(((2.0 * n) * (-2.0 * ((l * l) / (Om / U)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4e+54: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt(((2.0 * n) * (-2.0 * ((l * l) / (Om / U))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4e+54) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(-2.0 * Float64(Float64(l * l) / Float64(Om / U))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4e+54) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt(((2.0 * n) * (-2.0 * ((l * l) / (Om / U))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4e+54], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(-2.0 * N[(N[(l * l), $MachinePrecision] / N[(Om / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4 \cdot 10^{+54}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(-2 \cdot \frac{\ell \cdot \ell}{\frac{Om}{U}}\right)}\\
\end{array}
\end{array}
if l < 4.0000000000000003e54Initial program 57.4%
Simplified58.9%
Taylor expanded in t around inf 41.5%
pow1/243.5%
associate-*l*43.5%
*-commutative43.5%
Applied egg-rr43.5%
if 4.0000000000000003e54 < l Initial program 30.1%
Simplified54.0%
Taylor expanded in l around -inf 36.3%
associate-*r/36.3%
mul-1-neg36.3%
mul-1-neg36.3%
unsub-neg36.3%
associate-/l*36.3%
*-commutative36.3%
unpow236.3%
Simplified36.3%
Taylor expanded in n around 0 16.0%
associate-/l*16.5%
unpow216.5%
Simplified16.5%
Final simplification38.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= n -5.2e-276) (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 <= -5.2e-276) {
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 <= (-5.2d-276)) 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 <= -5.2e-276) {
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 <= -5.2e-276: 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 <= -5.2e-276) 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 <= -5.2e-276) 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, -5.2e-276], 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 -5.2 \cdot 10^{-276}:\\
\;\;\;\;{\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 < -5.19999999999999969e-276Initial program 46.3%
Simplified60.4%
Taylor expanded in t around inf 40.0%
pow1/242.6%
associate-*l*42.6%
*-commutative42.6%
Applied egg-rr42.6%
if -5.19999999999999969e-276 < n Initial program 56.4%
associate-/l*59.9%
associate-/r/59.9%
Applied egg-rr59.9%
Taylor expanded in t around inf 38.4%
Final simplification40.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= n -6.6e-276) (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 <= -6.6e-276) {
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 <= (-6.6d-276)) 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 <= -6.6e-276) {
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 <= -6.6e-276: 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 <= -6.6e-276) tmp = sqrt(Float64(Float64(2.0 * 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 <= -6.6e-276) 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, -6.6e-276], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $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 -6.6 \cdot 10^{-276}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\end{array}
\end{array}
if n < -6.59999999999999982e-276Initial program 46.3%
Simplified60.4%
Taylor expanded in t around inf 40.0%
if -6.59999999999999982e-276 < n Initial program 56.4%
associate-/l*59.9%
associate-/r/59.9%
Applied egg-rr59.9%
Taylor expanded in t around inf 38.4%
Final simplification39.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* 2.0 n) (* U t))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((2.0 * n) * (U * t)));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt(((2.0d0 * n) * (u * t)))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt(((2.0 * n) * (U * t)));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * n) * (U * t)))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * t))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * t))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}
\end{array}
Initial program 51.8%
Simplified57.9%
Taylor expanded in t around inf 36.2%
Final simplification36.2%
herbie shell --seed 2023207
(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*))))))