
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1)))))
(if (<= t_3 2e-157)
(* (sqrt (* 2.0 n)) (sqrt (+ (* -2.0 (/ (* U (pow l 2.0)) Om)) (* U t))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
(*
(sqrt (* U (* n (- (/ (* n U*) (pow Om 2.0)) (/ 2.0 Om)))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 2e-157) {
tmp = sqrt((2.0 * n)) * sqrt(((-2.0 * ((U * pow(l, 2.0)) / Om)) + (U * t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) - (2.0 / Om))))) * (l * sqrt(2.0));
}
return tmp;
}
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 2e-157) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt(((-2.0 * ((U * Math.pow(l, 2.0)) / Om)) + (U * t)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om))))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_2 = (2.0 * n) * U t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1))) tmp = 0 if t_3 <= 2e-157: tmp = math.sqrt((2.0 * n)) * math.sqrt(((-2.0 * ((U * math.pow(l, 2.0)) / Om)) + (U * t))) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))) else: tmp = math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om))))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1))) tmp = 0.0 if (t_3 <= 2e-157) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(Float64(-2.0 * Float64(Float64(U * (l ^ 2.0)) / Om)) + Float64(U * t)))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_1))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om))))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_2 = (2.0 * n) * U; t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1))); tmp = 0.0; if (t_3 <= 2e-157) tmp = sqrt((2.0 * n)) * sqrt(((-2.0 * ((U * (l ^ 2.0)) / Om)) + (U * t))); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))); else tmp = sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) - (2.0 / Om))))) * (l * sqrt(2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-157], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(-2.0 * N[(N[(U * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right)}\\
\mathbf{if}\;t_3 \leq 2 \cdot 10^{-157}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{-2 \cdot \frac{U \cdot {\ell}^{2}}{Om} + U \cdot t}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999989e-157Initial program 11.0%
Simplified13.0%
Applied egg-rr46.0%
*-commutative46.0%
*-commutative46.0%
Simplified46.0%
unpow246.0%
associate-*l/46.0%
Applied egg-rr46.0%
Taylor expanded in Om around inf 46.1%
if 1.99999999999999989e-157 < (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 65.0%
associate-*l/68.5%
Applied egg-rr68.5%
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%
Simplified14.2%
Taylor expanded in l around inf 28.0%
associate-/l*25.9%
associate-*r/25.9%
metadata-eval25.9%
Simplified25.9%
Taylor expanded in U around 0 28.0%
*-commutative28.0%
associate-*r/28.0%
metadata-eval28.0%
Simplified28.0%
Final simplification57.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (+ t (* -2.0 (/ (pow l 2.0) Om))))
(t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_3 (* (* 2.0 n) U))
(t_4 (sqrt (* t_3 (+ (- t (* 2.0 (/ (* l l) Om))) t_2)))))
(if (<= t_4 2e-157)
(* (sqrt (* 2.0 n)) (sqrt (* U t_1)))
(if (<= t_4 INFINITY)
(sqrt (* t_3 (+ (- t (* 2.0 (* l (/ l Om)))) t_2)))
(pow (* 2.0 (* (* n U) t_1)) 0.5)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t + (-2.0 * (pow(l, 2.0) / Om));
double t_2 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = (2.0 * n) * U;
double t_4 = sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_4 <= 2e-157) {
tmp = sqrt((2.0 * n)) * sqrt((U * t_1));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_3 * ((t - (2.0 * (l * (l / Om)))) + t_2)));
} else {
tmp = pow((2.0 * ((n * U) * t_1)), 0.5);
}
return tmp;
}
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t + (-2.0 * (Math.pow(l, 2.0) / Om));
double t_2 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = (2.0 * n) * U;
double t_4 = Math.sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2)));
double tmp;
if (t_4 <= 2e-157) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t_1));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_3 * ((t - (2.0 * (l * (l / Om)))) + t_2)));
} else {
tmp = Math.pow((2.0 * ((n * U) * t_1)), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = t + (-2.0 * (math.pow(l, 2.0) / Om)) t_2 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_3 = (2.0 * n) * U t_4 = math.sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2))) tmp = 0 if t_4 <= 2e-157: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t_1)) elif t_4 <= math.inf: tmp = math.sqrt((t_3 * ((t - (2.0 * (l * (l / Om)))) + t_2))) else: tmp = math.pow((2.0 * ((n * U) * t_1)), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om))) t_2 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = Float64(Float64(2.0 * n) * U) t_4 = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2))) tmp = 0.0 if (t_4 <= 2e-157) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t_1))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_2))); else tmp = Float64(2.0 * Float64(Float64(n * U) * t_1)) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = t + (-2.0 * ((l ^ 2.0) / Om)); t_2 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_3 = (2.0 * n) * U; t_4 = sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2))); tmp = 0.0; if (t_4 <= 2e-157) tmp = sqrt((2.0 * n)) * sqrt((U * t_1)); elseif (t_4 <= Inf) tmp = sqrt((t_3 * ((t - (2.0 * (l * (l / Om)))) + t_2))); else tmp = (2.0 * ((n * U) * t_1)) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 2e-157], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t + -2 \cdot \frac{{\ell}^{2}}{Om}\\
t_2 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := \sqrt{t_3 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2\right)}\\
\mathbf{if}\;t_4 \leq 2 \cdot 10^{-157}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t_1}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\sqrt{t_3 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t_1\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*))))) < 1.99999999999999989e-157Initial program 11.0%
Simplified13.0%
Applied egg-rr46.0%
*-commutative46.0%
*-commutative46.0%
Simplified46.0%
Taylor expanded in n around 0 46.0%
if 1.99999999999999989e-157 < (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 65.0%
associate-*l/68.5%
Applied egg-rr68.5%
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%
Simplified7.2%
Taylor expanded in n around 0 8.4%
pow1/235.9%
associate-*r*30.7%
cancel-sign-sub-inv30.7%
metadata-eval30.7%
Applied egg-rr30.7%
Final simplification58.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1)))))
(if (<= t_3 2e-157)
(* (sqrt (* 2.0 n)) (sqrt (+ (* -2.0 (/ (* U (pow l 2.0)) Om)) (* U t))))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
(pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ (pow l 2.0) Om))))) 0.5)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 2e-157) {
tmp = sqrt((2.0 * n)) * sqrt(((-2.0 * ((U * pow(l, 2.0)) / Om)) + (U * t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (pow(l, 2.0) / Om))))), 0.5);
}
return tmp;
}
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
double tmp;
if (t_3 <= 2e-157) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt(((-2.0 * ((U * Math.pow(l, 2.0)) / Om)) + (U * t)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (Math.pow(l, 2.0) / Om))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_2 = (2.0 * n) * U t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1))) tmp = 0 if t_3 <= 2e-157: tmp = math.sqrt((2.0 * n)) * math.sqrt(((-2.0 * ((U * math.pow(l, 2.0)) / Om)) + (U * t))) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))) else: tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (math.pow(l, 2.0) / Om))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1))) tmp = 0.0 if (t_3 <= 2e-157) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(Float64(-2.0 * Float64(Float64(U * (l ^ 2.0)) / Om)) + Float64(U * t)))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_1))); else tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_2 = (2.0 * n) * U; t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1))); tmp = 0.0; if (t_3 <= 2e-157) tmp = sqrt((2.0 * n)) * sqrt(((-2.0 * ((U * (l ^ 2.0)) / Om)) + (U * t))); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))); else tmp = (2.0 * ((n * U) * (t + (-2.0 * ((l ^ 2.0) / Om))))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-157], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(-2.0 * N[(N[(U * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right)}\\
\mathbf{if}\;t_3 \leq 2 \cdot 10^{-157}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{-2 \cdot \frac{U \cdot {\ell}^{2}}{Om} + U \cdot t}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\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*))))) < 1.99999999999999989e-157Initial program 11.0%
Simplified13.0%
Applied egg-rr46.0%
*-commutative46.0%
*-commutative46.0%
Simplified46.0%
unpow246.0%
associate-*l/46.0%
Applied egg-rr46.0%
Taylor expanded in Om around inf 46.1%
if 1.99999999999999989e-157 < (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 65.0%
associate-*l/68.5%
Applied egg-rr68.5%
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%
Simplified7.2%
Taylor expanded in n around 0 8.4%
pow1/235.9%
associate-*r*30.7%
cancel-sign-sub-inv30.7%
metadata-eval30.7%
Applied egg-rr30.7%
Final simplification58.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (- t (* 2.0 (* l (/ l Om)))))
(t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_3 (* (* 2.0 n) U))
(t_4 (* t_3 (+ (- t (* 2.0 (/ (* l l) Om))) t_2))))
(if (<= t_4 0.0)
(sqrt (* 2.0 (* U (* n t_1))))
(if (<= t_4 INFINITY)
(sqrt (* t_3 (+ t_1 t_2)))
(pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ (pow l 2.0) Om))))) 0.5)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (2.0 * (l * (l / Om)));
double t_2 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = (2.0 * n) * U;
double t_4 = t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2);
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt((2.0 * (U * (n * t_1))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_3 * (t_1 + t_2)));
} else {
tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (pow(l, 2.0) / Om))))), 0.5);
}
return tmp;
}
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (2.0 * (l * (l / Om)));
double t_2 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
double t_3 = (2.0 * n) * U;
double t_4 = t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2);
double tmp;
if (t_4 <= 0.0) {
tmp = Math.sqrt((2.0 * (U * (n * t_1))));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_3 * (t_1 + t_2)));
} else {
tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (Math.pow(l, 2.0) / Om))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = t - (2.0 * (l * (l / Om))) t_2 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_3 = (2.0 * n) * U t_4 = t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2) tmp = 0 if t_4 <= 0.0: tmp = math.sqrt((2.0 * (U * (n * t_1)))) elif t_4 <= math.inf: tmp = math.sqrt((t_3 * (t_1 + t_2))) else: tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (math.pow(l, 2.0) / Om))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) t_2 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_3 = Float64(Float64(2.0 * n) * U) t_4 = Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2)) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t_1)))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_3 * Float64(t_1 + t_2))); else tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = t - (2.0 * (l * (l / Om))); t_2 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_3 = (2.0 * n) * U; t_4 = t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2); tmp = 0.0; if (t_4 <= 0.0) tmp = sqrt((2.0 * (U * (n * t_1)))); elseif (t_4 <= Inf) tmp = sqrt((t_3 * (t_1 + t_2))); else tmp = (2.0 * ((n * U) * (t + (-2.0 * ((l ^ 2.0) / Om))))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(2.0 * N[(U * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
t_2 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := t_3 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2\right)\\
\mathbf{if}\;t_4 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t_1\right)\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\sqrt{t_3 \cdot \left(t_1 + t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 0.0Initial program 8.5%
Simplified14.7%
Taylor expanded in n around 0 31.4%
unpow240.1%
associate-*l/42.2%
Applied egg-rr35.6%
if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < +inf.0Initial program 65.1%
associate-*l/68.5%
Applied egg-rr68.5%
if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) Initial program 0.0%
Simplified3.1%
Taylor expanded in n around 0 6.9%
pow1/237.6%
associate-*r*31.6%
cancel-sign-sub-inv31.6%
metadata-eval31.6%
Applied egg-rr31.6%
Final simplification56.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= n -3.85e-112) (not (<= n 2.95e-95)))
(sqrt
(*
(* 2.0 n)
(*
U
(+
(+ t (* -2.0 (/ l (/ Om l))))
(* n (* (pow (/ l Om) 2.0) (- U* U)))))))
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -3.85e-112) || !(n <= 2.95e-95)) {
tmp = sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (pow((l / Om), 2.0) * (U_42_ - U)))))));
} else {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((n <= (-3.85d-112)) .or. (.not. (n <= 2.95d-95))) then
tmp = sqrt(((2.0d0 * n) * (u * ((t + ((-2.0d0) * (l / (om / l)))) + (n * (((l / om) ** 2.0d0) * (u_42 - u)))))))
else
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -3.85e-112) || !(n <= 2.95e-95)) {
tmp = Math.sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U)))))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (n <= -3.85e-112) or not (n <= 2.95e-95): tmp = math.sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U))))))) else: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((n <= -3.85e-112) || !(n <= 2.95e-95)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U))))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((n <= -3.85e-112) || ~((n <= 2.95e-95))) tmp = sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (((l / Om) ^ 2.0) * (U_42_ - U))))))); else tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[n, -3.85e-112], N[Not[LessEqual[n, 2.95e-95]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t + N[(-2.0 * N[(l / N[(Om / l), $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], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -3.85 \cdot 10^{-112} \lor \neg \left(n \leq 2.95 \cdot 10^{-95}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if n < -3.84999999999999979e-112 or 2.9499999999999999e-95 < n Initial program 53.7%
Simplified56.8%
if -3.84999999999999979e-112 < n < 2.9499999999999999e-95Initial program 31.0%
Simplified35.7%
Taylor expanded in n around 0 38.4%
unpow226.4%
associate-*l/30.1%
Applied egg-rr46.7%
Final simplification52.6%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (or (<= n -10500000000.0) (not (<= n 1.76e-81))) (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ (pow l 2.0) Om))))) 0.5) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -10500000000.0) || !(n <= 1.76e-81)) {
tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (pow(l, 2.0) / Om))))), 0.5);
} else {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((n <= (-10500000000.0d0)) .or. (.not. (n <= 1.76d-81))) then
tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * ((l ** 2.0d0) / om))))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -10500000000.0) || !(n <= 1.76e-81)) {
tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (Math.pow(l, 2.0) / Om))))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (n <= -10500000000.0) or not (n <= 1.76e-81): tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (math.pow(l, 2.0) / Om))))), 0.5) else: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((n <= -10500000000.0) || !(n <= 1.76e-81)) tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om))))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((n <= -10500000000.0) || ~((n <= 1.76e-81))) tmp = (2.0 * ((n * U) * (t + (-2.0 * ((l ^ 2.0) / Om))))) ^ 0.5; else tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[n, -10500000000.0], N[Not[LessEqual[n, 1.76e-81]], $MachinePrecision]], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -10500000000 \lor \neg \left(n \leq 1.76 \cdot 10^{-81}\right):\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if n < -1.05e10 or 1.75999999999999989e-81 < n Initial program 54.8%
Simplified48.7%
Taylor expanded in n around 0 40.8%
pow1/252.4%
associate-*r*53.0%
cancel-sign-sub-inv53.0%
metadata-eval53.0%
Applied egg-rr53.0%
if -1.05e10 < n < 1.75999999999999989e-81Initial program 34.3%
Simplified39.5%
Taylor expanded in n around 0 40.5%
unpow224.2%
associate-*l/27.1%
Applied egg-rr47.9%
Final simplification50.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U* -8.5e+257)
(sqrt (fabs (* 2.0 (* U (* n t)))))
(if (<= U* -9.2e+163)
(/ 1.0 (/ (/ Om l) (* (sqrt (* U U*)) (* n (sqrt 2.0)))))
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -8.5e+257) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else if (U_42_ <= -9.2e+163) {
tmp = 1.0 / ((Om / l) / (sqrt((U * U_42_)) * (n * sqrt(2.0))));
} else {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= (-8.5d+257)) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else if (u_42 <= (-9.2d+163)) then
tmp = 1.0d0 / ((om / l) / (sqrt((u * u_42)) * (n * sqrt(2.0d0))))
else
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -8.5e+257) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else if (U_42_ <= -9.2e+163) {
tmp = 1.0 / ((Om / l) / (Math.sqrt((U * U_42_)) * (n * Math.sqrt(2.0))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -8.5e+257: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) elif U_42_ <= -9.2e+163: tmp = 1.0 / ((Om / l) / (math.sqrt((U * U_42_)) * (n * math.sqrt(2.0)))) else: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -8.5e+257) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); elseif (U_42_ <= -9.2e+163) tmp = Float64(1.0 / Float64(Float64(Om / l) / Float64(sqrt(Float64(U * U_42_)) * Float64(n * sqrt(2.0))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -8.5e+257) tmp = sqrt(abs((2.0 * (U * (n * t))))); elseif (U_42_ <= -9.2e+163) tmp = 1.0 / ((Om / l) / (sqrt((U * U_42_)) * (n * sqrt(2.0)))); else tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, -8.5e+257], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U$42$, -9.2e+163], N[(1.0 / N[(N[(Om / l), $MachinePrecision] / N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -8.5 \cdot 10^{+257}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;U* \leq -9.2 \cdot 10^{+163}:\\
\;\;\;\;\frac{1}{\frac{\frac{Om}{\ell}}{\sqrt{U \cdot U*} \cdot \left(n \cdot \sqrt{2}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if U* < -8.49999999999999952e257Initial program 54.7%
Simplified51.8%
Taylor expanded in l around 0 33.7%
add-sqr-sqrt33.7%
pow1/233.7%
pow1/246.2%
pow-prod-down40.2%
pow240.2%
associate-*r*40.2%
Applied egg-rr40.2%
unpow1/240.2%
unpow240.2%
rem-sqrt-square46.7%
associate-*r*46.7%
Simplified46.7%
if -8.49999999999999952e257 < U* < -9.20000000000000007e163Initial program 28.1%
Simplified24.4%
Taylor expanded in U* around inf 24.1%
Taylor expanded in n around 0 22.4%
associate-*l/22.4%
Simplified22.4%
clear-num22.4%
inv-pow22.4%
associate-*l*22.4%
Applied egg-rr22.4%
unpow-122.4%
associate-/r*18.7%
*-commutative18.7%
Simplified18.7%
if -9.20000000000000007e163 < U* Initial program 45.3%
Simplified45.0%
Taylor expanded in n around 0 43.9%
unpow223.1%
associate-*l/25.8%
Applied egg-rr48.9%
Final simplification45.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (or (<= Om -1.65e-197) (not (<= Om 2.55e-152))) (sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om)))))))) (* (sqrt (* U U*)) (/ (* l (* n (sqrt 2.0))) Om))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.65e-197) || !(Om <= 2.55e-152)) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = sqrt((U * U_42_)) * ((l * (n * sqrt(2.0))) / Om);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((om <= (-1.65d-197)) .or. (.not. (om <= 2.55d-152))) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
else
tmp = sqrt((u * u_42)) * ((l * (n * sqrt(2.0d0))) / om)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.65e-197) || !(Om <= 2.55e-152)) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
} else {
tmp = Math.sqrt((U * U_42_)) * ((l * (n * Math.sqrt(2.0))) / Om);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -1.65e-197) or not (Om <= 2.55e-152): tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) else: tmp = math.sqrt((U * U_42_)) * ((l * (n * math.sqrt(2.0))) / Om) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -1.65e-197) || !(Om <= 2.55e-152)) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); else tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(Float64(l * Float64(n * sqrt(2.0))) / Om)); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -1.65e-197) || ~((Om <= 2.55e-152))) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); else tmp = sqrt((U * U_42_)) * ((l * (n * sqrt(2.0))) / Om); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -1.65e-197], N[Not[LessEqual[Om, 2.55e-152]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.65 \cdot 10^{-197} \lor \neg \left(Om \leq 2.55 \cdot 10^{-152}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om}\\
\end{array}
\end{array}
if Om < -1.6499999999999999e-197 or 2.5500000000000002e-152 < Om Initial program 46.1%
Simplified45.8%
Taylor expanded in n around 0 44.7%
unpow226.4%
associate-*l/29.6%
Applied egg-rr49.7%
if -1.6499999999999999e-197 < Om < 2.5500000000000002e-152Initial program 34.8%
Simplified34.5%
Taylor expanded in U* around inf 35.0%
Taylor expanded in n around 0 39.6%
Final simplification48.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U* -2.3e+258)
(sqrt (fabs (* 2.0 (* U (* n t)))))
(if (<= U* -9.2e+163)
(* (sqrt (* U U*)) (/ l (/ Om (* n (sqrt 2.0)))))
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -2.3e+258) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else if (U_42_ <= -9.2e+163) {
tmp = sqrt((U * U_42_)) * (l / (Om / (n * sqrt(2.0))));
} else {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= (-2.3d+258)) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else if (u_42 <= (-9.2d+163)) then
tmp = sqrt((u * u_42)) * (l / (om / (n * sqrt(2.0d0))))
else
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -2.3e+258) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else if (U_42_ <= -9.2e+163) {
tmp = Math.sqrt((U * U_42_)) * (l / (Om / (n * Math.sqrt(2.0))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -2.3e+258: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) elif U_42_ <= -9.2e+163: tmp = math.sqrt((U * U_42_)) * (l / (Om / (n * math.sqrt(2.0)))) else: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -2.3e+258) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); elseif (U_42_ <= -9.2e+163) tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(l / Float64(Om / Float64(n * sqrt(2.0))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -2.3e+258) tmp = sqrt(abs((2.0 * (U * (n * t))))); elseif (U_42_ <= -9.2e+163) tmp = sqrt((U * U_42_)) * (l / (Om / (n * sqrt(2.0)))); else tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, -2.3e+258], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U$42$, -9.2e+163], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(l / N[(Om / N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -2.3 \cdot 10^{+258}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;U* \leq -9.2 \cdot 10^{+163}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \frac{\ell}{\frac{Om}{n \cdot \sqrt{2}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if U* < -2.3000000000000001e258Initial program 54.7%
Simplified51.8%
Taylor expanded in l around 0 33.7%
add-sqr-sqrt33.7%
pow1/233.7%
pow1/246.2%
pow-prod-down40.2%
pow240.2%
associate-*r*40.2%
Applied egg-rr40.2%
unpow1/240.2%
unpow240.2%
rem-sqrt-square46.7%
associate-*r*46.7%
Simplified46.7%
if -2.3000000000000001e258 < U* < -9.20000000000000007e163Initial program 28.1%
Simplified24.4%
Taylor expanded in U* around inf 24.1%
Taylor expanded in n around 0 22.4%
associate-*l/22.4%
Simplified22.4%
Taylor expanded in l around 0 22.4%
*-commutative22.4%
associate-/l*22.4%
Simplified22.4%
if -9.20000000000000007e163 < U* Initial program 45.3%
Simplified45.0%
Taylor expanded in n around 0 43.9%
unpow223.1%
associate-*l/25.8%
Applied egg-rr48.9%
Final simplification46.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U* -1.6e+258)
(sqrt (fabs (* 2.0 (* U (* n t)))))
(if (<= U* -9.2e+163)
(/ (* l (* (sqrt (* U U*)) (* n (sqrt 2.0)))) Om)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.6e+258) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else if (U_42_ <= -9.2e+163) {
tmp = (l * (sqrt((U * U_42_)) * (n * sqrt(2.0)))) / Om;
} else {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= (-1.6d+258)) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else if (u_42 <= (-9.2d+163)) then
tmp = (l * (sqrt((u * u_42)) * (n * sqrt(2.0d0)))) / om
else
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.6e+258) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else if (U_42_ <= -9.2e+163) {
tmp = (l * (Math.sqrt((U * U_42_)) * (n * Math.sqrt(2.0)))) / Om;
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -1.6e+258: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) elif U_42_ <= -9.2e+163: tmp = (l * (math.sqrt((U * U_42_)) * (n * math.sqrt(2.0)))) / Om else: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -1.6e+258) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); elseif (U_42_ <= -9.2e+163) tmp = Float64(Float64(l * Float64(sqrt(Float64(U * U_42_)) * Float64(n * sqrt(2.0)))) / Om); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -1.6e+258) tmp = sqrt(abs((2.0 * (U * (n * t))))); elseif (U_42_ <= -9.2e+163) tmp = (l * (sqrt((U * U_42_)) * (n * sqrt(2.0)))) / Om; else tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, -1.6e+258], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U$42$, -9.2e+163], N[(N[(l * N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1.6 \cdot 10^{+258}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;U* \leq -9.2 \cdot 10^{+163}:\\
\;\;\;\;\frac{\ell \cdot \left(\sqrt{U \cdot U*} \cdot \left(n \cdot \sqrt{2}\right)\right)}{Om}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if U* < -1.60000000000000005e258Initial program 54.7%
Simplified51.8%
Taylor expanded in l around 0 33.7%
add-sqr-sqrt33.7%
pow1/233.7%
pow1/246.2%
pow-prod-down40.2%
pow240.2%
associate-*r*40.2%
Applied egg-rr40.2%
unpow1/240.2%
unpow240.2%
rem-sqrt-square46.7%
associate-*r*46.7%
Simplified46.7%
if -1.60000000000000005e258 < U* < -9.20000000000000007e163Initial program 28.1%
Simplified24.4%
Taylor expanded in U* around inf 24.1%
Taylor expanded in n around 0 22.4%
associate-*l/22.4%
Simplified22.4%
Taylor expanded in l around 0 22.4%
associate-*r*22.5%
*-commutative22.5%
associate-*r*22.4%
associate-*r*22.4%
*-commutative22.4%
Simplified22.4%
if -9.20000000000000007e163 < U* Initial program 45.3%
Simplified45.0%
Taylor expanded in n around 0 43.9%
unpow223.1%
associate-*l/25.8%
Applied egg-rr48.9%
Final simplification46.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l (/ l Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l * (l / om))))))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om))))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l * (l / Om)))))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}
\end{array}
Initial program 44.3%
Simplified44.0%
Taylor expanded in n around 0 40.6%
unpow225.1%
associate-*l/27.8%
Applied egg-rr44.8%
Final simplification44.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (pow (* (* n t) (* 2.0 U)) 0.5))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow(((n * t) * (2.0 * U)), 0.5);
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = ((n * t) * (2.0d0 * u)) ** 0.5d0
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow(((n * t) * (2.0 * U)), 0.5);
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.pow(((n * t) * (2.0 * U)), 0.5)
l = abs(l) function code(n, U, t, l, Om, U_42_) return Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5 end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = ((n * t) * (2.0 * U)) ^ 0.5; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}
\end{array}
Initial program 44.3%
Simplified47.0%
Taylor expanded in l around 0 34.2%
pow1/237.4%
associate-*r*37.4%
Applied egg-rr37.4%
Final simplification37.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * t))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 44.3%
Simplified47.0%
Taylor expanded in l around 0 34.2%
Final simplification34.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* n t) (* 2.0 U))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((n * t) * (2.0 * U)));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt(((n * t) * (2.0d0 * u)))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt(((n * t) * (2.0 * U)));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((n * t) * (2.0 * U)))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(n * t) * Float64(2.0 * U))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((n * t) * (2.0 * U))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}
\end{array}
Initial program 44.3%
Simplified47.0%
Taylor expanded in l around 0 34.2%
associate-*r*31.0%
*-commutative31.0%
Simplified31.0%
Taylor expanded in n around 0 34.2%
associate-*r*34.2%
*-commutative34.2%
Simplified34.2%
Final simplification34.2%
herbie shell --seed 2023313
(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*))))))