
(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 10 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}
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U (- t (/ (* 2.0 (pow l 2.0)) Om)))))
(if (<= t_2 INFINITY)
(sqrt
(* (* 2.0 (* n U)) (- t (+ (* t_1 (- U U*)) (* 2.0 (* l (/ l Om)))))))
(sqrt
(*
-2.0
(* U (/ (* (* n (pow l 2.0)) (- 2.0 (* U* (/ n Om)))) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * pow(l, 2.0)) / Om))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * (U * (((n * pow(l, 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * Math.pow((l / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t - ((2.0 * Math.pow(l, 2.0)) / Om))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * (U * (((n * Math.pow(l, 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t - ((2.0 * math.pow(l, 2.0)) / Om)))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * (U * (((n * math.pow(l, 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - Float64(Float64(2.0 * (l ^ 2.0)) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(t_1 * Float64(U - U_42_)) + Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(U * Float64(Float64(Float64(n * (l ^ 2.0)) * Float64(2.0 - Float64(U_42_ * Float64(n / Om)))) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * (t - ((2.0 * (l ^ 2.0)) / Om)))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * (U * (((n * (l ^ 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(U * N[(N[(N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 - N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \frac{2 \cdot {\ell}^{2}}{Om}\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(U \cdot \frac{\left(n \cdot {\ell}^{2}\right) \cdot \left(2 - U* \cdot \frac{n}{Om}\right)}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 15.4%
Simplified25.1%
sqrt-prod46.4%
fma-undefine46.4%
associate-*r*49.8%
+-commutative49.8%
*-commutative49.8%
fma-define49.8%
associate-*r/49.8%
pow249.8%
Applied egg-rr49.8%
*-commutative49.8%
associate-*r/49.8%
Simplified49.8%
Taylor expanded in n around 0 49.8%
associate-*r/49.8%
Simplified49.8%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 75.5%
Simplified78.6%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified6.2%
Taylor expanded in Om around -inf 18.8%
Taylor expanded in l around inf 34.1%
Taylor expanded in U around 0 35.4%
associate-/l*35.4%
associate-*r*35.4%
*-commutative35.4%
mul-1-neg35.4%
associate-/l*35.4%
Simplified35.4%
Final simplification68.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U t)))
(if (<= t_2 INFINITY)
(sqrt
(* (* 2.0 (* n U)) (- t (+ (* t_1 (- U U*)) (* 2.0 (* l (/ l Om)))))))
(sqrt
(*
-2.0
(* U (/ (* (* n (pow l 2.0)) (- 2.0 (* U* (/ n Om)))) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * (U * (((n * pow(l, 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * Math.pow((l / Om), 2.0);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * (U * (((n * Math.pow(l, 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow((l / Om), 2.0) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * (U * (((n * math.pow(l, 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(t_1 * Float64(U - U_42_)) + Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(U * Float64(Float64(Float64(n * (l ^ 2.0)) * Float64(2.0 - Float64(U_42_ * Float64(n / Om)))) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * ((l / Om) ^ 2.0); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * t)); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((t_1 * (U - U_42_)) + (2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * (U * (((n * (l ^ 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(U * N[(N[(N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 - N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(U \cdot \frac{\left(n \cdot {\ell}^{2}\right) \cdot \left(2 - U* \cdot \frac{n}{Om}\right)}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 15.4%
Simplified25.1%
sqrt-prod46.4%
fma-undefine46.4%
associate-*r*49.8%
+-commutative49.8%
*-commutative49.8%
fma-define49.8%
associate-*r/49.8%
pow249.8%
Applied egg-rr49.8%
*-commutative49.8%
associate-*r/49.8%
Simplified49.8%
Taylor expanded in t around inf 43.5%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 75.5%
Simplified78.6%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified6.2%
Taylor expanded in Om around -inf 18.8%
Taylor expanded in l around inf 34.1%
Taylor expanded in U around 0 35.4%
associate-/l*35.4%
associate-*r*35.4%
*-commutative35.4%
mul-1-neg35.4%
associate-/l*35.4%
Simplified35.4%
Final simplification68.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow l 2.0))))
(if (<= l 4.5e-139)
(sqrt (* (* (* 2.0 n) U) t))
(if (<= l 2.95e+53)
(sqrt (* (* n (+ t (/ (/ (* U* t_1) Om) Om))) (* 2.0 U)))
(sqrt (* -2.0 (* U (/ (* t_1 (- 2.0 (* U* (/ n Om)))) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow(l, 2.0);
double tmp;
if (l <= 4.5e-139) {
tmp = sqrt((((2.0 * n) * U) * t));
} else if (l <= 2.95e+53) {
tmp = sqrt(((n * (t + (((U_42_ * t_1) / Om) / Om))) * (2.0 * U)));
} else {
tmp = sqrt((-2.0 * (U * ((t_1 * (2.0 - (U_42_ * (n / Om)))) / Om))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = n * (l ** 2.0d0)
if (l <= 4.5d-139) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else if (l <= 2.95d+53) then
tmp = sqrt(((n * (t + (((u_42 * t_1) / om) / om))) * (2.0d0 * u)))
else
tmp = sqrt(((-2.0d0) * (u * ((t_1 * (2.0d0 - (u_42 * (n / om)))) / om))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * Math.pow(l, 2.0);
double tmp;
if (l <= 4.5e-139) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else if (l <= 2.95e+53) {
tmp = Math.sqrt(((n * (t + (((U_42_ * t_1) / Om) / Om))) * (2.0 * U)));
} else {
tmp = Math.sqrt((-2.0 * (U * ((t_1 * (2.0 - (U_42_ * (n / Om)))) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = n * math.pow(l, 2.0) tmp = 0 if l <= 4.5e-139: tmp = math.sqrt((((2.0 * n) * U) * t)) elif l <= 2.95e+53: tmp = math.sqrt(((n * (t + (((U_42_ * t_1) / Om) / Om))) * (2.0 * U))) else: tmp = math.sqrt((-2.0 * (U * ((t_1 * (2.0 - (U_42_ * (n / Om)))) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (l ^ 2.0)) tmp = 0.0 if (l <= 4.5e-139) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); elseif (l <= 2.95e+53) tmp = sqrt(Float64(Float64(n * Float64(t + Float64(Float64(Float64(U_42_ * t_1) / Om) / Om))) * Float64(2.0 * U))); else tmp = sqrt(Float64(-2.0 * Float64(U * Float64(Float64(t_1 * Float64(2.0 - Float64(U_42_ * Float64(n / Om)))) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = n * (l ^ 2.0); tmp = 0.0; if (l <= 4.5e-139) tmp = sqrt((((2.0 * n) * U) * t)); elseif (l <= 2.95e+53) tmp = sqrt(((n * (t + (((U_42_ * t_1) / Om) / Om))) * (2.0 * U))); else tmp = sqrt((-2.0 * (U * ((t_1 * (2.0 - (U_42_ * (n / Om)))) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 4.5e-139], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.95e+53], N[Sqrt[N[(N[(n * N[(t + N[(N[(N[(U$42$ * t$95$1), $MachinePrecision] / Om), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(U * N[(N[(t$95$1 * N[(2.0 - N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot {\ell}^{2}\\
\mathbf{if}\;\ell \leq 4.5 \cdot 10^{-139}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{elif}\;\ell \leq 2.95 \cdot 10^{+53}:\\
\;\;\;\;\sqrt{\left(n \cdot \left(t + \frac{\frac{U* \cdot t\_1}{Om}}{Om}\right)\right) \cdot \left(2 \cdot U\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(U \cdot \frac{t\_1 \cdot \left(2 - U* \cdot \frac{n}{Om}\right)}{Om}\right)}\\
\end{array}
\end{array}
if l < 4.50000000000000023e-139Initial program 67.9%
Taylor expanded in t around inf 54.0%
if 4.50000000000000023e-139 < l < 2.9499999999999999e53Initial program 60.0%
Simplified50.4%
Taylor expanded in Om around -inf 46.5%
Taylor expanded in U around 0 62.1%
associate-*r*62.1%
*-commutative62.1%
mul-1-neg62.1%
fma-define62.1%
associate-/l*65.8%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in U* around inf 60.1%
associate-*r/60.1%
mul-1-neg60.1%
*-commutative60.1%
Simplified60.1%
if 2.9499999999999999e53 < l Initial program 30.1%
Simplified38.5%
Taylor expanded in Om around -inf 29.8%
Taylor expanded in l around inf 36.1%
Taylor expanded in U around 0 39.4%
associate-/l*39.4%
associate-*r*39.4%
*-commutative39.4%
mul-1-neg39.4%
associate-/l*39.4%
Simplified39.4%
Final simplification51.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.6e-94)
(sqrt (* (* (* 2.0 n) U) t))
(if (<= l 1.65e+18)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(sqrt
(* -2.0 (* U (/ (* (* n (pow l 2.0)) (- 2.0 (* U* (/ n Om)))) Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.6e-94) {
tmp = sqrt((((2.0 * n) * U) * t));
} else if (l <= 1.65e+18) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else {
tmp = sqrt((-2.0 * (U * (((n * pow(l, 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4.6d-94) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else if (l <= 1.65d+18) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
else
tmp = sqrt(((-2.0d0) * (u * (((n * (l ** 2.0d0)) * (2.0d0 - (u_42 * (n / om)))) / om))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.6e-94) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else if (l <= 1.65e+18) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * (U * (((n * Math.pow(l, 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.6e-94: tmp = math.sqrt((((2.0 * n) * U) * t)) elif l <= 1.65e+18: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) else: tmp = math.sqrt((-2.0 * (U * (((n * math.pow(l, 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.6e-94) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); elseif (l <= 1.65e+18) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(U * Float64(Float64(Float64(n * (l ^ 2.0)) * Float64(2.0 - Float64(U_42_ * Float64(n / Om)))) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.6e-94) tmp = sqrt((((2.0 * n) * U) * t)); elseif (l <= 1.65e+18) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); else tmp = sqrt((-2.0 * (U * (((n * (l ^ 2.0)) * (2.0 - (U_42_ * (n / Om)))) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.6e-94], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.65e+18], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(U * N[(N[(N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 - N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.6 \cdot 10^{-94}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+18}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(U \cdot \frac{\left(n \cdot {\ell}^{2}\right) \cdot \left(2 - U* \cdot \frac{n}{Om}\right)}{Om}\right)}\\
\end{array}
\end{array}
if l < 4.5999999999999999e-94Initial program 68.1%
Taylor expanded in t around inf 54.2%
if 4.5999999999999999e-94 < l < 1.65e18Initial program 63.6%
Simplified56.2%
Taylor expanded in n around 0 60.0%
if 1.65e18 < l Initial program 31.5%
Simplified37.2%
Taylor expanded in Om around -inf 31.3%
Taylor expanded in l around inf 35.3%
Taylor expanded in U around 0 42.0%
associate-/l*43.4%
associate-*r*43.4%
*-commutative43.4%
mul-1-neg43.4%
associate-/l*43.4%
Simplified43.4%
Final simplification51.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 6.5e-168)
(sqrt (* (* (* 2.0 n) U) t))
(sqrt
(* (* n (+ t (/ (* (pow l 2.0) (- (/ (* n U*) Om) 2.0)) Om))) (* 2.0 U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.5e-168) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = sqrt(((n * (t + ((pow(l, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))) * (2.0 * U)));
}
return tmp;
}
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.5d-168) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = sqrt(((n * (t + (((l ** 2.0d0) * (((n * u_42) / om) - 2.0d0)) / om))) * (2.0d0 * u)))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.5e-168) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.sqrt(((n * (t + ((Math.pow(l, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))) * (2.0 * U)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.5e-168: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.sqrt(((n * (t + ((math.pow(l, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))) * (2.0 * U))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.5e-168) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = sqrt(Float64(Float64(n * Float64(t + Float64(Float64((l ^ 2.0) * Float64(Float64(Float64(n * U_42_) / Om) - 2.0)) / Om))) * Float64(2.0 * U))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 6.5e-168) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = sqrt(((n * (t + (((l ^ 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))) * (2.0 * U))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 6.5e-168], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(n * N[(t + N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.5 \cdot 10^{-168}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right) \cdot \left(2 \cdot U\right)}\\
\end{array}
\end{array}
if l < 6.4999999999999997e-168Initial program 67.4%
Taylor expanded in t around inf 53.5%
if 6.4999999999999997e-168 < l Initial program 45.9%
Simplified45.3%
Taylor expanded in Om around -inf 37.5%
Taylor expanded in U around 0 45.2%
associate-*r*45.2%
*-commutative45.2%
mul-1-neg45.2%
fma-define45.2%
associate-/l*46.7%
associate-/l*48.4%
Simplified48.4%
Taylor expanded in l around 0 51.5%
Final simplification52.6%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.5e-94)
(sqrt (* (* (* 2.0 n) U) t))
(if (<= l 1.3e+138)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(sqrt
(*
(* 2.0 n)
(/ (* (* l l) (- (/ (* U (* n (- U* U))) Om) (* 2.0 U))) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.5e-94) {
tmp = sqrt((((2.0 * n) * U) * t));
} else if (l <= 1.3e+138) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * (((l * l) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om)));
}
return tmp;
}
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-94) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else if (l <= 1.3d+138) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
else
tmp = sqrt(((2.0d0 * n) * (((l * l) * (((u * (n * (u_42 - u))) / om) - (2.0d0 * u))) / om)))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.5e-94) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else if (l <= 1.3e+138) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (((l * l) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5.5e-94: tmp = math.sqrt((((2.0 * n) * U) * t)) elif l <= 1.3e+138: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) else: tmp = math.sqrt(((2.0 * n) * (((l * l) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.5e-94) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); elseif (l <= 1.3e+138) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(Float64(l * l) * Float64(Float64(Float64(U * Float64(n * Float64(U_42_ - U))) / Om) - Float64(2.0 * U))) / Om))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 5.5e-94) tmp = sqrt((((2.0 * n) * U) * t)); elseif (l <= 1.3e+138) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); else tmp = sqrt(((2.0 * n) * (((l * l) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.5e-94], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.3e+138], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * N[(N[(N[(U * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{elif}\;\ell \leq 1.3 \cdot 10^{+138}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot \left(\frac{U \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} - 2 \cdot U\right)}{Om}}\\
\end{array}
\end{array}
if l < 5.49999999999999989e-94Initial program 68.1%
Taylor expanded in t around inf 54.2%
if 5.49999999999999989e-94 < l < 1.3e138Initial program 53.1%
Simplified46.7%
Taylor expanded in n around 0 46.7%
if 1.3e138 < l Initial program 18.1%
Simplified34.8%
Taylor expanded in Om around -inf 17.6%
Taylor expanded in l around inf 28.0%
unpow228.0%
Applied egg-rr28.0%
Final simplification48.7%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 6.2e+17)
(sqrt (* (* (* 2.0 n) U) t))
(sqrt
(*
(* 2.0 n)
(/ (* (* l l) (- (/ (* U (* n (- U* U))) Om) (* 2.0 U))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.2e+17) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = sqrt(((2.0 * n) * (((l * l) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om)));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 6.2d+17) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = sqrt(((2.0d0 * n) * (((l * l) * (((u * (n * (u_42 - u))) / om) - (2.0d0 * u))) / om)))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.2e+17) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.sqrt(((2.0 * n) * (((l * l) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.2e+17: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.sqrt(((2.0 * n) * (((l * l) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.2e+17) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(Float64(l * l) * Float64(Float64(Float64(U * Float64(n * Float64(U_42_ - U))) / Om) - Float64(2.0 * U))) / Om))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 6.2e+17) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = sqrt(((2.0 * n) * (((l * l) * (((U * (n * (U_42_ - U))) / Om) - (2.0 * U))) / Om))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 6.2e+17], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * N[(N[(N[(U * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.2 \cdot 10^{+17}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot \left(\frac{U \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} - 2 \cdot U\right)}{Om}}\\
\end{array}
\end{array}
if l < 6.2e17Initial program 67.5%
Taylor expanded in t around inf 54.0%
if 6.2e17 < l Initial program 31.5%
Simplified37.2%
Taylor expanded in Om around -inf 31.3%
Taylor expanded in l around inf 35.3%
unpow235.3%
Applied egg-rr35.3%
Final simplification48.8%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.5e-94) (sqrt (* (* (* 2.0 n) U) t)) (pow (* (* 2.0 U) (* n t)) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.5e-94) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = pow(((2.0 * U) * (n * t)), 0.5);
}
return tmp;
}
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.5d-94) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = ((2.0d0 * u) * (n * t)) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.5e-94) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.pow(((2.0 * U) * (n * t)), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.5e-94: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.pow(((2.0 * U) * (n * t)), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.5e-94) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = Float64(Float64(2.0 * U) * Float64(n * t)) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.5e-94) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = ((2.0 * U) * (n * t)) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.5e-94], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.5 \cdot 10^{-94}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 4.5000000000000002e-94Initial program 68.1%
Taylor expanded in t around inf 54.2%
if 4.5000000000000002e-94 < l Initial program 40.1%
Simplified42.3%
Taylor expanded in t around inf 26.2%
pow1/227.2%
associate-*r*27.2%
Applied egg-rr27.2%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 6.5e-94) (sqrt (* (* (* 2.0 n) U) t)) (sqrt (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.5e-94) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
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.5d-94) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.5e-94) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.5e-94: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.5e-94) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 6.5e-94) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 6.5e-94], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.5 \cdot 10^{-94}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 6.4999999999999996e-94Initial program 68.1%
Taylor expanded in t around inf 54.2%
if 6.4999999999999996e-94 < l Initial program 40.1%
Simplified42.3%
Taylor expanded in t around inf 26.2%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
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))))
end function
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))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 57.5%
Simplified55.5%
Taylor expanded in t around inf 41.2%
herbie shell --seed 2024110
(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*))))))