
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (- t (* l (* 2.0 (/ l Om)))))
(t_2 (pow (/ l Om) 2.0))
(t_3 (* (* n t_2) (- U* U)))
(t_4 (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_3)))))
(if (<= t_4 0.0)
(sqrt (* (* 2.0 n) (* U (+ t_1 t_3))))
(if (<= t_4 2e+152)
t_4
(if (<= t_4 INFINITY)
(sqrt (* (* 2.0 n) (* U (+ t_1 (* n (* t_2 (- U* U)))))))
(exp
(*
(log (fabs (* 2.0 (/ (* n (* -2.0 (* U (pow l 2.0)))) Om))))
0.5)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (l * (2.0 * (l / Om)));
double t_2 = pow((l / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3)));
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t_1 + t_3))));
} else if (t_4 <= 2e+152) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U)))))));
} else {
tmp = exp((log(fabs((2.0 * ((n * (-2.0 * (U * pow(l, 2.0)))) / Om)))) * 0.5));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (l * (2.0 * (l / Om)));
double t_2 = Math.pow((l / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3)));
double tmp;
if (t_4 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t_1 + t_3))));
} else if (t_4 <= 2e+152) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U)))))));
} else {
tmp = Math.exp((Math.log(Math.abs((2.0 * ((n * (-2.0 * (U * Math.pow(l, 2.0)))) / Om)))) * 0.5));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = t - (l * (2.0 * (l / Om))) t_2 = math.pow((l / Om), 2.0) t_3 = (n * t_2) * (U_42_ - U) t_4 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3))) tmp = 0 if t_4 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t_1 + t_3)))) elif t_4 <= 2e+152: tmp = t_4 elif t_4 <= math.inf: tmp = math.sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U))))))) else: tmp = math.exp((math.log(math.fabs((2.0 * ((n * (-2.0 * (U * math.pow(l, 2.0)))) / Om)))) * 0.5)) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))) t_2 = Float64(l / Om) ^ 2.0 t_3 = Float64(Float64(n * t_2) * Float64(U_42_ - U)) t_4 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_3))) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t_1 + t_3)))); elseif (t_4 <= 2e+152) tmp = t_4; elseif (t_4 <= Inf) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t_1 + Float64(n * Float64(t_2 * Float64(U_42_ - U))))))); else tmp = exp(Float64(log(abs(Float64(2.0 * Float64(Float64(n * Float64(-2.0 * Float64(U * (l ^ 2.0)))) / Om)))) * 0.5)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = t - (l * (2.0 * (l / Om))); t_2 = (l / Om) ^ 2.0; t_3 = (n * t_2) * (U_42_ - U); t_4 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3))); tmp = 0.0; if (t_4 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t_1 + t_3)))); elseif (t_4 <= 2e+152) tmp = t_4; elseif (t_4 <= Inf) tmp = sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U))))))); else tmp = exp((log(abs((2.0 * ((n * (-2.0 * (U * (l ^ 2.0)))) / Om)))) * 0.5)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(n * t$95$2), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t$95$1 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 2e+152], t$95$4, If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t$95$1 + N[(n * N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[Log[N[Abs[N[(2.0 * N[(N[(n * N[(-2.0 * N[(U * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\\
t_2 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \left(n \cdot t\_2\right) \cdot \left(U* - U\right)\\
t_4 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_3\right)}\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t\_1 + t\_3\right)\right)}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t\_1 + n \cdot \left(t\_2 \cdot \left(U* - U\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\left|2 \cdot \frac{n \cdot \left(-2 \cdot \left(U \cdot {\ell}^{2}\right)\right)}{Om}\right|\right) \cdot 0.5}\\
\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*))))) < 0.0Initial program 9.7%
Simplified48.6%
associate-*r/48.6%
associate-*l/48.6%
associate-*r*48.6%
Applied egg-rr48.6%
associate-*r*51.9%
sub-neg51.9%
distribute-lft-in51.9%
Applied egg-rr51.9%
distribute-lft-out51.9%
sub-neg51.9%
*-commutative51.9%
Simplified51.9%
if 0.0 < (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*))))) < 2.0000000000000001e152Initial program 98.6%
if 2.0000000000000001e152 < (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*))))) < +inf.0Initial program 33.5%
Simplified35.9%
associate-*r/35.9%
associate-*l/39.6%
associate-*r*39.6%
Applied egg-rr39.6%
if +inf.0 < (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 0.0%
Taylor expanded in n around 0 8.2%
associate-*r*5.1%
*-commutative5.1%
cancel-sign-sub-inv5.1%
metadata-eval5.1%
*-commutative5.1%
associate-*l*5.1%
*-commutative5.1%
Simplified5.1%
pow1/235.1%
pow-to-exp4.8%
+-commutative4.8%
fma-udef4.8%
*-commutative4.8%
Applied egg-rr4.8%
pow14.8%
metadata-eval4.8%
pow-prod-up34.8%
pow-prod-down35.1%
pow235.1%
Applied egg-rr35.1%
unpow1/235.1%
unpow235.1%
rem-sqrt-square35.1%
associate-*l*35.1%
associate-*l*39.8%
Simplified39.8%
Taylor expanded in l around inf 40.0%
associate-*r/40.0%
associate-*r*40.0%
associate-*r*40.0%
Simplified40.0%
Final simplification64.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (- t (* l (* 2.0 (/ l Om)))))
(t_2 (pow (/ l Om) 2.0))
(t_3 (* (* n t_2) (- U* U)))
(t_4 (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_3)))))
(if (<= t_4 0.0)
(sqrt (* (* 2.0 n) (* U (+ t_1 t_3))))
(if (<= t_4 2e+152)
t_4
(if (<= t_4 INFINITY)
(sqrt (* (* 2.0 n) (* U (+ t_1 (* n (* t_2 (- U* U)))))))
(sqrt
(*
-2.0
(*
U
(*
(* n (pow l 2.0))
(- (/ 2.0 Om) (/ (* n U*) (pow Om 2.0))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (l * (2.0 * (l / Om)));
double t_2 = pow((l / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3)));
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t_1 + t_3))));
} else if (t_4 <= 2e+152) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U)))))));
} else {
tmp = sqrt((-2.0 * (U * ((n * pow(l, 2.0)) * ((2.0 / Om) - ((n * U_42_) / pow(Om, 2.0)))))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (l * (2.0 * (l / Om)));
double t_2 = Math.pow((l / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3)));
double tmp;
if (t_4 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t_1 + t_3))));
} else if (t_4 <= 2e+152) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U)))))));
} else {
tmp = Math.sqrt((-2.0 * (U * ((n * Math.pow(l, 2.0)) * ((2.0 / Om) - ((n * U_42_) / Math.pow(Om, 2.0)))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = t - (l * (2.0 * (l / Om))) t_2 = math.pow((l / Om), 2.0) t_3 = (n * t_2) * (U_42_ - U) t_4 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3))) tmp = 0 if t_4 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t_1 + t_3)))) elif t_4 <= 2e+152: tmp = t_4 elif t_4 <= math.inf: tmp = math.sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U))))))) else: tmp = math.sqrt((-2.0 * (U * ((n * math.pow(l, 2.0)) * ((2.0 / Om) - ((n * U_42_) / math.pow(Om, 2.0))))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))) t_2 = Float64(l / Om) ^ 2.0 t_3 = Float64(Float64(n * t_2) * Float64(U_42_ - U)) t_4 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_3))) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t_1 + t_3)))); elseif (t_4 <= 2e+152) tmp = t_4; elseif (t_4 <= Inf) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t_1 + Float64(n * Float64(t_2 * Float64(U_42_ - U))))))); else tmp = sqrt(Float64(-2.0 * Float64(U * Float64(Float64(n * (l ^ 2.0)) * Float64(Float64(2.0 / Om) - Float64(Float64(n * U_42_) / (Om ^ 2.0))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = t - (l * (2.0 * (l / Om))); t_2 = (l / Om) ^ 2.0; t_3 = (n * t_2) * (U_42_ - U); t_4 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3))); tmp = 0.0; if (t_4 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t_1 + t_3)))); elseif (t_4 <= 2e+152) tmp = t_4; elseif (t_4 <= Inf) tmp = sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U))))))); else tmp = sqrt((-2.0 * (U * ((n * (l ^ 2.0)) * ((2.0 / Om) - ((n * U_42_) / (Om ^ 2.0))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(n * t$95$2), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t$95$1 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 2e+152], t$95$4, If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t$95$1 + N[(n * N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(U * N[(N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\\
t_2 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \left(n \cdot t\_2\right) \cdot \left(U* - U\right)\\
t_4 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_3\right)}\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t\_1 + t\_3\right)\right)}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t\_1 + n \cdot \left(t\_2 \cdot \left(U* - U\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(U \cdot \left(\left(n \cdot {\ell}^{2}\right) \cdot \left(\frac{2}{Om} - \frac{n \cdot U*}{{Om}^{2}}\right)\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*))))) < 0.0Initial program 9.7%
Simplified48.6%
associate-*r/48.6%
associate-*l/48.6%
associate-*r*48.6%
Applied egg-rr48.6%
associate-*r*51.9%
sub-neg51.9%
distribute-lft-in51.9%
Applied egg-rr51.9%
distribute-lft-out51.9%
sub-neg51.9%
*-commutative51.9%
Simplified51.9%
if 0.0 < (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*))))) < 2.0000000000000001e152Initial program 98.6%
if 2.0000000000000001e152 < (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*))))) < +inf.0Initial program 33.5%
Simplified35.9%
associate-*r/35.9%
associate-*l/39.6%
associate-*r*39.6%
Applied egg-rr39.6%
if +inf.0 < (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 0.0%
Taylor expanded in l around inf 37.3%
associate-*r/37.3%
metadata-eval37.3%
associate-/l*36.5%
Simplified36.5%
Taylor expanded in U around 0 37.3%
associate-*r*37.5%
*-commutative37.5%
+-commutative37.5%
mul-1-neg37.5%
unsub-neg37.5%
associate-*r/37.5%
metadata-eval37.5%
*-commutative37.5%
Simplified37.5%
Final simplification63.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (- t (* l (* 2.0 (/ l Om)))))
(t_2 (pow (/ l Om) 2.0))
(t_3 (* (* n t_2) (- U* U)))
(t_4 (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_3)))))
(if (<= t_4 0.0)
(sqrt (* (* 2.0 n) (* U (+ t_1 t_3))))
(if (<= t_4 2e+152)
t_4
(if (<= t_4 INFINITY)
(sqrt (* (* 2.0 n) (* U (+ t_1 (* n (* t_2 (- U* U)))))))
(pow (* (* 2.0 (* n U)) (fma (/ (pow l 2.0) Om) -2.0 t)) 0.5))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (l * (2.0 * (l / Om)));
double t_2 = pow((l / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3)));
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t_1 + t_3))));
} else if (t_4 <= 2e+152) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U)))))));
} else {
tmp = pow(((2.0 * (n * U)) * fma((pow(l, 2.0) / Om), -2.0, t)), 0.5);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))) t_2 = Float64(l / Om) ^ 2.0 t_3 = Float64(Float64(n * t_2) * Float64(U_42_ - U)) t_4 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_3))) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t_1 + t_3)))); elseif (t_4 <= 2e+152) tmp = t_4; elseif (t_4 <= Inf) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t_1 + Float64(n * Float64(t_2 * Float64(U_42_ - U))))))); else tmp = Float64(Float64(2.0 * Float64(n * U)) * fma(Float64((l ^ 2.0) / Om), -2.0, t)) ^ 0.5; end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(n * t$95$2), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t$95$1 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 2e+152], t$95$4, If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t$95$1 + N[(n * N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0 + t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\\
t_2 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \left(n \cdot t\_2\right) \cdot \left(U* - U\right)\\
t_4 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_3\right)}\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t\_1 + t\_3\right)\right)}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t\_1 + n \cdot \left(t\_2 \cdot \left(U* - U\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)}^{0.5}\\
\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*))))) < 0.0Initial program 9.7%
Simplified48.6%
associate-*r/48.6%
associate-*l/48.6%
associate-*r*48.6%
Applied egg-rr48.6%
associate-*r*51.9%
sub-neg51.9%
distribute-lft-in51.9%
Applied egg-rr51.9%
distribute-lft-out51.9%
sub-neg51.9%
*-commutative51.9%
Simplified51.9%
if 0.0 < (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*))))) < 2.0000000000000001e152Initial program 98.6%
if 2.0000000000000001e152 < (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*))))) < +inf.0Initial program 33.5%
Simplified35.9%
associate-*r/35.9%
associate-*l/39.6%
associate-*r*39.6%
Applied egg-rr39.6%
if +inf.0 < (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 0.0%
Taylor expanded in n around 0 8.2%
associate-*r*5.1%
*-commutative5.1%
cancel-sign-sub-inv5.1%
metadata-eval5.1%
*-commutative5.1%
associate-*l*5.1%
*-commutative5.1%
Simplified5.1%
pow1/235.1%
+-commutative35.1%
fma-udef35.1%
*-commutative35.1%
Applied egg-rr35.1%
Final simplification63.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (- t (* l (* 2.0 (/ l Om)))))
(t_2 (pow (/ l Om) 2.0))
(t_3 (* (* n t_2) (- U* U)))
(t_4 (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) t_3)))))
(if (<= t_4 0.0)
(sqrt (* (* 2.0 n) (* U (+ t_1 t_3))))
(if (<= t_4 2e+152)
t_4
(sqrt (* (* 2.0 n) (* U (+ t_1 (* n (* t_2 (- U* U)))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (l * (2.0 * (l / Om)));
double t_2 = pow((l / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3)));
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t_1 + t_3))));
} else if (t_4 <= 2e+152) {
tmp = t_4;
} else {
tmp = sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = t - (l * (2.0d0 * (l / om)))
t_2 = (l / om) ** 2.0d0
t_3 = (n * t_2) * (u_42 - u)
t_4 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + t_3)))
if (t_4 <= 0.0d0) then
tmp = sqrt(((2.0d0 * n) * (u * (t_1 + t_3))))
else if (t_4 <= 2d+152) then
tmp = t_4
else
tmp = sqrt(((2.0d0 * n) * (u * (t_1 + (n * (t_2 * (u_42 - 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 t_1 = t - (l * (2.0 * (l / Om)));
double t_2 = Math.pow((l / Om), 2.0);
double t_3 = (n * t_2) * (U_42_ - U);
double t_4 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3)));
double tmp;
if (t_4 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t_1 + t_3))));
} else if (t_4 <= 2e+152) {
tmp = t_4;
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U)))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = t - (l * (2.0 * (l / Om))) t_2 = math.pow((l / Om), 2.0) t_3 = (n * t_2) * (U_42_ - U) t_4 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3))) tmp = 0 if t_4 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t_1 + t_3)))) elif t_4 <= 2e+152: tmp = t_4 else: tmp = math.sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U))))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))) t_2 = Float64(l / Om) ^ 2.0 t_3 = Float64(Float64(n * t_2) * Float64(U_42_ - U)) t_4 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_3))) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t_1 + t_3)))); elseif (t_4 <= 2e+152) tmp = t_4; else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t_1 + Float64(n * Float64(t_2 * Float64(U_42_ - U))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = t - (l * (2.0 * (l / Om))); t_2 = (l / Om) ^ 2.0; t_3 = (n * t_2) * (U_42_ - U); t_4 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + t_3))); tmp = 0.0; if (t_4 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t_1 + t_3)))); elseif (t_4 <= 2e+152) tmp = t_4; else tmp = sqrt(((2.0 * n) * (U * (t_1 + (n * (t_2 * (U_42_ - U))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(n * t$95$2), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t$95$1 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 2e+152], t$95$4, N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t$95$1 + N[(n * N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\\
t_2 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \left(n \cdot t\_2\right) \cdot \left(U* - U\right)\\
t_4 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_3\right)}\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t\_1 + t\_3\right)\right)}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t\_1 + n \cdot \left(t\_2 \cdot \left(U* - U\right)\right)\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*))))) < 0.0Initial program 9.7%
Simplified48.6%
associate-*r/48.6%
associate-*l/48.6%
associate-*r*48.6%
Applied egg-rr48.6%
associate-*r*51.9%
sub-neg51.9%
distribute-lft-in51.9%
Applied egg-rr51.9%
distribute-lft-out51.9%
sub-neg51.9%
*-commutative51.9%
Simplified51.9%
if 0.0 < (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*))))) < 2.0000000000000001e152Initial program 98.6%
if 2.0000000000000001e152 < (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 20.8%
Simplified23.4%
associate-*r/23.4%
associate-*l/29.7%
associate-*r*29.7%
Applied egg-rr29.7%
Final simplification59.4%
(FPCore (n U t l Om U*)
:precision binary64
(sqrt
(*
(* 2.0 n)
(*
U
(+ (- t (* l (* 2.0 (/ 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 - (l * (2.0 * (l / Om)))) + (n * (pow((l / Om), 2.0) * (U_42_ - U)))))));
}
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 - (l * (2.0d0 * (l / om)))) + (n * (((l / om) ** 2.0d0) * (u_42 - u)))))))
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 - (l * (2.0 * (l / Om)))) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U)))))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * n) * (U * ((t - (l * (2.0 * (l / Om)))) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U)))))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U))))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * ((t - (l * (2.0 * (l / Om)))) + (n * (((l / Om) ^ 2.0) * (U_42_ - U))))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}
\end{array}
Initial program 50.2%
Simplified52.2%
associate-*r/52.2%
associate-*l/55.3%
associate-*r*55.3%
Applied egg-rr55.3%
Final simplification55.3%
(FPCore (n U t l Om U*)
:precision binary64
(sqrt
(*
(* 2.0 n)
(*
U
(+ (- t (* l (* 2.0 (/ 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 - (l * (2.0 * (l / Om)))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U))))));
}
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 - (l * (2.0d0 * (l / om)))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u))))))
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 - (l * (2.0 * (l / Om)))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U))))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * n) * (U * ((t - (l * (2.0 * (l / Om)))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(l * Float64(2.0 * Float64(l / Om)))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * ((t - (l * (2.0 * (l / Om)))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U)))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(l * N[(2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\right)}
\end{array}
Initial program 50.2%
Simplified52.2%
associate-*r/52.2%
associate-*l/55.3%
associate-*r*55.3%
Applied egg-rr55.3%
associate-*r*56.0%
sub-neg56.0%
distribute-lft-in48.2%
Applied egg-rr48.2%
distribute-lft-out56.0%
sub-neg56.0%
*-commutative56.0%
Simplified56.0%
Final simplification56.0%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 7.5e+218) (sqrt (* (* 2.0 n) (* U (- t (* (pow l 2.0) (/ 2.0 Om)))))) (sqrt (fabs (* 2.0 (* U (* n t)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 7.5e+218) {
tmp = sqrt(((2.0 * n) * (U * (t - (pow(l, 2.0) * (2.0 / Om))))));
} else {
tmp = sqrt(fabs((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 (t <= 7.5d+218) then
tmp = sqrt(((2.0d0 * n) * (u * (t - ((l ** 2.0d0) * (2.0d0 / om))))))
else
tmp = sqrt(abs((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 (t <= 7.5e+218) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (Math.pow(l, 2.0) * (2.0 / Om))))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 7.5e+218: tmp = math.sqrt(((2.0 * n) * (U * (t - (math.pow(l, 2.0) * (2.0 / Om)))))) else: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 7.5e+218) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64((l ^ 2.0) * Float64(2.0 / Om)))))); else tmp = sqrt(abs(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 (t <= 7.5e+218) tmp = sqrt(((2.0 * n) * (U * (t - ((l ^ 2.0) * (2.0 / Om)))))); else tmp = sqrt(abs((2.0 * (U * (n * t))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 7.5e+218], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.5 \cdot 10^{+218}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - {\ell}^{2} \cdot \frac{2}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\end{array}
\end{array}
if t < 7.4999999999999993e218Initial program 51.7%
Simplified56.4%
Taylor expanded in Om around inf 44.7%
*-commutative44.7%
associate-*l/44.7%
associate-*r/44.7%
Simplified44.7%
if 7.4999999999999993e218 < t Initial program 36.1%
Taylor expanded in t around inf 51.5%
add-sqr-sqrt51.5%
pow1/251.5%
pow1/256.1%
pow-prod-down45.2%
pow245.2%
associate-*r*45.2%
Applied egg-rr45.2%
unpow1/245.2%
unpow245.2%
rem-sqrt-square57.1%
associate-*r*57.1%
Simplified57.1%
Final simplification45.9%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U -5000000000000.0)
(sqrt (fabs (* t (* n (* 2.0 U)))))
(if (<= U 1.9e+124)
(sqrt (fabs (* n (* t (* 2.0 U)))))
(* (sqrt (* 2.0 U)) (sqrt (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -5000000000000.0) {
tmp = sqrt(fabs((t * (n * (2.0 * U)))));
} else if (U <= 1.9e+124) {
tmp = sqrt(fabs((n * (t * (2.0 * U)))));
} else {
tmp = sqrt((2.0 * U)) * sqrt((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 (u <= (-5000000000000.0d0)) then
tmp = sqrt(abs((t * (n * (2.0d0 * u)))))
else if (u <= 1.9d+124) then
tmp = sqrt(abs((n * (t * (2.0d0 * u)))))
else
tmp = sqrt((2.0d0 * u)) * sqrt((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 (U <= -5000000000000.0) {
tmp = Math.sqrt(Math.abs((t * (n * (2.0 * U)))));
} else if (U <= 1.9e+124) {
tmp = Math.sqrt(Math.abs((n * (t * (2.0 * U)))));
} else {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -5000000000000.0: tmp = math.sqrt(math.fabs((t * (n * (2.0 * U))))) elif U <= 1.9e+124: tmp = math.sqrt(math.fabs((n * (t * (2.0 * U))))) else: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -5000000000000.0) tmp = sqrt(abs(Float64(t * Float64(n * Float64(2.0 * U))))); elseif (U <= 1.9e+124) tmp = sqrt(abs(Float64(n * Float64(t * Float64(2.0 * U))))); else tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -5000000000000.0) tmp = sqrt(abs((t * (n * (2.0 * U))))); elseif (U <= 1.9e+124) tmp = sqrt(abs((n * (t * (2.0 * U))))); else tmp = sqrt((2.0 * U)) * sqrt((n * t)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -5000000000000.0], N[Sqrt[N[Abs[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 1.9e+124], N[Sqrt[N[Abs[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -5000000000000:\\
\;\;\;\;\sqrt{\left|t \cdot \left(n \cdot \left(2 \cdot U\right)\right)\right|}\\
\mathbf{elif}\;U \leq 1.9 \cdot 10^{+124}:\\
\;\;\;\;\sqrt{\left|n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\end{array}
\end{array}
if U < -5e12Initial program 65.5%
Taylor expanded in t around inf 38.6%
associate-*r*43.0%
*-commutative43.0%
associate-*l*43.0%
*-commutative43.0%
associate-*r*43.0%
*-commutative43.0%
Simplified43.0%
add-sqr-sqrt43.0%
pow1/243.0%
pow1/249.8%
pow-prod-down32.9%
pow232.9%
*-commutative32.9%
associate-*r*32.9%
Applied egg-rr32.9%
unpow1/232.9%
*-commutative32.9%
*-commutative32.9%
associate-*r*32.9%
associate-*r*28.5%
unpow228.5%
rem-sqrt-square41.6%
associate-*r*50.5%
associate-*r*50.5%
*-commutative50.5%
*-commutative50.5%
*-commutative50.5%
associate-*r*50.5%
*-commutative50.5%
Simplified50.5%
if -5e12 < U < 1.8999999999999999e124Initial program 45.7%
Simplified51.9%
associate-*r/51.9%
associate-*l/56.1%
associate-*r*56.1%
Applied egg-rr56.1%
Taylor expanded in t around inf 34.5%
add-sqr-sqrt34.5%
pow1/234.5%
pow1/235.6%
pow-prod-down25.6%
pow225.6%
associate-*r*24.1%
Applied egg-rr24.1%
unpow1/224.1%
unpow224.1%
rem-sqrt-square31.2%
*-commutative31.2%
associate-*l*31.2%
*-commutative31.2%
associate-*r*31.2%
associate-*r*36.7%
Simplified36.7%
if 1.8999999999999999e124 < U Initial program 58.5%
Taylor expanded in t around inf 49.6%
pow1/249.6%
associate-*r*49.6%
unpow-prod-down75.0%
pow1/275.0%
Applied egg-rr75.0%
unpow1/275.0%
Simplified75.0%
Final simplification42.5%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U -50000000.0)
(sqrt (fabs (* t (* n (* 2.0 U)))))
(if (<= U 5e+122)
(sqrt (fabs (* n (* t (* 2.0 U)))))
(* (sqrt (* (* 2.0 n) t)) (sqrt U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -50000000.0) {
tmp = sqrt(fabs((t * (n * (2.0 * U)))));
} else if (U <= 5e+122) {
tmp = sqrt(fabs((n * (t * (2.0 * U)))));
} else {
tmp = sqrt(((2.0 * n) * t)) * sqrt(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 (u <= (-50000000.0d0)) then
tmp = sqrt(abs((t * (n * (2.0d0 * u)))))
else if (u <= 5d+122) then
tmp = sqrt(abs((n * (t * (2.0d0 * u)))))
else
tmp = sqrt(((2.0d0 * n) * t)) * sqrt(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 (U <= -50000000.0) {
tmp = Math.sqrt(Math.abs((t * (n * (2.0 * U)))));
} else if (U <= 5e+122) {
tmp = Math.sqrt(Math.abs((n * (t * (2.0 * U)))));
} else {
tmp = Math.sqrt(((2.0 * n) * t)) * Math.sqrt(U);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -50000000.0: tmp = math.sqrt(math.fabs((t * (n * (2.0 * U))))) elif U <= 5e+122: tmp = math.sqrt(math.fabs((n * (t * (2.0 * U))))) else: tmp = math.sqrt(((2.0 * n) * t)) * math.sqrt(U) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -50000000.0) tmp = sqrt(abs(Float64(t * Float64(n * Float64(2.0 * U))))); elseif (U <= 5e+122) tmp = sqrt(abs(Float64(n * Float64(t * Float64(2.0 * U))))); else tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -50000000.0) tmp = sqrt(abs((t * (n * (2.0 * U))))); elseif (U <= 5e+122) tmp = sqrt(abs((n * (t * (2.0 * U))))); else tmp = sqrt(((2.0 * n) * t)) * sqrt(U); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -50000000.0], N[Sqrt[N[Abs[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 5e+122], N[Sqrt[N[Abs[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -50000000:\\
\;\;\;\;\sqrt{\left|t \cdot \left(n \cdot \left(2 \cdot U\right)\right)\right|}\\
\mathbf{elif}\;U \leq 5 \cdot 10^{+122}:\\
\;\;\;\;\sqrt{\left|n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -5e7Initial program 65.5%
Taylor expanded in t around inf 38.6%
associate-*r*43.0%
*-commutative43.0%
associate-*l*43.0%
*-commutative43.0%
associate-*r*43.0%
*-commutative43.0%
Simplified43.0%
add-sqr-sqrt43.0%
pow1/243.0%
pow1/249.8%
pow-prod-down32.9%
pow232.9%
*-commutative32.9%
associate-*r*32.9%
Applied egg-rr32.9%
unpow1/232.9%
*-commutative32.9%
*-commutative32.9%
associate-*r*32.9%
associate-*r*28.5%
unpow228.5%
rem-sqrt-square41.6%
associate-*r*50.5%
associate-*r*50.5%
*-commutative50.5%
*-commutative50.5%
*-commutative50.5%
associate-*r*50.5%
*-commutative50.5%
Simplified50.5%
if -5e7 < U < 4.99999999999999989e122Initial program 45.7%
Simplified51.9%
associate-*r/51.9%
associate-*l/56.1%
associate-*r*56.1%
Applied egg-rr56.1%
Taylor expanded in t around inf 34.5%
add-sqr-sqrt34.5%
pow1/234.5%
pow1/235.6%
pow-prod-down25.6%
pow225.6%
associate-*r*24.1%
Applied egg-rr24.1%
unpow1/224.1%
unpow224.1%
rem-sqrt-square31.2%
*-commutative31.2%
associate-*l*31.2%
*-commutative31.2%
associate-*r*31.2%
associate-*r*36.7%
Simplified36.7%
if 4.99999999999999989e122 < U Initial program 58.5%
Taylor expanded in t around inf 49.6%
associate-*r*49.7%
*-commutative49.7%
associate-*l*49.7%
*-commutative49.7%
associate-*r*49.7%
*-commutative49.7%
Simplified49.7%
pow1/249.7%
associate-*r*49.6%
unpow-prod-down75.1%
*-commutative75.1%
pow1/275.1%
Applied egg-rr75.1%
unpow1/275.1%
*-commutative75.1%
Simplified75.1%
Final simplification42.5%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t -2e+79) (sqrt (fabs (* 2.0 (* U (* n t))))) (sqrt (fabs (* t (* n (* 2.0 U)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -2e+79) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else {
tmp = sqrt(fabs((t * (n * (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 (t <= (-2d+79)) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else
tmp = sqrt(abs((t * (n * (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 (t <= -2e+79) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else {
tmp = Math.sqrt(Math.abs((t * (n * (2.0 * U)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -2e+79: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) else: tmp = math.sqrt(math.fabs((t * (n * (2.0 * U))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -2e+79) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); else tmp = sqrt(abs(Float64(t * Float64(n * Float64(2.0 * U))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -2e+79) tmp = sqrt(abs((2.0 * (U * (n * t))))); else tmp = sqrt(abs((t * (n * (2.0 * U))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -2e+79], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|t \cdot \left(n \cdot \left(2 \cdot U\right)\right)\right|}\\
\end{array}
\end{array}
if t < -1.99999999999999993e79Initial program 49.4%
Taylor expanded in t around inf 56.5%
add-sqr-sqrt56.5%
pow1/256.5%
pow1/256.5%
pow-prod-down38.0%
pow238.0%
associate-*r*38.0%
Applied egg-rr38.0%
unpow1/238.0%
unpow238.0%
rem-sqrt-square57.6%
associate-*r*57.5%
Simplified57.5%
if -1.99999999999999993e79 < t Initial program 50.4%
Taylor expanded in t around inf 31.3%
associate-*r*32.6%
*-commutative32.6%
associate-*l*32.6%
*-commutative32.6%
associate-*r*32.6%
*-commutative32.6%
Simplified32.6%
add-sqr-sqrt32.6%
pow1/232.6%
pow1/234.5%
pow-prod-down24.2%
pow224.2%
*-commutative24.2%
associate-*r*24.2%
Applied egg-rr24.2%
unpow1/224.2%
*-commutative24.2%
*-commutative24.2%
associate-*r*24.2%
associate-*r*23.8%
unpow223.8%
rem-sqrt-square33.4%
associate-*r*35.5%
associate-*r*35.5%
*-commutative35.5%
*-commutative35.5%
*-commutative35.5%
associate-*r*35.5%
*-commutative35.5%
Simplified35.5%
Final simplification39.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U -10000000000.0) (sqrt (fabs (* t (* n (* 2.0 U))))) (sqrt (fabs (* n (* t (* 2.0 U)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -10000000000.0) {
tmp = sqrt(fabs((t * (n * (2.0 * U)))));
} else {
tmp = sqrt(fabs((n * (t * (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 (u <= (-10000000000.0d0)) then
tmp = sqrt(abs((t * (n * (2.0d0 * u)))))
else
tmp = sqrt(abs((n * (t * (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 (U <= -10000000000.0) {
tmp = Math.sqrt(Math.abs((t * (n * (2.0 * U)))));
} else {
tmp = Math.sqrt(Math.abs((n * (t * (2.0 * U)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -10000000000.0: tmp = math.sqrt(math.fabs((t * (n * (2.0 * U))))) else: tmp = math.sqrt(math.fabs((n * (t * (2.0 * U))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -10000000000.0) tmp = sqrt(abs(Float64(t * Float64(n * Float64(2.0 * U))))); else tmp = sqrt(abs(Float64(n * Float64(t * Float64(2.0 * U))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -10000000000.0) tmp = sqrt(abs((t * (n * (2.0 * U))))); else tmp = sqrt(abs((n * (t * (2.0 * U))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -10000000000.0], N[Sqrt[N[Abs[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -10000000000:\\
\;\;\;\;\sqrt{\left|t \cdot \left(n \cdot \left(2 \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right|}\\
\end{array}
\end{array}
if U < -1e10Initial program 65.5%
Taylor expanded in t around inf 38.6%
associate-*r*43.0%
*-commutative43.0%
associate-*l*43.0%
*-commutative43.0%
associate-*r*43.0%
*-commutative43.0%
Simplified43.0%
add-sqr-sqrt43.0%
pow1/243.0%
pow1/249.8%
pow-prod-down32.9%
pow232.9%
*-commutative32.9%
associate-*r*32.9%
Applied egg-rr32.9%
unpow1/232.9%
*-commutative32.9%
*-commutative32.9%
associate-*r*32.9%
associate-*r*28.5%
unpow228.5%
rem-sqrt-square41.6%
associate-*r*50.5%
associate-*r*50.5%
*-commutative50.5%
*-commutative50.5%
*-commutative50.5%
associate-*r*50.5%
*-commutative50.5%
Simplified50.5%
if -1e10 < U Initial program 47.1%
Simplified52.1%
associate-*r/52.1%
associate-*l/55.9%
associate-*r*55.9%
Applied egg-rr55.9%
Taylor expanded in t around inf 35.7%
add-sqr-sqrt35.7%
pow1/235.7%
pow1/236.8%
pow-prod-down26.5%
pow226.5%
associate-*r*25.1%
Applied egg-rr25.1%
unpow1/225.1%
unpow225.1%
rem-sqrt-square33.2%
*-commutative33.2%
associate-*l*33.2%
*-commutative33.2%
associate-*r*33.2%
associate-*r*37.7%
Simplified37.7%
Final simplification39.9%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (fabs (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(fabs((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(abs((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(Math.abs((2.0 * (U * (n * t)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt(math.fabs((2.0 * (U * (n * t)))))
function code(n, U, t, l, Om, U_42_) return sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(abs((2.0 * (U * (n * t))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}
\end{array}
Initial program 50.2%
Taylor expanded in t around inf 35.4%
add-sqr-sqrt35.4%
pow1/235.4%
pow1/236.3%
pow-prod-down26.1%
pow226.1%
associate-*r*26.1%
Applied egg-rr26.1%
unpow1/226.1%
unpow226.1%
rem-sqrt-square37.4%
associate-*r*37.3%
Simplified37.3%
Final simplification37.3%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t -4.8e+84) (sqrt (* 2.0 (* U (* n t)))) (pow (* t (* 2.0 (* n U))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -4.8e+84) {
tmp = sqrt((2.0 * (U * (n * t))));
} else {
tmp = pow((t * (2.0 * (n * U))), 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 (t <= (-4.8d+84)) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else
tmp = (t * (2.0d0 * (n * u))) ** 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 (t <= -4.8e+84) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else {
tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -4.8e+84: tmp = math.sqrt((2.0 * (U * (n * t)))) else: tmp = math.pow((t * (2.0 * (n * U))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -4.8e+84) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); else tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -4.8e+84) tmp = sqrt((2.0 * (U * (n * t)))); else tmp = (t * (2.0 * (n * U))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -4.8e+84], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if t < -4.7999999999999999e84Initial program 49.4%
Taylor expanded in t around inf 56.5%
if -4.7999999999999999e84 < t Initial program 50.4%
Taylor expanded in t around inf 31.3%
associate-*r*32.6%
*-commutative32.6%
associate-*l*32.6%
*-commutative32.6%
associate-*r*32.6%
*-commutative32.6%
Simplified32.6%
pow1/234.5%
*-commutative34.5%
associate-*r*34.5%
Applied egg-rr34.5%
Final simplification38.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= Om -1.35e+79) (sqrt (* (* 2.0 n) (* U t))) (pow (* (* n t) (* 2.0 U)) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -1.35e+79) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = pow(((n * t) * (2.0 * U)), 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 (om <= (-1.35d+79)) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = ((n * t) * (2.0d0 * u)) ** 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 (Om <= -1.35e+79) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -1.35e+79: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -1.35e+79) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -1.35e+79) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = ((n * t) * (2.0 * U)) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -1.35e+79], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.35 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\end{array}
\end{array}
if Om < -1.35e79Initial program 58.6%
Simplified60.8%
associate-*r/60.8%
associate-*l/65.5%
associate-*r*65.5%
Applied egg-rr65.5%
Taylor expanded in t around inf 53.3%
if -1.35e79 < Om Initial program 47.4%
Taylor expanded in t around inf 31.8%
pow1/232.9%
associate-*r*33.0%
Applied egg-rr33.0%
Final simplification38.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 1e-105) (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 <= 1e-105) {
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 <= 1d-105) 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 <= 1e-105) {
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 <= 1e-105: 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 <= 1e-105) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(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 <= 1e-105) 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, 1e-105], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $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 10^{-105}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 9.99999999999999965e-106Initial program 56.3%
Simplified57.4%
associate-*r/57.4%
associate-*l/59.6%
associate-*r*59.6%
Applied egg-rr59.6%
Taylor expanded in t around inf 40.9%
if 9.99999999999999965e-106 < l Initial program 36.8%
Taylor expanded in t around inf 27.1%
Final simplification36.6%
(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 50.2%
Taylor expanded in t around inf 35.4%
Final simplification35.4%
herbie shell --seed 2024039
(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*))))))