
(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 15 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
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_1 2e-145)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(if (<= t_1 1e+154)
t_1
(*
(sqrt 2.0)
(* l (sqrt (/ n (/ Om (* U (+ -2.0 (/ n (/ Om U*)))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 2e-145) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (t_1 <= 1e+154) {
tmp = t_1;
} else {
tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 2d-145) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else if (t_1 <= 1d+154) then
tmp = t_1
else
tmp = sqrt(2.0d0) * (l * sqrt((n / (om / (u * ((-2.0d0) + (n / (om / u_42))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 2e-145) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (t_1 <= 1e+154) {
tmp = t_1;
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 2e-145: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) elif t_1 <= 1e+154: tmp = t_1 else: tmp = math.sqrt(2.0) * (l * math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 2e-145) 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 (t_1 <= 1e+154) tmp = t_1; else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / U_42_))))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 2e-145) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); elseif (t_1 <= 1e+154) tmp = t_1; else tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 2e-145], 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[t$95$1, 1e+154], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{-145}:\\
\;\;\;\;\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}\;t_1 \leq 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U*}}\right)}}}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999983e-145Initial program 19.7%
Simplified49.1%
Taylor expanded in U around 0 49.1%
if 1.99999999999999983e-145 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.00000000000000004e154Initial program 97.8%
if 1.00000000000000004e154 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 19.9%
Simplified36.9%
Taylor expanded in U around 0 36.4%
Taylor expanded in t around 0 37.6%
Taylor expanded in l around 0 25.5%
associate-*l*25.5%
associate-/l*28.1%
*-commutative28.1%
sub-neg28.1%
associate-/l*26.4%
metadata-eval26.4%
Simplified26.4%
Final simplification57.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.7e-52)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(if (<= l 7.5e+154)
(sqrt
(*
(* 2.0 n)
(* U (+ t (* (/ l Om) (fma l -2.0 (* (/ l Om) (* n (- U* U)))))))))
(* (* l (sqrt 2.0)) (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 <= 1.7e-52) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 7.5e+154) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l / Om) * fma(l, -2.0, ((l / Om) * (n * (U_42_ - U)))))))));
} else {
tmp = (l * sqrt(2.0)) * 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 <= 1.7e-52) 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 <= 7.5e+154) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(Float64(l / Om) * Float64(n * Float64(U_42_ - U))))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * 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$_] := If[LessEqual[l, 1.7e-52], 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, 7.5e+154], 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] * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $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 * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{-52}:\\
\;\;\;\;\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 7.5 \cdot 10^{+154}:\\
\;\;\;\;\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 \left(n \cdot \left(U* - U\right)\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.70000000000000009e-52Initial program 54.6%
Simplified58.7%
Taylor expanded in U around 0 59.5%
if 1.70000000000000009e-52 < l < 7.5000000000000004e154Initial program 53.3%
Simplified64.1%
if 7.5000000000000004e154 < l Initial program 6.9%
Simplified22.6%
Taylor expanded in U around 0 22.2%
Taylor expanded in t around 0 30.9%
Taylor expanded in l around 0 72.9%
Final simplification61.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5e+153)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(* (sqrt 2.0) (* l (sqrt (/ n (/ Om (* U (+ -2.0 (/ n (/ Om U*)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5e+153) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 5d+153) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = sqrt(2.0d0) * (l * sqrt((n / (om / (u * ((-2.0d0) + (n / (om / u_42))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5e+153) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5e+153: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = math.sqrt(2.0) * (l * math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5e+153) 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))))); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / U_42_))))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 5e+153) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5e+153], 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], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U*}}\right)}}}\right)\\
\end{array}
\end{array}
if l < 5.00000000000000018e153Initial program 54.4%
Simplified59.7%
Taylor expanded in U around 0 60.2%
if 5.00000000000000018e153 < l Initial program 6.9%
Simplified22.6%
Taylor expanded in U around 0 22.2%
Taylor expanded in t around 0 30.9%
Taylor expanded in l around 0 72.9%
associate-*l*72.9%
associate-/l*81.7%
*-commutative81.7%
sub-neg81.7%
associate-/l*72.9%
metadata-eval72.9%
Simplified72.9%
Final simplification61.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.7e+153)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(* (* l (sqrt 2.0)) (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 <= 1.7e+153) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * sqrt(2.0)) * 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 <= 1.7d+153) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = (l * sqrt(2.0d0)) * 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 <= 1.7e+153) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * Math.sqrt(2.0)) * 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 <= 1.7e+153: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = (l * math.sqrt(2.0)) * 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 <= 1.7e+153) 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))))); else tmp = Float64(Float64(l * sqrt(2.0)) * 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 <= 1.7e+153) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = (l * sqrt(2.0)) * 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, 1.7e+153], 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], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * 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]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{+153}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.6999999999999999e153Initial program 54.4%
Simplified59.7%
Taylor expanded in U around 0 60.2%
if 1.6999999999999999e153 < l Initial program 6.9%
Simplified22.6%
Taylor expanded in U around 0 22.2%
Taylor expanded in t around 0 30.9%
Taylor expanded in l around 0 72.9%
Final simplification61.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= Om -1.7e+144) (not (<= Om 4.2e+96)))
(sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om))))))))
(sqrt
(-
(* 2.0 (* n (* U t)))
(*
(/ (* (* n (* U l)) (- (/ (* n (* l (- U U*))) Om) (* l -2.0))) Om)
2.0)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.7e+144) || !(Om <= 4.2e+96)) {
tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt(((2.0 * (n * (U * t))) - ((((n * (U * l)) * (((n * (l * (U - U_42_))) / Om) - (l * -2.0))) / Om) * 2.0)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((om <= (-1.7d+144)) .or. (.not. (om <= 4.2d+96))) then
tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
else
tmp = sqrt(((2.0d0 * (n * (u * t))) - ((((n * (u * l)) * (((n * (l * (u - u_42))) / om) - (l * (-2.0d0)))) / om) * 2.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.7e+144) || !(Om <= 4.2e+96)) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt(((2.0 * (n * (U * t))) - ((((n * (U * l)) * (((n * (l * (U - U_42_))) / Om) - (l * -2.0))) / Om) * 2.0)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -1.7e+144) or not (Om <= 4.2e+96): tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt(((2.0 * (n * (U * t))) - ((((n * (U * l)) * (((n * (l * (U - U_42_))) / Om) - (l * -2.0))) / Om) * 2.0))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -1.7e+144) || !(Om <= 4.2e+96)) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))))); else tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) - Float64(Float64(Float64(Float64(n * Float64(U * l)) * Float64(Float64(Float64(n * Float64(l * Float64(U - U_42_))) / Om) - Float64(l * -2.0))) / Om) * 2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -1.7e+144) || ~((Om <= 4.2e+96))) tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))); else tmp = sqrt(((2.0 * (n * (U * t))) - ((((n * (U * l)) * (((n * (l * (U - U_42_))) / Om) - (l * -2.0))) / Om) * 2.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -1.7e+144], N[Not[LessEqual[Om, 4.2e+96]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(n * N[(l * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.7 \cdot 10^{+144} \lor \neg \left(Om \leq 4.2 \cdot 10^{+96}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) - \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\frac{n \cdot \left(\ell \cdot \left(U - U*\right)\right)}{Om} - \ell \cdot -2\right)}{Om} \cdot 2}\\
\end{array}
\end{array}
if Om < -1.7e144 or 4.2000000000000002e96 < Om Initial program 55.7%
Simplified50.6%
Taylor expanded in U around 0 50.0%
Taylor expanded in n around 0 52.7%
associate-*r*56.6%
unpow256.6%
associate-*r/63.9%
Simplified63.9%
if -1.7e144 < Om < 4.2000000000000002e96Initial program 46.9%
Simplified60.2%
Taylor expanded in t around inf 62.2%
Final simplification62.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= Om -7e+143) (not (<= Om 1.8e+98)))
(sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om))))))))
(sqrt
(+
(* 2.0 (* n (* U t)))
(* 2.0 (/ (* (* n (* U l)) (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -7e+143) || !(Om <= 1.8e+98)) {
tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((om <= (-7d+143)) .or. (.not. (om <= 1.8d+98))) then
tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
else
tmp = sqrt(((2.0d0 * (n * (u * t))) + (2.0d0 * (((n * (u * l)) * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -7e+143) || !(Om <= 1.8e+98)) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -7e+143) or not (Om <= 1.8e+98): tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -7e+143) || !(Om <= 1.8e+98)) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))))); else tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(Float64(n * Float64(U * l)) * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -7e+143) || ~((Om <= 1.8e+98))) tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))); else tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -7e+143], N[Not[LessEqual[Om, 1.8e+98]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -7 \cdot 10^{+143} \lor \neg \left(Om \leq 1.8 \cdot 10^{+98}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}}\\
\end{array}
\end{array}
if Om < -7.00000000000000017e143 or 1.7999999999999999e98 < Om Initial program 55.7%
Simplified50.6%
Taylor expanded in U around 0 50.0%
Taylor expanded in n around 0 52.7%
associate-*r*56.6%
unpow256.6%
associate-*r/63.9%
Simplified63.9%
if -7.00000000000000017e143 < Om < 1.7999999999999999e98Initial program 46.9%
Simplified60.2%
Taylor expanded in t around inf 62.2%
Taylor expanded in U* around inf 62.1%
Final simplification62.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= Om -3.6e+188) (not (<= Om 1.32e+82)))
(sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om))))))))
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -3.6e+188) || !(Om <= 1.32e+82)) {
tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((om <= (-3.6d+188)) .or. (.not. (om <= 1.32d+82))) then
tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -3.6e+188) || !(Om <= 1.32e+82)) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -3.6e+188) or not (Om <= 1.32e+82): tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -3.6e+188) || !(Om <= 1.32e+82)) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * 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(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -3.6e+188) || ~((Om <= 1.32e+82))) tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))); else tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -3.6e+188], N[Not[LessEqual[Om, 1.32e+82]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -3.6 \cdot 10^{+188} \lor \neg \left(Om \leq 1.32 \cdot 10^{+82}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if Om < -3.60000000000000021e188 or 1.32e82 < Om Initial program 53.8%
Simplified49.1%
Taylor expanded in U around 0 46.2%
Taylor expanded in n around 0 49.5%
associate-*r*53.8%
unpow253.8%
associate-*r/61.8%
Simplified61.8%
if -3.60000000000000021e188 < Om < 1.32e82Initial program 48.4%
Simplified60.4%
Taylor expanded in U around 0 62.7%
Final simplification62.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (or (<= Om -2.5e-102) (not (<= Om 1.15e-56))) (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om)))))))) (sqrt (* 2.0 (/ (* n (* l (* l (* 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 ((Om <= -2.5e-102) || !(Om <= 1.15e-56)) {
tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt((2.0 * ((n * (l * (l * (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 ((om <= (-2.5d-102)) .or. (.not. (om <= 1.15d-56))) then
tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
else
tmp = sqrt((2.0d0 * ((n * (l * (l * (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 ((Om <= -2.5e-102) || !(Om <= 1.15e-56)) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt((2.0 * ((n * (l * (l * (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 (Om <= -2.5e-102) or not (Om <= 1.15e-56): tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt((2.0 * ((n * (l * (l * (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 ((Om <= -2.5e-102) || !(Om <= 1.15e-56)) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))))); else tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * Float64(l * 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 ((Om <= -2.5e-102) || ~((Om <= 1.15e-56))) tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))); else tmp = sqrt((2.0 * ((n * (l * (l * (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[Or[LessEqual[Om, -2.5e-102], N[Not[LessEqual[Om, 1.15e-56]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * N[(l * N[(U * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -2.5 \cdot 10^{-102} \lor \neg \left(Om \leq 1.15 \cdot 10^{-56}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \left(\ell \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)\right)\right)}{Om}}\\
\end{array}
\end{array}
if Om < -2.50000000000000013e-102 or 1.15000000000000001e-56 < Om Initial program 55.7%
Simplified56.1%
Taylor expanded in U around 0 56.8%
Taylor expanded in n around 0 51.5%
associate-*r*53.0%
unpow253.0%
associate-*r/56.8%
Simplified56.8%
if -2.50000000000000013e-102 < Om < 1.15000000000000001e-56Initial program 34.4%
Simplified57.8%
Taylor expanded in U around 0 57.3%
Taylor expanded in t around 0 51.4%
Taylor expanded in l around 0 51.5%
Final simplification55.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 5.5e+205) (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om)))))))) (sqrt (* 2.0 (/ (* n n) (* (/ Om U*) (/ (/ 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 <= 5.5e+205) {
tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt((2.0 * ((n * n) / ((Om / U_42_) * ((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 <= 5.5d+205) then
tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
else
tmp = sqrt((2.0d0 * ((n * n) / ((om / u_42) * ((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 <= 5.5e+205) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt((2.0 * ((n * n) / ((Om / U_42_) * ((Om / U) / (l * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5.5e+205: tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt((2.0 * ((n * n) / ((Om / U_42_) * ((Om / U) / (l * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.5e+205) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))))); else tmp = sqrt(Float64(2.0 * Float64(Float64(n * n) / Float64(Float64(Om / U_42_) * 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 <= 5.5e+205) tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))); else tmp = sqrt((2.0 * ((n * n) / ((Om / U_42_) * ((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, 5.5e+205], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * n), $MachinePrecision] / N[(N[(Om / U$42$), $MachinePrecision] * N[(N[(Om / U), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.5 \cdot 10^{+205}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot n}{\frac{Om}{U*} \cdot \frac{\frac{Om}{U}}{\ell \cdot \ell}}}\\
\end{array}
\end{array}
if l < 5.50000000000000004e205Initial program 53.0%
Simplified58.3%
Taylor expanded in U around 0 58.8%
Taylor expanded in n around 0 48.3%
associate-*r*50.3%
unpow250.3%
associate-*r/52.8%
Simplified52.8%
if 5.50000000000000004e205 < l Initial program 3.1%
Simplified25.8%
Taylor expanded in U around 0 25.5%
div-inv25.5%
Applied egg-rr25.5%
Taylor expanded in n around inf 23.9%
associate-/l*23.9%
unpow223.9%
unpow223.9%
associate-*r*23.9%
times-frac24.3%
*-commutative24.3%
associate-/r*24.3%
unpow224.3%
Simplified24.3%
Final simplification51.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 8e+205) (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om)))))))) (sqrt (* 2.0 (/ (* n (* l (/ (* n (* l (* U U*))) Om))) Om)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8e+205) {
tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt((2.0 * ((n * (l * ((n * (l * (U * U_42_))) / Om))) / Om)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 8d+205) then
tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
else
tmp = sqrt((2.0d0 * ((n * (l * ((n * (l * (u * u_42))) / om))) / om)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8e+205) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt((2.0 * ((n * (l * ((n * (l * (U * U_42_))) / Om))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 8e+205: tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt((2.0 * ((n * (l * ((n * (l * (U * U_42_))) / Om))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 8e+205) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))))); else tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * Float64(Float64(n * Float64(l * Float64(U * U_42_))) / Om))) / Om))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 8e+205) tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))); else tmp = sqrt((2.0 * ((n * (l * ((n * (l * (U * U_42_))) / Om))) / Om))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 8e+205], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * N[(N[(n * N[(l * N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8 \cdot 10^{+205}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \frac{n \cdot \left(\ell \cdot \left(U \cdot U*\right)\right)}{Om}\right)}{Om}}\\
\end{array}
\end{array}
if l < 8.00000000000000013e205Initial program 53.0%
Simplified58.3%
Taylor expanded in U around 0 58.8%
Taylor expanded in n around 0 48.3%
associate-*r*50.3%
unpow250.3%
associate-*r/52.8%
Simplified52.8%
if 8.00000000000000013e205 < l Initial program 3.1%
Simplified25.8%
Taylor expanded in U around 0 25.5%
Taylor expanded in t around 0 32.4%
Taylor expanded in n around inf 25.0%
*-commutative25.0%
Simplified25.0%
Final simplification51.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.5e+108) (sqrt (* U (* (* 2.0 n) t))) (sqrt (* 2.0 (/ (* n (* l (* -2.0 (* U l)))) Om)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e+108) {
tmp = sqrt((U * ((2.0 * n) * t)));
} else {
tmp = sqrt((2.0 * ((n * (l * (-2.0 * (U * l)))) / Om)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.5d+108) then
tmp = sqrt((u * ((2.0d0 * n) * t)))
else
tmp = sqrt((2.0d0 * ((n * (l * ((-2.0d0) * (u * l)))) / om)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e+108) {
tmp = Math.sqrt((U * ((2.0 * n) * t)));
} else {
tmp = Math.sqrt((2.0 * ((n * (l * (-2.0 * (U * l)))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e+108: tmp = math.sqrt((U * ((2.0 * n) * t))) else: tmp = math.sqrt((2.0 * ((n * (l * (-2.0 * (U * l)))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e+108) tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * t))); else tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * Float64(-2.0 * Float64(U * l)))) / Om))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.5e+108) tmp = sqrt((U * ((2.0 * n) * t))); else tmp = sqrt((2.0 * ((n * (l * (-2.0 * (U * l)))) / Om))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e+108], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * N[(-2.0 * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{+108}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \left(-2 \cdot \left(U \cdot \ell\right)\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.49999999999999992e108Initial program 54.8%
Simplified59.8%
Taylor expanded in t around inf 39.7%
add-cbrt-cube21.8%
Applied egg-rr21.8%
add-cbrt-cube39.7%
associate-*r*42.6%
Applied egg-rr42.6%
if 1.49999999999999992e108 < l Initial program 10.1%
Simplified27.2%
Taylor expanded in U around 0 26.8%
Taylor expanded in t around 0 34.2%
Taylor expanded in n around 0 22.0%
Final simplification40.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n (+ 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 * (U * (n * (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 * (u * (n * (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 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * 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 * (U * (n * (t + (-2.0 * (l * (l / Om)))))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}
\end{array}
Initial program 50.3%
Simplified56.5%
Taylor expanded in U around 0 57.0%
Taylor expanded in n around 0 45.8%
associate-*r*47.7%
unpow247.7%
associate-*r/50.5%
Simplified50.5%
Final simplification50.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= n -5.5e-159) (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 <= -5.5e-159) {
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 <= (-5.5d-159)) 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 <= -5.5e-159) {
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 <= -5.5e-159: 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 <= -5.5e-159) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -5.5e-159) 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, -5.5e-159], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -5.5 \cdot 10^{-159}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\end{array}
\end{array}
if n < -5.5000000000000003e-159Initial program 58.0%
associate-/l*59.3%
associate-/r/59.2%
Applied egg-rr59.2%
Taylor expanded in t around inf 46.3%
if -5.5000000000000003e-159 < n Initial program 46.0%
Simplified58.4%
Taylor expanded in t around inf 33.5%
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))))
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 50.3%
Simplified56.5%
Taylor expanded in t around inf 35.9%
Final simplification35.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* U (* (* 2.0 n) t))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((U * ((2.0 * n) * t)));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((u * ((2.0d0 * n) * t)))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((U * ((2.0 * n) * t)));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((U * ((2.0 * n) * t)))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(U * Float64(Float64(2.0 * n) * t))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((U * ((2.0 * n) * t))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot t\right)}
\end{array}
Initial program 50.3%
Simplified56.5%
Taylor expanded in t around inf 35.9%
add-cbrt-cube20.2%
Applied egg-rr20.2%
add-cbrt-cube35.9%
associate-*r*38.5%
Applied egg-rr38.5%
Final simplification38.5%
herbie shell --seed 2023192
(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*))))))