
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(*
(sqrt (* 2.0 n))
(sqrt (* U (+ t (/ (* l (fma -2.0 l (/ n (/ Om (* l U*))))) Om)))))
(if (<= t_1 1e+302)
(sqrt t_1)
(*
(sqrt 2.0)
(* l (sqrt (/ (* n (* U (- (/ (* n U*) 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 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t + ((l * fma(-2.0, l, (n / (Om / (l * U_42_))))) / Om))));
} else if (t_1 <= 1e+302) {
tmp = sqrt(t_1);
} else {
tmp = sqrt(2.0) * (l * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om)));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(Float64(l * fma(-2.0, l, Float64(n / Float64(Om / Float64(l * U_42_))))) / Om))))); elseif (t_1 <= 1e+302) tmp = sqrt(t_1); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * U_42_) / 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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(N[(l * N[(-2.0 * l + N[(n / N[(Om / N[(l * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+302], N[Sqrt[t$95$1], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \frac{\ell \cdot \mathsf{fma}\left(-2, \ell, \frac{n}{\frac{Om}{\ell \cdot U*}}\right)}{Om}\right)}\\
\mathbf{elif}\;t_1 \leq 10^{+302}:\\
\;\;\;\;\sqrt{t_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{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*)))) < 0.0Initial program 3.9%
Simplified46.1%
Taylor expanded in U around 0 47.1%
sqrt-prod51.3%
fma-def51.3%
associate-/l*51.3%
Applied egg-rr51.3%
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*)))) < 1.0000000000000001e302Initial program 97.7%
if 1.0000000000000001e302 < (*.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 14.3%
Simplified34.7%
Taylor expanded in U around 0 26.3%
Taylor expanded in t around 0 31.3%
Taylor expanded in l around 0 25.1%
Final simplification56.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (/ (* n (* l U*)) Om) (* l -2.0))) Om)))))
(if (<= t_1 1e+302)
(sqrt t_1)
(*
(sqrt 2.0)
(* l (sqrt (/ (* n (* U (- (/ (* n U*) 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 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else if (t_1 <= 1e+302) {
tmp = sqrt(t_1);
} else {
tmp = sqrt(2.0) * (l * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))
if (t_1 <= 0.0d0) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * (((n * (l * u_42)) / om) + (l * (-2.0d0)))) / om)))))
else if (t_1 <= 1d+302) then
tmp = sqrt(t_1)
else
tmp = sqrt(2.0d0) * (l * sqrt(((n * (u * (((n * u_42) / om) - 2.0d0))) / om)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else if (t_1 <= 1e+302) {
tmp = Math.sqrt(t_1);
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))) elif t_1 <= 1e+302: tmp = math.sqrt(t_1) else: tmp = math.sqrt(2.0) * (l * math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(Float64(n * Float64(l * U_42_)) / Om) + Float64(l * -2.0))) / Om))))); elseif (t_1 <= 1e+302) tmp = sqrt(t_1); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * U_42_) / Om) - 2.0))) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))); elseif (t_1 <= 1e+302) tmp = sqrt(t_1); else tmp = sqrt(2.0) * (l * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 1e+302], N[Sqrt[t$95$1], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)}{Om}\right)\right)}\\
\mathbf{elif}\;t_1 \leq 10^{+302}:\\
\;\;\;\;\sqrt{t_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{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*)))) < 0.0Initial program 3.9%
Simplified46.1%
Taylor expanded in U around 0 47.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*)))) < 1.0000000000000001e302Initial program 97.7%
if 1.0000000000000001e302 < (*.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 14.3%
Simplified34.7%
Taylor expanded in U around 0 26.3%
Taylor expanded in t around 0 31.3%
Taylor expanded in l around 0 25.1%
Final simplification55.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.2e+99)
(sqrt
(*
(* 2.0 n)
(*
U
(- t (- (* 2.0 (/ l (/ Om l))) (* n (* (pow (/ l Om) 2.0) (- U* U))))))))
(if (<= l 1.66e+173)
(*
(sqrt 2.0)
(* l (sqrt (/ n (/ Om (* U (+ -2.0 (/ n (/ Om (- U* U))))))))))
(if (<= l 2.15e+210)
(sqrt
(*
(* 2.0 n)
(* (* U (/ l Om)) (fma l -2.0 (* (- U* U) (* n (/ l Om)))))))
(*
(* l (sqrt 2.0))
(sqrt (/ (* n (* U (- (/ (* n (- U* U)) Om) 2.0))) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.2e+99) {
tmp = sqrt(((2.0 * n) * (U * (t - ((2.0 * (l / (Om / l))) - (n * (pow((l / Om), 2.0) * (U_42_ - U))))))));
} else if (l <= 1.66e+173) {
tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n / (Om / (U_42_ - U)))))))));
} else if (l <= 2.15e+210) {
tmp = sqrt(((2.0 * n) * ((U * (l / Om)) * fma(l, -2.0, ((U_42_ - U) * (n * (l / Om)))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * (U_42_ - U)) / Om) - 2.0))) / Om));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.2e+99) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(2.0 * Float64(l / Float64(Om / l))) - Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)))))))); elseif (l <= 1.66e+173) tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / Float64(U_42_ - U)))))))))); elseif (l <= 2.15e+210) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(U * Float64(l / Om)) * fma(l, -2.0, Float64(Float64(U_42_ - U) * Float64(n * Float64(l / Om))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * Float64(U_42_ - U)) / 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$_] := If[LessEqual[l, 5.2e+99], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.66e+173], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.15e+210], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(U * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(l * -2.0 + N[(N[(U$42$ - U), $MachinePrecision] * N[(n * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.2 \cdot 10^{+99}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} - n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.66 \cdot 10^{+173}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U* - U}}\right)}}}\right)\\
\mathbf{elif}\;\ell \leq 2.15 \cdot 10^{+210}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\left(U \cdot \frac{\ell}{Om}\right) \cdot \mathsf{fma}\left(\ell, -2, \left(U* - U\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 5.1999999999999999e99Initial program 49.4%
associate-*l*51.5%
sub-neg51.5%
associate-+l-51.5%
sub-neg51.5%
associate-/l*55.4%
remove-double-neg55.4%
associate-*l*55.4%
Simplified55.4%
if 5.1999999999999999e99 < l < 1.66000000000000012e173Initial program 41.5%
Simplified52.0%
Taylor expanded in t around inf 41.7%
distribute-lft-out41.7%
*-commutative41.7%
associate-/l*51.1%
+-commutative51.1%
*-commutative51.1%
associate-*r*51.1%
*-commutative51.1%
associate-*r*51.1%
associate-*l/50.9%
fma-udef50.9%
*-commutative50.9%
Simplified50.9%
Taylor expanded in l around inf 70.5%
associate-*l*70.8%
associate-/l*70.7%
*-commutative70.7%
sub-neg70.7%
associate-/l*80.0%
metadata-eval80.0%
Simplified80.0%
if 1.66000000000000012e173 < l < 2.15e210Initial program 3.6%
Simplified75.5%
Taylor expanded in t around 0 27.3%
associate-*r*2.8%
associate-*l/2.8%
*-commutative2.8%
+-commutative2.8%
*-commutative2.8%
associate-*r*1.8%
*-commutative1.8%
associate-*r*2.8%
associate-*l/3.6%
fma-udef3.6%
associate-*l/52.1%
*-commutative52.1%
associate-*r*75.7%
Simplified76.1%
if 2.15e210 < l Initial program 7.1%
Simplified37.0%
Taylor expanded in t around inf 30.3%
distribute-lft-out30.3%
*-commutative30.3%
associate-/l*40.9%
+-commutative40.9%
*-commutative40.9%
associate-*r*47.1%
*-commutative47.1%
associate-*r*47.1%
associate-*l/47.4%
fma-udef47.4%
*-commutative47.4%
Simplified47.4%
Taylor expanded in l around inf 94.2%
Final simplification59.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.5e+131)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (/ (* n (* l U*)) Om) (* l -2.0))) Om)))))
(*
(* l (sqrt 2.0))
(sqrt (/ (* n (* U (- (/ (* n (- U* U)) Om) 2.0))) Om)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.5e+131) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else {
tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * (U_42_ - U)) / Om) - 2.0))) / Om));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 2.5d+131) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * (((n * (l * u_42)) / om) + (l * (-2.0d0)))) / om)))))
else
tmp = (l * sqrt(2.0d0)) * sqrt(((n * (u * (((n * (u_42 - u)) / om) - 2.0d0))) / om))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.5e+131) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt(((n * (U * (((n * (U_42_ - U)) / Om) - 2.0))) / Om));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.5e+131: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt(((n * (U * (((n * (U_42_ - U)) / Om) - 2.0))) / Om)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.5e+131) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(Float64(n * Float64(l * U_42_)) / Om) + Float64(l * -2.0))) / Om))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 2.0))) / Om))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.5e+131) tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))); else tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * (U_42_ - U)) / Om) - 2.0))) / Om)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.5e+131], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.5 \cdot 10^{+131}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 2.49999999999999998e131Initial program 49.2%
Simplified55.9%
Taylor expanded in U around 0 54.4%
if 2.49999999999999998e131 < l Initial program 13.0%
Simplified43.7%
Taylor expanded in t around inf 35.4%
distribute-lft-out35.4%
*-commutative35.4%
associate-/l*46.0%
+-commutative46.0%
*-commutative46.0%
associate-*r*46.5%
*-commutative46.5%
associate-*r*50.2%
associate-*l/57.5%
fma-udef57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in l around inf 81.8%
Final simplification57.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.1e+130)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (/ (* n (* l U*)) Om) (* l -2.0))) Om)))))
(* (sqrt 2.0) (* l (sqrt (/ (* n (* U (- (/ (* n U*) Om) 2.0))) Om))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.1e+130) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else {
tmp = sqrt(2.0) * (l * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4.1d+130) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * (((n * (l * u_42)) / om) + (l * (-2.0d0)))) / om)))))
else
tmp = sqrt(2.0d0) * (l * sqrt(((n * (u * (((n * u_42) / om) - 2.0d0))) / om)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.1e+130) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.1e+130: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))) else: tmp = math.sqrt(2.0) * (l * math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.1e+130) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(Float64(n * Float64(l * U_42_)) / Om) + Float64(l * -2.0))) / Om))))); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * U_42_) / Om) - 2.0))) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.1e+130) tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))); else tmp = sqrt(2.0) * (l * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.1e+130], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.1 \cdot 10^{+130}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)}{Om}}\right)\\
\end{array}
\end{array}
if l < 4.09999999999999978e130Initial program 49.2%
Simplified55.9%
Taylor expanded in U around 0 54.4%
if 4.09999999999999978e130 < l Initial program 13.0%
Simplified43.7%
Taylor expanded in U around 0 22.3%
Taylor expanded in t around 0 25.8%
Taylor expanded in l around 0 80.7%
Final simplification57.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 8e+84)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (/ (* n (* l U*)) Om) (* l -2.0))) Om)))))
(if (<= l 1.65e+216)
(pow
(*
2.0
(* n (/ (+ (* l -2.0) (/ n (/ Om (* l (- U* U))))) (/ Om (* U l)))))
0.5)
(* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8e+84) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else if (l <= 1.65e+216) {
tmp = pow((2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))), 0.5);
} else {
tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 8d+84) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * (((n * (l * u_42)) / om) + (l * (-2.0d0)))) / om)))))
else if (l <= 1.65d+216) then
tmp = (2.0d0 * (n * (((l * (-2.0d0)) + (n / (om / (l * (u_42 - u))))) / (om / (u * l))))) ** 0.5d0
else
tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / om)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8e+84) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else if (l <= 1.65e+216) {
tmp = Math.pow((2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))), 0.5);
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 8e+84: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))) elif l <= 1.65e+216: tmp = math.pow((2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))), 0.5) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 8e+84) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(Float64(n * Float64(l * U_42_)) / Om) + Float64(l * -2.0))) / Om))))); elseif (l <= 1.65e+216) tmp = Float64(2.0 * Float64(n * Float64(Float64(Float64(l * -2.0) + Float64(n / Float64(Om / Float64(l * Float64(U_42_ - U))))) / Float64(Om / Float64(U * l))))) ^ 0.5; else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 8e+84) tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))); elseif (l <= 1.65e+216) tmp = (2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))) ^ 0.5; else tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 8e+84], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.65e+216], N[Power[N[(2.0 * N[(n * N[(N[(N[(l * -2.0), $MachinePrecision] + N[(n / N[(Om / N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)}{Om}\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+216}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \frac{\ell \cdot -2 + \frac{n}{\frac{Om}{\ell \cdot \left(U* - U\right)}}}{\frac{Om}{U \cdot \ell}}\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\
\end{array}
\end{array}
if l < 8.00000000000000046e84Initial program 49.1%
Simplified56.1%
Taylor expanded in U around 0 54.5%
if 8.00000000000000046e84 < l < 1.65e216Initial program 35.4%
Simplified57.0%
Taylor expanded in t around 0 35.7%
pow1/241.4%
associate-*l*41.4%
associate-/l*57.2%
+-commutative57.2%
*-commutative57.2%
associate-/l*62.4%
Applied egg-rr62.4%
if 1.65e216 < l Initial program 7.3%
Simplified33.3%
Taylor expanded in l around inf 84.6%
Taylor expanded in n around 0 45.7%
Final simplification54.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.7e+83)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (/ (* n (* l U*)) Om) (* l -2.0))) Om)))))
(if (<= l 1.22e+216)
(pow
(*
2.0
(* n (/ (+ (* l -2.0) (/ n (/ Om (* l (- U* U))))) (/ Om (* U l)))))
0.5)
(* (* l (sqrt 2.0)) (sqrt (* n (* -2.0 (/ U Om))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.7e+83) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else if (l <= 1.22e+216) {
tmp = pow((2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))), 0.5);
} else {
tmp = (l * sqrt(2.0)) * sqrt((n * (-2.0 * (U / Om))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 2.7d+83) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * (((n * (l * u_42)) / om) + (l * (-2.0d0)))) / om)))))
else if (l <= 1.22d+216) then
tmp = (2.0d0 * (n * (((l * (-2.0d0)) + (n / (om / (l * (u_42 - u))))) / (om / (u * l))))) ** 0.5d0
else
tmp = (l * sqrt(2.0d0)) * sqrt((n * ((-2.0d0) * (u / om))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.7e+83) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else if (l <= 1.22e+216) {
tmp = Math.pow((2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))), 0.5);
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((n * (-2.0 * (U / Om))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.7e+83: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))) elif l <= 1.22e+216: tmp = math.pow((2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))), 0.5) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((n * (-2.0 * (U / Om)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.7e+83) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(Float64(n * Float64(l * U_42_)) / Om) + Float64(l * -2.0))) / Om))))); elseif (l <= 1.22e+216) tmp = Float64(2.0 * Float64(n * Float64(Float64(Float64(l * -2.0) + Float64(n / Float64(Om / Float64(l * Float64(U_42_ - U))))) / Float64(Om / Float64(U * l))))) ^ 0.5; else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n * Float64(-2.0 * Float64(U / Om))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.7e+83) tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))); elseif (l <= 1.22e+216) tmp = (2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))) ^ 0.5; else tmp = (l * sqrt(2.0)) * sqrt((n * (-2.0 * (U / Om)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.7e+83], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.22e+216], N[Power[N[(2.0 * N[(n * N[(N[(N[(l * -2.0), $MachinePrecision] + N[(n / N[(Om / N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n * N[(-2.0 * N[(U / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.7 \cdot 10^{+83}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)}{Om}\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.22 \cdot 10^{+216}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \frac{\ell \cdot -2 + \frac{n}{\frac{Om}{\ell \cdot \left(U* - U\right)}}}{\frac{Om}{U \cdot \ell}}\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{Om}\right)}\\
\end{array}
\end{array}
if l < 2.70000000000000007e83Initial program 49.1%
Simplified56.1%
Taylor expanded in U around 0 54.5%
if 2.70000000000000007e83 < l < 1.22e216Initial program 35.4%
Simplified57.0%
Taylor expanded in t around 0 35.7%
pow1/241.4%
associate-*l*41.4%
associate-/l*57.2%
+-commutative57.2%
*-commutative57.2%
associate-/l*62.4%
Applied egg-rr62.4%
if 1.22e216 < l Initial program 7.3%
Simplified33.3%
Taylor expanded in l around inf 84.6%
Taylor expanded in n around 0 42.3%
Final simplification54.3%
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))))))))
(t_2
(sqrt (* (* 2.0 n) (* U (+ t (/ n (* (/ (/ Om l) l) (/ Om U*)))))))))
(if (<= Om -3.1e+108)
t_1
(if (<= Om -1.12e-227)
t_2
(if (<= Om 4e-260)
(sqrt
(*
(* 2.0 n)
(/ (* l (* U (+ (/ (* n (* l U*)) Om) (* l -2.0)))) Om)))
(if (<= Om 5.2e-27) t_2 t_1))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
double t_2 = sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_)))))));
double tmp;
if (Om <= -3.1e+108) {
tmp = t_1;
} else if (Om <= -1.12e-227) {
tmp = t_2;
} else if (Om <= 4e-260) {
tmp = sqrt(((2.0 * n) * ((l * (U * (((n * (l * U_42_)) / Om) + (l * -2.0)))) / Om)));
} else if (Om <= 5.2e-27) {
tmp = t_2;
} else {
tmp = t_1;
}
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)))))))
t_2 = sqrt(((2.0d0 * n) * (u * (t + (n / (((om / l) / l) * (om / u_42)))))))
if (om <= (-3.1d+108)) then
tmp = t_1
else if (om <= (-1.12d-227)) then
tmp = t_2
else if (om <= 4d-260) then
tmp = sqrt(((2.0d0 * n) * ((l * (u * (((n * (l * u_42)) / om) + (l * (-2.0d0))))) / om)))
else if (om <= 5.2d-27) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
double t_2 = Math.sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_)))))));
double tmp;
if (Om <= -3.1e+108) {
tmp = t_1;
} else if (Om <= -1.12e-227) {
tmp = t_2;
} else if (Om <= 4e-260) {
tmp = Math.sqrt(((2.0 * n) * ((l * (U * (((n * (l * U_42_)) / Om) + (l * -2.0)))) / Om)));
} else if (Om <= 5.2e-27) {
tmp = t_2;
} else {
tmp = t_1;
}
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))))))) t_2 = math.sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_))))))) tmp = 0 if Om <= -3.1e+108: tmp = t_1 elif Om <= -1.12e-227: tmp = t_2 elif Om <= 4e-260: tmp = math.sqrt(((2.0 * n) * ((l * (U * (((n * (l * U_42_)) / Om) + (l * -2.0)))) / Om))) elif Om <= 5.2e-27: tmp = t_2 else: tmp = t_1 return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))) t_2 = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(n / Float64(Float64(Float64(Om / l) / l) * Float64(Om / U_42_))))))) tmp = 0.0 if (Om <= -3.1e+108) tmp = t_1; elseif (Om <= -1.12e-227) tmp = t_2; elseif (Om <= 4e-260) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l * Float64(U * Float64(Float64(Float64(n * Float64(l * U_42_)) / Om) + Float64(l * -2.0)))) / Om))); elseif (Om <= 5.2e-27) tmp = t_2; else tmp = t_1; 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))))))); t_2 = sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_))))))); tmp = 0.0; if (Om <= -3.1e+108) tmp = t_1; elseif (Om <= -1.12e-227) tmp = t_2; elseif (Om <= 4e-260) tmp = sqrt(((2.0 * n) * ((l * (U * (((n * (l * U_42_)) / Om) + (l * -2.0)))) / Om))); elseif (Om <= 5.2e-27) tmp = t_2; else tmp = t_1; 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[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(n / N[(N[(N[(Om / l), $MachinePrecision] / l), $MachinePrecision] * N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -3.1e+108], t$95$1, If[LessEqual[Om, -1.12e-227], t$95$2, If[LessEqual[Om, 4e-260], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l * N[(U * N[(N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 5.2e-27], t$95$2, t$95$1]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
t_2 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{n}{\frac{\frac{Om}{\ell}}{\ell} \cdot \frac{Om}{U*}}\right)\right)}\\
\mathbf{if}\;Om \leq -3.1 \cdot 10^{+108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;Om \leq -1.12 \cdot 10^{-227}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;Om \leq 4 \cdot 10^{-260}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\ell \cdot \left(U \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)\right)}{Om}}\\
\mathbf{elif}\;Om \leq 5.2 \cdot 10^{-27}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if Om < -3.1000000000000001e108 or 5.20000000000000034e-27 < Om Initial program 50.3%
associate-*l*48.9%
sub-neg48.9%
associate-+l-48.9%
sub-neg48.9%
associate-/l*59.1%
remove-double-neg59.1%
associate-*l*59.1%
Simplified59.1%
Taylor expanded in Om around inf 47.5%
unpow247.5%
associate-*r/57.1%
Simplified57.1%
if -3.1000000000000001e108 < Om < -1.1200000000000001e-227 or 3.99999999999999985e-260 < Om < 5.20000000000000034e-27Initial program 45.9%
Simplified57.7%
Taylor expanded in U around 0 61.3%
Taylor expanded in n around inf 45.6%
associate-/l*46.7%
unpow246.7%
times-frac52.3%
unpow252.3%
associate-/r*54.6%
Simplified54.6%
if -1.1200000000000001e-227 < Om < 3.99999999999999985e-260Initial program 14.0%
Simplified44.7%
Taylor expanded in t around 0 52.2%
Taylor expanded in U around 0 56.5%
Final simplification56.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= n -1.3e+16) (not (<= n 4.5e-17)))
(sqrt (* (* 2.0 n) (* U (+ t (/ n (* (/ (/ Om l) l) (/ Om U*)))))))
(sqrt
(*
2.0
(* U (* n (+ t (/ l (/ Om (- (* l -2.0) (/ n (/ Om (* U l)))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -1.3e+16) || !(n <= 4.5e-17)) {
tmp = sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_)))))));
} else {
tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (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 ((n <= (-1.3d+16)) .or. (.not. (n <= 4.5d-17))) then
tmp = sqrt(((2.0d0 * n) * (u * (t + (n / (((om / l) / l) * (om / u_42)))))))
else
tmp = sqrt((2.0d0 * (u * (n * (t + (l / (om / ((l * (-2.0d0)) - (n / (om / (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 ((n <= -1.3e+16) || !(n <= 4.5e-17)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_)))))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (n <= -1.3e+16) or not (n <= 4.5e-17): tmp = math.sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_))))))) else: tmp = math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l))))))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((n <= -1.3e+16) || !(n <= 4.5e-17)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(n / Float64(Float64(Float64(Om / l) / l) * Float64(Om / U_42_))))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(l / Float64(Om / Float64(Float64(l * -2.0) - Float64(n / Float64(Om / 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 ((n <= -1.3e+16) || ~((n <= 4.5e-17))) tmp = sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_))))))); else tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (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[Or[LessEqual[n, -1.3e+16], N[Not[LessEqual[n, 4.5e-17]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(n / N[(N[(N[(Om / l), $MachinePrecision] / l), $MachinePrecision] * N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(l / N[(Om / N[(N[(l * -2.0), $MachinePrecision] - N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.3 \cdot 10^{+16} \lor \neg \left(n \leq 4.5 \cdot 10^{-17}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{n}{\frac{\frac{Om}{\ell}}{\ell} \cdot \frac{Om}{U*}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell}{\frac{Om}{\ell \cdot -2 - \frac{n}{\frac{Om}{U \cdot \ell}}}}\right)\right)\right)}\\
\end{array}
\end{array}
if n < -1.3e16 or 4.49999999999999978e-17 < n Initial program 52.3%
Simplified53.7%
Taylor expanded in U around 0 54.8%
Taylor expanded in n around inf 44.5%
associate-/l*46.9%
unpow246.9%
times-frac51.2%
unpow251.2%
associate-/r*55.3%
Simplified55.3%
if -1.3e16 < n < 4.49999999999999978e-17Initial program 38.9%
Simplified55.5%
Taylor expanded in U* around 0 41.5%
associate-*r*45.8%
+-commutative45.8%
Simplified52.9%
Final simplification54.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= Om -4e+158) (not (<= Om 1.8e+99)))
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (/ (* n (* l U*)) Om) (* l -2.0))) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -4e+158) || !(Om <= 1.8e+99)) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((om <= (-4d+158)) .or. (.not. (om <= 1.8d+99))) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * (((n * (l * u_42)) / om) + (l * (-2.0d0)))) / om)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -4e+158) || !(Om <= 1.8e+99)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -4e+158) or not (Om <= 1.8e+99): tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -4e+158) || !(Om <= 1.8e+99)) 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(U * Float64(t + Float64(Float64(l * Float64(Float64(Float64(n * Float64(l * U_42_)) / Om) + Float64(l * -2.0))) / Om))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -4e+158) || ~((Om <= 1.8e+99))) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); else tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -4e+158], N[Not[LessEqual[Om, 1.8e+99]], $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], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -4 \cdot 10^{+158} \lor \neg \left(Om \leq 1.8 \cdot 10^{+99}\right):\\
\;\;\;\;\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(U \cdot \left(t + \frac{\ell \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if Om < -3.99999999999999981e158 or 1.8000000000000001e99 < Om Initial program 55.4%
associate-*l*51.4%
sub-neg51.4%
associate-+l-51.4%
sub-neg51.4%
associate-/l*65.8%
remove-double-neg65.8%
associate-*l*65.8%
Simplified65.8%
Taylor expanded in Om around inf 49.3%
unpow249.3%
associate-*r/62.7%
Simplified62.7%
if -3.99999999999999981e158 < Om < 1.8000000000000001e99Initial program 38.8%
Simplified52.0%
Taylor expanded in U around 0 54.4%
Final simplification57.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 8e+84)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (/ (* n (* l U*)) Om) (* l -2.0))) Om)))))
(pow
(* 2.0 (* n (/ (+ (* l -2.0) (/ n (/ Om (* l (- U* U))))) (/ Om (* 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 (l <= 8e+84) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else {
tmp = pow((2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (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 (l <= 8d+84) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * (((n * (l * u_42)) / om) + (l * (-2.0d0)))) / om)))))
else
tmp = (2.0d0 * (n * (((l * (-2.0d0)) + (n / (om / (l * (u_42 - u))))) / (om / (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 (l <= 8e+84) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om)))));
} else {
tmp = Math.pow((2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 8e+84: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))) else: tmp = math.pow((2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (U * l))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 8e+84) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(Float64(n * Float64(l * U_42_)) / Om) + Float64(l * -2.0))) / Om))))); else tmp = Float64(2.0 * Float64(n * Float64(Float64(Float64(l * -2.0) + Float64(n / Float64(Om / Float64(l * Float64(U_42_ - U))))) / Float64(Om / 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 (l <= 8e+84) tmp = sqrt(((2.0 * n) * (U * (t + ((l * (((n * (l * U_42_)) / Om) + (l * -2.0))) / Om))))); else tmp = (2.0 * (n * (((l * -2.0) + (n / (Om / (l * (U_42_ - U))))) / (Om / (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[l, 8e+84], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(N[(N[(l * -2.0), $MachinePrecision] + N[(n / N[(Om / N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \frac{\ell \cdot -2 + \frac{n}{\frac{Om}{\ell \cdot \left(U* - U\right)}}}{\frac{Om}{U \cdot \ell}}\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 8.00000000000000046e84Initial program 49.1%
Simplified56.1%
Taylor expanded in U around 0 54.5%
if 8.00000000000000046e84 < l Initial program 21.8%
Simplified45.5%
Taylor expanded in t around 0 31.2%
pow1/234.7%
associate-*l*34.7%
associate-/l*48.3%
+-commutative48.3%
*-commutative48.3%
associate-/l*51.0%
Applied egg-rr51.0%
Final simplification54.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (or (<= Om -4.4e+108) (not (<= Om 2.45e-30))) (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om))))))) (sqrt (* (* 2.0 n) (* U (+ t (/ n (* (/ (/ Om 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 ((Om <= -4.4e+108) || !(Om <= 2.45e-30)) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (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 ((om <= (-4.4d+108)) .or. (.not. (om <= 2.45d-30))) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t + (n / (((om / l) / l) * (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 ((Om <= -4.4e+108) || !(Om <= 2.45e-30)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -4.4e+108) or not (Om <= 2.45e-30): tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (Om / U_42_))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -4.4e+108) || !(Om <= 2.45e-30)) 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(U * Float64(t + Float64(n / Float64(Float64(Float64(Om / l) / l) * 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 ((Om <= -4.4e+108) || ~((Om <= 2.45e-30))) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); else tmp = sqrt(((2.0 * n) * (U * (t + (n / (((Om / l) / l) * (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[Or[LessEqual[Om, -4.4e+108], N[Not[LessEqual[Om, 2.45e-30]], $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], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(n / N[(N[(N[(Om / l), $MachinePrecision] / l), $MachinePrecision] * N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -4.4 \cdot 10^{+108} \lor \neg \left(Om \leq 2.45 \cdot 10^{-30}\right):\\
\;\;\;\;\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(U \cdot \left(t + \frac{n}{\frac{\frac{Om}{\ell}}{\ell} \cdot \frac{Om}{U*}}\right)\right)}\\
\end{array}
\end{array}
if Om < -4.4000000000000003e108 or 2.44999999999999985e-30 < Om Initial program 50.3%
associate-*l*48.9%
sub-neg48.9%
associate-+l-48.9%
sub-neg48.9%
associate-/l*59.1%
remove-double-neg59.1%
associate-*l*59.1%
Simplified59.1%
Taylor expanded in Om around inf 47.5%
unpow247.5%
associate-*r/57.1%
Simplified57.1%
if -4.4000000000000003e108 < Om < 2.44999999999999985e-30Initial program 39.2%
Simplified55.0%
Taylor expanded in U around 0 57.9%
Taylor expanded in n around inf 42.7%
associate-/l*43.5%
unpow243.5%
times-frac48.1%
unpow248.1%
associate-/r*50.8%
Simplified50.8%
Final simplification54.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.2e+87) (sqrt (* 2.0 (* (* n U) (+ t (* (/ (* l l) Om) -2.0))))) (pow (* (* 2.0 n) (/ -2.0 (/ Om (* U (* l l))))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.2e+87) {
tmp = sqrt((2.0 * ((n * U) * (t + (((l * l) / Om) * -2.0)))));
} else {
tmp = pow(((2.0 * n) * (-2.0 / (Om / (U * (l * 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 (l <= 2.2d+87) then
tmp = sqrt((2.0d0 * ((n * u) * (t + (((l * l) / om) * (-2.0d0))))))
else
tmp = ((2.0d0 * n) * ((-2.0d0) / (om / (u * (l * 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 (l <= 2.2e+87) {
tmp = Math.sqrt((2.0 * ((n * U) * (t + (((l * l) / Om) * -2.0)))));
} else {
tmp = Math.pow(((2.0 * n) * (-2.0 / (Om / (U * (l * l))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.2e+87: tmp = math.sqrt((2.0 * ((n * U) * (t + (((l * l) / Om) * -2.0))))) else: tmp = math.pow(((2.0 * n) * (-2.0 / (Om / (U * (l * l))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.2e+87) tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0))))); else tmp = Float64(Float64(2.0 * n) * Float64(-2.0 / Float64(Om / Float64(U * Float64(l * 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 (l <= 2.2e+87) tmp = sqrt((2.0 * ((n * U) * (t + (((l * l) / Om) * -2.0))))); else tmp = ((2.0 * n) * (-2.0 / (Om / (U * (l * 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[l, 2.2e+87], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(-2.0 / N[(Om / N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.2 \cdot 10^{+87}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \frac{-2}{\frac{Om}{U \cdot \left(\ell \cdot \ell\right)}}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 2.2000000000000001e87Initial program 48.9%
Simplified55.9%
Taylor expanded in U* around 0 43.4%
associate-*r*41.4%
+-commutative41.4%
Simplified44.5%
Taylor expanded in n around 0 44.3%
*-commutative44.3%
unpow244.3%
Simplified44.3%
if 2.2000000000000001e87 < l Initial program 22.3%
Simplified46.7%
Taylor expanded in t around 0 29.2%
Taylor expanded in n around 0 12.3%
*-commutative12.3%
unpow212.3%
Simplified12.3%
pow1/230.6%
associate-/l*30.6%
Applied egg-rr30.6%
Final simplification42.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 5e+59) (pow (* 2.0 (* n (* U t))) 0.5) (pow (* (* 2.0 n) (/ -2.0 (/ Om (* U (* l l))))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5e+59) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = pow(((2.0 * n) * (-2.0 / (Om / (U * (l * 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 (l <= 5d+59) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = ((2.0d0 * n) * ((-2.0d0) / (om / (u * (l * 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 (l <= 5e+59) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.pow(((2.0 * n) * (-2.0 / (Om / (U * (l * l))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5e+59: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.pow(((2.0 * n) * (-2.0 / (Om / (U * (l * l))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5e+59) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = Float64(Float64(2.0 * n) * Float64(-2.0 / Float64(Om / Float64(U * Float64(l * 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 (l <= 5e+59) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = ((2.0 * n) * (-2.0 / (Om / (U * (l * 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[l, 5e+59], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(-2.0 / N[(Om / N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5 \cdot 10^{+59}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \frac{-2}{\frac{Om}{U \cdot \left(\ell \cdot \ell\right)}}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 4.9999999999999997e59Initial program 48.8%
Simplified55.9%
Taylor expanded in t around inf 41.3%
pow1/241.8%
*-commutative41.8%
Applied egg-rr41.8%
if 4.9999999999999997e59 < l Initial program 25.4%
Simplified47.3%
Taylor expanded in t around 0 34.1%
Taylor expanded in n around 0 16.6%
*-commutative16.6%
unpow216.6%
Simplified16.6%
pow1/233.0%
associate-/l*33.0%
Applied egg-rr33.0%
Final simplification40.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 6.3e+100) (pow (* 2.0 (* n (* U t))) 0.5) (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 <= 6.3e+100) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} 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 <= 6.3d+100) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
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 <= 6.3e+100) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} 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 <= 6.3e+100: tmp = math.pow((2.0 * (n * (U * t))), 0.5) 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 <= 6.3e+100) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(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 <= 6.3e+100) tmp = (2.0 * (n * (U * t))) ^ 0.5; 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, 6.3e+100], 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[(N[(-2.0 * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.3 \cdot 10^{+100}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{-2 \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 6.3000000000000004e100Initial program 49.4%
Simplified55.8%
Taylor expanded in t around inf 41.1%
pow1/241.6%
*-commutative41.6%
Applied egg-rr41.6%
if 6.3000000000000004e100 < l Initial program 17.4%
Simplified46.5%
Taylor expanded in t around 0 30.9%
Taylor expanded in n around 0 13.1%
*-commutative13.1%
unpow213.1%
Simplified13.1%
Final simplification38.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 (* 2.0 (* l (/ l Om))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(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|\\
\\
\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}
Initial program 45.4%
associate-*l*46.9%
sub-neg46.9%
associate-+l-46.9%
sub-neg46.9%
associate-/l*52.6%
remove-double-neg52.6%
associate-*l*52.5%
Simplified52.5%
Taylor expanded in Om around inf 42.1%
unpow242.1%
associate-*r/47.4%
Simplified47.4%
Final simplification47.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.42e+100) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* -4.0 (/ n (/ (/ Om U) (* l l)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.42e+100) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((-4.0 * (n / ((Om / U) / (l * l)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.42d+100) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((-4.0d0) * (n / ((om / u) / (l * l)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.42e+100) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((-4.0 * (n / ((Om / U) / (l * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.42e+100: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((-4.0 * (n / ((Om / U) / (l * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.42e+100) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(-4.0 * Float64(n / Float64(Float64(Om / U) / Float64(l * l))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.42e+100) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((-4.0 * (n / ((Om / U) / (l * l))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.42e+100], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(n / N[(N[(Om / U), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.42 \cdot 10^{+100}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{n}{\frac{\frac{Om}{U}}{\ell \cdot \ell}}}\\
\end{array}
\end{array}
if l < 1.41999999999999999e100Initial program 49.4%
Simplified55.8%
Taylor expanded in t around inf 41.1%
pow1/241.6%
*-commutative41.6%
Applied egg-rr41.6%
if 1.41999999999999999e100 < l Initial program 17.4%
Simplified46.5%
Taylor expanded in t around 0 30.9%
Taylor expanded in n around 0 13.1%
*-commutative13.1%
unpow213.1%
Simplified13.1%
Taylor expanded in n around 0 12.1%
associate-/l*13.1%
*-commutative13.1%
associate-/r*14.2%
unpow214.2%
Simplified14.2%
Final simplification38.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* n (* U t))) 0.5))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow((2.0 * (n * (U * t))), 0.5);
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = (2.0d0 * (n * (u * t))) ** 0.5d0
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow((2.0 * (n * (U * t))), 0.5);
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * (n * (U * t))), 0.5)
l = abs(l) function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5 end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * (n * (U * t))) ^ 0.5; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}
\end{array}
Initial program 45.4%
Simplified54.7%
Taylor expanded in t around inf 36.8%
pow1/237.6%
*-commutative37.6%
Applied egg-rr37.6%
Final simplification37.6%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (n * (U * t))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (n * (u * t))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (n * (U * t))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (n * (U * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (n * (U * t)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 45.4%
Simplified54.7%
Taylor expanded in t around inf 36.8%
Final simplification36.8%
herbie shell --seed 2023227
(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*))))))