
(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 17 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
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(*
(sqrt (* 2.0 n))
(sqrt (* U (+ t (* (/ l Om) (fma l -2.0 (* (* l U*) (/ n Om))))))))
(if (<= t_1 5e+252)
(sqrt t_1)
(sqrt
(+
(* 2.0 (* n (* U t)))
(*
2.0
(* (/ n (/ Om (* U l))) (+ (* l -2.0) (/ (* n (* l U*)) Om))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t + ((l / Om) * fma(l, -2.0, ((l * U_42_) * (n / Om)))))));
} else if (t_1 <= 5e+252) {
tmp = sqrt(t_1);
} else {
tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om))))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(Float64(l * U_42_) * Float64(n / Om)))))))); elseif (t_1 <= 5e+252) tmp = sqrt(t_1); else tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(n / Float64(Om / Float64(U * l))) * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om)))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(N[(l * U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+252], N[Sqrt[t$95$1], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \left(\ell \cdot U*\right) \cdot \frac{n}{Om}\right)\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+252}:\\
\;\;\;\;\sqrt{t_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \left(\frac{n}{\frac{Om}{U \cdot \ell}} \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 0.0Initial program 4.3%
Simplified42.7%
Taylor expanded in U* around inf 39.3%
associate-/l*42.7%
Simplified42.7%
sqrt-prod50.0%
associate-/r/50.0%
Applied egg-rr50.0%
associate-*l/43.6%
fma-udef43.6%
*-commutative43.6%
associate-*l/40.4%
associate-*l/43.6%
*-commutative43.6%
fma-udef43.6%
associate-*l/50.0%
*-commutative50.0%
Simplified50.0%
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*)))) < 4.9999999999999997e252Initial program 96.7%
if 4.9999999999999997e252 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) Initial program 19.0%
Simplified36.8%
Taylor expanded in t around inf 46.1%
div-inv46.1%
associate-/l*42.4%
*-commutative42.4%
*-commutative42.4%
Applied egg-rr42.4%
associate-*l*41.0%
+-commutative41.0%
associate-/r/44.6%
*-commutative44.6%
Simplified44.6%
Taylor expanded in U* around inf 45.0%
Taylor expanded in n around 0 45.0%
associate-/l*47.2%
Simplified47.2%
Final simplification66.1%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U t)))
(if (<= t_1 4e+126)
t_1
(sqrt
(+
(* 2.0 (* n (* U t)))
(*
2.0
(* (/ n (/ Om (* U l))) (+ (* l -2.0) (/ (* n (* l U*)) Om))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
} else if (t_1 <= 4e+126) {
tmp = t_1;
} else {
tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om))))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 0.0d0) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
else if (t_1 <= 4d+126) then
tmp = t_1
else
tmp = sqrt(((2.0d0 * (n * (u * t))) + (2.0d0 * ((n / (om / (u * l))) * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
} else if (t_1 <= 4e+126) {
tmp = t_1;
} else {
tmp = Math.sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) elif t_1 <= 4e+126: tmp = t_1 else: tmp = math.sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om)))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); elseif (t_1 <= 4e+126) tmp = t_1; else tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(n / Float64(Om / Float64(U * l))) * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om)))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * n)) * sqrt((U * t)); elseif (t_1 <= 4e+126) tmp = t_1; else tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om)))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+126], t$95$1, N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+126}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \left(\frac{n}{\frac{Om}{U \cdot \ell}} \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\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 5.3%
Simplified40.1%
Taylor expanded in t around inf 29.3%
sqrt-prod46.3%
*-commutative46.3%
Applied egg-rr46.3%
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*))))) < 3.9999999999999997e126Initial program 96.7%
if 3.9999999999999997e126 < (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 18.2%
Simplified37.5%
Taylor expanded in t around inf 45.6%
div-inv45.6%
associate-/l*42.1%
*-commutative42.1%
*-commutative42.1%
Applied egg-rr42.1%
associate-*l*41.4%
+-commutative41.4%
associate-/r/44.9%
*-commutative44.9%
Simplified44.9%
Taylor expanded in U* around inf 44.6%
Taylor expanded in n around 0 44.6%
associate-/l*46.7%
Simplified46.7%
Final simplification65.4%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l -2.2e-15)
(sqrt
(+
(* 2.0 (* n (* U t)))
(* 2.0 (* (/ n (/ Om (* U l))) (+ (* l -2.0) (/ (* n (* l U*)) Om))))))
(if (<= l 6.2e+103)
(sqrt
(*
(* 2.0 n)
(* U (+ t (* (/ l Om) (fma l -2.0 (/ n (/ Om (* l U*)))))))))
(*
(* l (sqrt 2.0))
(sqrt (/ n (/ Om (* U (+ -2.0 (/ n (/ Om (- U* U))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= -2.2e-15) {
tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om))))));
} else if (l <= 6.2e+103) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l / Om) * fma(l, -2.0, (n / (Om / (l * U_42_)))))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((n / (Om / (U * (-2.0 + (n / (Om / (U_42_ - U))))))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= -2.2e-15) tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(n / Float64(Om / Float64(U * l))) * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om)))))); elseif (l <= 6.2e+103) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(n / Float64(Om / Float64(l * U_42_))))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / Float64(U_42_ - U))))))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, -2.2e-15], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 6.2e+103], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(n / N[(Om / N[(l * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.2 \cdot 10^{-15}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \left(\frac{n}{\frac{Om}{U \cdot \ell}} \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)\right)}\\
\mathbf{elif}\;\ell \leq 6.2 \cdot 10^{+103}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{n}{\frac{Om}{\ell \cdot U*}}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U* - U}}\right)}}}\\
\end{array}
\end{array}
if l < -2.19999999999999986e-15Initial program 25.7%
Simplified45.2%
Taylor expanded in t around inf 49.0%
div-inv49.1%
associate-/l*46.3%
*-commutative46.3%
*-commutative46.3%
Applied egg-rr46.3%
associate-*l*44.8%
+-commutative44.8%
associate-/r/47.7%
*-commutative47.7%
Simplified47.7%
Taylor expanded in U* around inf 48.2%
Taylor expanded in n around 0 48.1%
associate-/l*50.9%
Simplified50.9%
if -2.19999999999999986e-15 < l < 6.2000000000000003e103Initial program 62.1%
Simplified61.4%
Taylor expanded in U* around inf 65.0%
associate-/l*68.4%
Simplified68.4%
if 6.2000000000000003e103 < l Initial program 26.1%
Simplified48.9%
Taylor expanded in t around inf 45.9%
div-inv45.9%
associate-/l*45.9%
*-commutative45.9%
*-commutative45.9%
Applied egg-rr45.9%
associate-*l*50.0%
+-commutative50.0%
associate-/r/52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in l around inf 65.6%
associate-/l*65.6%
*-commutative65.6%
sub-neg65.6%
associate-/l*71.9%
metadata-eval71.9%
Simplified71.9%
Final simplification64.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (+ (* l -2.0) (/ (* n (* l U*)) Om))) (t_2 (* 2.0 (* n (* U t)))))
(if (<= l -3.9e-26)
(sqrt (+ t_2 (* 2.0 (* (/ n (/ Om (* U l))) t_1))))
(if (<= l 1e-112)
(sqrt (* (* 2.0 n) (* U (+ t (/ (* l t_1) Om)))))
(if (<= l 2.65e+208)
(sqrt
(+
t_2
(*
2.0
(*
(+ (* l -2.0) (* (/ n Om) (* l (- U* U))))
(* (* n (* U l)) (/ 1.0 Om))))))
(*
(sqrt 2.0)
(* l (sqrt (/ n (/ Om (* U (+ -2.0 (* U* (/ n Om))))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * -2.0) + ((n * (l * U_42_)) / Om);
double t_2 = 2.0 * (n * (U * t));
double tmp;
if (l <= -3.9e-26) {
tmp = sqrt((t_2 + (2.0 * ((n / (Om / (U * l))) * t_1))));
} else if (l <= 1e-112) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * t_1) / Om)))));
} else if (l <= 2.65e+208) {
tmp = sqrt((t_2 + (2.0 * (((l * -2.0) + ((n / Om) * (l * (U_42_ - U)))) * ((n * (U * l)) * (1.0 / Om))))));
} else {
tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (U_42_ * (n / Om))))))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (l * (-2.0d0)) + ((n * (l * u_42)) / om)
t_2 = 2.0d0 * (n * (u * t))
if (l <= (-3.9d-26)) then
tmp = sqrt((t_2 + (2.0d0 * ((n / (om / (u * l))) * t_1))))
else if (l <= 1d-112) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * t_1) / om)))))
else if (l <= 2.65d+208) then
tmp = sqrt((t_2 + (2.0d0 * (((l * (-2.0d0)) + ((n / om) * (l * (u_42 - u)))) * ((n * (u * l)) * (1.0d0 / om))))))
else
tmp = sqrt(2.0d0) * (l * sqrt((n / (om / (u * ((-2.0d0) + (u_42 * (n / om))))))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * -2.0) + ((n * (l * U_42_)) / Om);
double t_2 = 2.0 * (n * (U * t));
double tmp;
if (l <= -3.9e-26) {
tmp = Math.sqrt((t_2 + (2.0 * ((n / (Om / (U * l))) * t_1))));
} else if (l <= 1e-112) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * t_1) / Om)))));
} else if (l <= 2.65e+208) {
tmp = Math.sqrt((t_2 + (2.0 * (((l * -2.0) + ((n / Om) * (l * (U_42_ - U)))) * ((n * (U * l)) * (1.0 / Om))))));
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt((n / (Om / (U * (-2.0 + (U_42_ * (n / Om))))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = (l * -2.0) + ((n * (l * U_42_)) / Om) t_2 = 2.0 * (n * (U * t)) tmp = 0 if l <= -3.9e-26: tmp = math.sqrt((t_2 + (2.0 * ((n / (Om / (U * l))) * t_1)))) elif l <= 1e-112: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * t_1) / Om))))) elif l <= 2.65e+208: tmp = math.sqrt((t_2 + (2.0 * (((l * -2.0) + ((n / Om) * (l * (U_42_ - U)))) * ((n * (U * l)) * (1.0 / Om)))))) else: tmp = math.sqrt(2.0) * (l * math.sqrt((n / (Om / (U * (-2.0 + (U_42_ * (n / Om)))))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om)) t_2 = Float64(2.0 * Float64(n * Float64(U * t))) tmp = 0.0 if (l <= -3.9e-26) tmp = sqrt(Float64(t_2 + Float64(2.0 * Float64(Float64(n / Float64(Om / Float64(U * l))) * t_1)))); elseif (l <= 1e-112) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * t_1) / Om))))); elseif (l <= 2.65e+208) tmp = sqrt(Float64(t_2 + Float64(2.0 * Float64(Float64(Float64(l * -2.0) + Float64(Float64(n / Om) * Float64(l * Float64(U_42_ - U)))) * Float64(Float64(n * Float64(U * l)) * Float64(1.0 / Om)))))); else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(U_42_ * Float64(n / Om))))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l * -2.0) + ((n * (l * U_42_)) / Om); t_2 = 2.0 * (n * (U * t)); tmp = 0.0; if (l <= -3.9e-26) tmp = sqrt((t_2 + (2.0 * ((n / (Om / (U * l))) * t_1)))); elseif (l <= 1e-112) tmp = sqrt(((2.0 * n) * (U * (t + ((l * t_1) / Om))))); elseif (l <= 2.65e+208) tmp = sqrt((t_2 + (2.0 * (((l * -2.0) + ((n / Om) * (l * (U_42_ - U)))) * ((n * (U * l)) * (1.0 / Om)))))); else tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (U_42_ * (n / Om)))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -3.9e-26], N[Sqrt[N[(t$95$2 + N[(2.0 * N[(N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1e-112], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * t$95$1), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.65e+208], N[Sqrt[N[(t$95$2 + N[(2.0 * N[(N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n / Om), $MachinePrecision] * N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * N[(1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\\
t_2 := 2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\\
\mathbf{if}\;\ell \leq -3.9 \cdot 10^{-26}:\\
\;\;\;\;\sqrt{t_2 + 2 \cdot \left(\frac{n}{\frac{Om}{U \cdot \ell}} \cdot t_1\right)}\\
\mathbf{elif}\;\ell \leq 10^{-112}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot t_1}{Om}\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.65 \cdot 10^{+208}:\\
\;\;\;\;\sqrt{t_2 + 2 \cdot \left(\left(\ell \cdot -2 + \frac{n}{Om} \cdot \left(\ell \cdot \left(U* - U\right)\right)\right) \cdot \left(\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \frac{1}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)}}}\right)\\
\end{array}
\end{array}
if l < -3.89999999999999986e-26Initial program 27.9%
Simplified46.8%
Taylor expanded in t around inf 50.5%
div-inv50.6%
associate-/l*47.8%
*-commutative47.8%
*-commutative47.8%
Applied egg-rr47.8%
associate-*l*46.4%
+-commutative46.4%
associate-/r/49.2%
*-commutative49.2%
Simplified49.2%
Taylor expanded in U* around inf 49.7%
Taylor expanded in n around 0 49.6%
associate-/l*52.3%
Simplified52.3%
if -3.89999999999999986e-26 < l < 9.9999999999999995e-113Initial program 62.2%
Simplified62.4%
Taylor expanded in U around 0 67.3%
if 9.9999999999999995e-113 < l < 2.65e208Initial program 47.8%
Simplified52.8%
Taylor expanded in t around inf 51.0%
div-inv51.0%
associate-/l*54.4%
*-commutative54.4%
*-commutative54.4%
Applied egg-rr54.4%
associate-*l*62.7%
+-commutative62.7%
associate-/r/66.2%
*-commutative66.2%
Simplified66.2%
if 2.65e208 < l Initial program 23.6%
Simplified50.0%
Taylor expanded in t around inf 49.0%
div-inv49.0%
associate-/l*44.9%
*-commutative44.9%
*-commutative44.9%
Applied egg-rr44.9%
associate-*l*40.6%
+-commutative40.6%
associate-/r/45.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in U* around inf 45.0%
Taylor expanded in l around inf 82.8%
associate-*l*82.9%
associate-/l*82.9%
*-commutative82.9%
sub-neg82.9%
*-commutative82.9%
associate-*r/86.9%
metadata-eval86.9%
Simplified86.9%
Final simplification64.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* l (/ l Om))))
(if (<= Om -2.16e+83)
(sqrt (* (* 2.0 n) (* U (+ t (* -2.0 t_1)))))
(if (<= Om 5.6e+151)
(sqrt
(+
(* 2.0 (* n (* U t)))
(*
2.0
(* (/ n (/ Om (* U l))) (+ (* l -2.0) (/ (* n (* l U*)) Om))))))
(sqrt (* 2.0 (* U (* n (fma -2.0 t_1 t)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l * (l / Om);
double tmp;
if (Om <= -2.16e+83) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * t_1)))));
} else if (Om <= 5.6e+151) {
tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om))))));
} else {
tmp = sqrt((2.0 * (U * (n * fma(-2.0, t_1, t)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(l * Float64(l / Om)) tmp = 0.0 if (Om <= -2.16e+83) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * t_1))))); elseif (Om <= 5.6e+151) tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(n / Float64(Om / Float64(U * l))) * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om)))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * fma(-2.0, t_1, t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Om, -2.16e+83], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 5.6e+151], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{Om}\\
\mathbf{if}\;Om \leq -2.16 \cdot 10^{+83}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot t_1\right)\right)}\\
\mathbf{elif}\;Om \leq 5.6 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \left(\frac{n}{\frac{Om}{U \cdot \ell}} \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(-2, t_1, t\right)\right)\right)}\\
\end{array}
\end{array}
if Om < -2.1599999999999999e83Initial program 53.6%
Simplified52.0%
Taylor expanded in n around 0 48.9%
*-commutative48.9%
unpow248.9%
associate-*r/55.6%
Simplified55.6%
if -2.1599999999999999e83 < Om < 5.59999999999999975e151Initial program 44.3%
Simplified56.2%
Taylor expanded in t around inf 57.1%
div-inv57.1%
associate-/l*54.1%
*-commutative54.1%
*-commutative54.1%
Applied egg-rr54.1%
associate-*l*54.1%
+-commutative54.1%
associate-/r/56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in U* around inf 57.3%
Taylor expanded in n around 0 57.3%
associate-/l*61.2%
Simplified61.2%
if 5.59999999999999975e151 < Om Initial program 44.0%
Simplified54.7%
Taylor expanded in n around 0 44.3%
associate-*r*47.2%
+-commutative47.2%
unpow247.2%
fma-def47.2%
associate-*r/62.4%
Simplified62.4%
Final simplification60.1%
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= Om -1.1e+82) (not (<= Om 4.5e+147)))
(sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om)))))))
(sqrt
(+
(* 2.0 (* n (* U t)))
(* 2.0 (* (/ n (/ Om (* U l))) (+ (* l -2.0) (/ (* n (* l U*)) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.1e+82) || !(Om <= 4.5e+147)) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om))))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((om <= (-1.1d+82)) .or. (.not. (om <= 4.5d+147))) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt(((2.0d0 * (n * (u * t))) + (2.0d0 * ((n / (om / (u * l))) * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.1e+82) || !(Om <= 4.5e+147)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -1.1e+82) or not (Om <= 4.5e+147): tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om)))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -1.1e+82) || !(Om <= 4.5e+147)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(n / Float64(Om / Float64(U * l))) * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om)))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -1.1e+82) || ~((Om <= 4.5e+147))) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * ((n / (Om / (U * l))) * ((l * -2.0) + ((n * (l * U_42_)) / Om)))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -1.1e+82], N[Not[LessEqual[Om, 4.5e+147]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.1 \cdot 10^{+82} \lor \neg \left(Om \leq 4.5 \cdot 10^{+147}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \left(\frac{n}{\frac{Om}{U \cdot \ell}} \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if Om < -1.1000000000000001e82 or 4.50000000000000008e147 < Om Initial program 50.8%
Simplified53.4%
Taylor expanded in n around 0 47.9%
*-commutative47.9%
unpow247.9%
associate-*r/58.4%
Simplified58.4%
if -1.1000000000000001e82 < Om < 4.50000000000000008e147Initial program 43.9%
Simplified55.9%
Taylor expanded in t around inf 56.9%
div-inv56.9%
associate-/l*53.9%
*-commutative53.9%
*-commutative53.9%
Applied egg-rr53.9%
associate-*l*53.9%
+-commutative53.9%
associate-/r/56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in U* around inf 57.1%
Taylor expanded in n around 0 57.0%
associate-/l*61.0%
Simplified61.0%
Final simplification60.1%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (+ (* l -2.0) (/ (* n (* l U*)) Om))))
(if (<= l -1.15e+147)
(sqrt (* 2.0 (/ (* n (* l (* U t_1))) Om)))
(if (<= l 8.8e+80)
(sqrt (* (* 2.0 n) (* U (+ t (/ (* l t_1) Om)))))
(sqrt
(* n (/ -2.0 (/ Om (* l (* l (* U (- 2.0 (* U* (/ n Om))))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * -2.0) + ((n * (l * U_42_)) / Om);
double tmp;
if (l <= -1.15e+147) {
tmp = sqrt((2.0 * ((n * (l * (U * t_1))) / Om)));
} else if (l <= 8.8e+80) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * t_1) / Om)))));
} else {
tmp = sqrt((n * (-2.0 / (Om / (l * (l * (U * (2.0 - (U_42_ * (n / Om))))))))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = (l * (-2.0d0)) + ((n * (l * u_42)) / om)
if (l <= (-1.15d+147)) then
tmp = sqrt((2.0d0 * ((n * (l * (u * t_1))) / om)))
else if (l <= 8.8d+80) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * t_1) / om)))))
else
tmp = sqrt((n * ((-2.0d0) / (om / (l * (l * (u * (2.0d0 - (u_42 * (n / om))))))))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * -2.0) + ((n * (l * U_42_)) / Om);
double tmp;
if (l <= -1.15e+147) {
tmp = Math.sqrt((2.0 * ((n * (l * (U * t_1))) / Om)));
} else if (l <= 8.8e+80) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * t_1) / Om)))));
} else {
tmp = Math.sqrt((n * (-2.0 / (Om / (l * (l * (U * (2.0 - (U_42_ * (n / Om))))))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = (l * -2.0) + ((n * (l * U_42_)) / Om) tmp = 0 if l <= -1.15e+147: tmp = math.sqrt((2.0 * ((n * (l * (U * t_1))) / Om))) elif l <= 8.8e+80: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * t_1) / Om))))) else: tmp = math.sqrt((n * (-2.0 / (Om / (l * (l * (U * (2.0 - (U_42_ * (n / Om)))))))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om)) tmp = 0.0 if (l <= -1.15e+147) tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * Float64(U * t_1))) / Om))); elseif (l <= 8.8e+80) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * t_1) / Om))))); else tmp = sqrt(Float64(n * Float64(-2.0 / Float64(Om / Float64(l * Float64(l * Float64(U * Float64(2.0 - Float64(U_42_ * Float64(n / Om)))))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l * -2.0) + ((n * (l * U_42_)) / Om); tmp = 0.0; if (l <= -1.15e+147) tmp = sqrt((2.0 * ((n * (l * (U * t_1))) / Om))); elseif (l <= 8.8e+80) tmp = sqrt(((2.0 * n) * (U * (t + ((l * t_1) / Om))))); else tmp = sqrt((n * (-2.0 / (Om / (l * (l * (U * (2.0 - (U_42_ * (n / Om)))))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.15e+147], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * N[(U * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 8.8e+80], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * t$95$1), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(n * N[(-2.0 / N[(Om / N[(l * N[(l * N[(U * N[(2.0 - N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\\
\mathbf{if}\;\ell \leq -1.15 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \left(U \cdot t_1\right)\right)}{Om}}\\
\mathbf{elif}\;\ell \leq 8.8 \cdot 10^{+80}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot t_1}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot \frac{-2}{\frac{Om}{\ell \cdot \left(\ell \cdot \left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)\right)}}}\\
\end{array}
\end{array}
if l < -1.15e147Initial program 12.6%
Simplified41.9%
Taylor expanded in U* around inf 41.8%
associate-/l*42.0%
Simplified42.0%
Taylor expanded in t around 0 41.7%
if -1.15e147 < l < 8.80000000000000011e80Initial program 58.4%
Simplified59.7%
Taylor expanded in U around 0 62.2%
if 8.80000000000000011e80 < l Initial program 28.7%
Simplified48.0%
Taylor expanded in l around -inf 34.2%
associate-/l*36.2%
associate-*r/36.2%
*-commutative36.2%
associate-/r*33.8%
*-commutative33.8%
associate-/r*31.5%
mul-1-neg31.5%
unsub-neg31.5%
associate-/l*33.6%
unpow233.6%
Simplified33.6%
Taylor expanded in U around 0 33.8%
Taylor expanded in U around 0 34.2%
associate-/l*36.2%
*-commutative36.2%
associate-/l*38.4%
unpow238.4%
associate-*r/38.4%
*-commutative38.4%
*-rgt-identity38.4%
associate-*r/38.4%
associate-*l*38.4%
associate-*r/38.4%
metadata-eval38.4%
associate-*l*48.4%
Simplified48.4%
Final simplification56.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= Om -1.6e-67) (not (<= Om 6e-48)))
(sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om)))))))
(sqrt
(* 2.0 (/ (* n (* l (* U (+ (* l -2.0) (/ (* n (* l U*)) Om))))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.6e-67) || !(Om <= 6e-48)) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((2.0 * ((n * (l * (U * ((l * -2.0) + ((n * (l * U_42_)) / Om))))) / Om)));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((om <= (-1.6d-67)) .or. (.not. (om <= 6d-48))) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt((2.0d0 * ((n * (l * (u * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))))) / om)))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.6e-67) || !(Om <= 6e-48)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((2.0 * ((n * (l * (U * ((l * -2.0) + ((n * (l * U_42_)) / Om))))) / Om)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -1.6e-67) or not (Om <= 6e-48): tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((2.0 * ((n * (l * (U * ((l * -2.0) + ((n * (l * U_42_)) / Om))))) / Om))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -1.6e-67) || !(Om <= 6e-48)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * Float64(U * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))))) / Om))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -1.6e-67) || ~((Om <= 6e-48))) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt((2.0 * ((n * (l * (U * ((l * -2.0) + ((n * (l * U_42_)) / Om))))) / Om))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -1.6e-67], N[Not[LessEqual[Om, 6e-48]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * N[(U * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.6 \cdot 10^{-67} \lor \neg \left(Om \leq 6 \cdot 10^{-48}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \left(U \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)\right)\right)}{Om}}\\
\end{array}
\end{array}
if Om < -1.60000000000000011e-67 or 5.9999999999999998e-48 < Om Initial program 51.5%
Simplified55.8%
Taylor expanded in n around 0 49.0%
*-commutative49.0%
unpow249.0%
associate-*r/55.5%
Simplified55.5%
if -1.60000000000000011e-67 < Om < 5.9999999999999998e-48Initial program 37.2%
Simplified53.7%
Taylor expanded in U* around inf 54.0%
associate-/l*54.0%
Simplified54.0%
Taylor expanded in t around 0 45.8%
Final simplification52.1%
(FPCore (n U t l Om U*) :precision binary64 (if (or (<= l -6.5e-52) (not (<= l 3.5e-30))) (sqrt (* n (/ -2.0 (/ Om (* l (* l (* U (- 2.0 (* U* (/ n Om)))))))))) (pow (* 2.0 (* n (* U t))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((l <= -6.5e-52) || !(l <= 3.5e-30)) {
tmp = sqrt((n * (-2.0 / (Om / (l * (l * (U * (2.0 - (U_42_ * (n / Om))))))))));
} else {
tmp = pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((l <= (-6.5d-52)) .or. (.not. (l <= 3.5d-30))) then
tmp = sqrt((n * ((-2.0d0) / (om / (l * (l * (u * (2.0d0 - (u_42 * (n / om))))))))))
else
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((l <= -6.5e-52) || !(l <= 3.5e-30)) {
tmp = Math.sqrt((n * (-2.0 / (Om / (l * (l * (U * (2.0 - (U_42_ * (n / Om))))))))));
} else {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (l <= -6.5e-52) or not (l <= 3.5e-30): tmp = math.sqrt((n * (-2.0 / (Om / (l * (l * (U * (2.0 - (U_42_ * (n / Om)))))))))) else: tmp = math.pow((2.0 * (n * (U * t))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((l <= -6.5e-52) || !(l <= 3.5e-30)) tmp = sqrt(Float64(n * Float64(-2.0 / Float64(Om / Float64(l * Float64(l * Float64(U * Float64(2.0 - Float64(U_42_ * Float64(n / Om)))))))))); else tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((l <= -6.5e-52) || ~((l <= 3.5e-30))) tmp = sqrt((n * (-2.0 / (Om / (l * (l * (U * (2.0 - (U_42_ * (n / Om)))))))))); else tmp = (2.0 * (n * (U * t))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[l, -6.5e-52], N[Not[LessEqual[l, 3.5e-30]], $MachinePrecision]], N[Sqrt[N[(n * N[(-2.0 / N[(Om / N[(l * N[(l * N[(U * N[(2.0 - N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6.5 \cdot 10^{-52} \lor \neg \left(\ell \leq 3.5 \cdot 10^{-30}\right):\\
\;\;\;\;\sqrt{n \cdot \frac{-2}{\frac{Om}{\ell \cdot \left(\ell \cdot \left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)\right)}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < -6.5e-52 or 3.5000000000000003e-30 < l Initial program 32.0%
Simplified48.1%
Taylor expanded in l around -inf 34.5%
associate-/l*35.2%
associate-*r/35.2%
*-commutative35.2%
associate-/r*33.6%
*-commutative33.6%
associate-/r*31.4%
mul-1-neg31.4%
unsub-neg31.4%
associate-/l*32.0%
unpow232.0%
Simplified32.0%
Taylor expanded in U around 0 33.6%
Taylor expanded in U around 0 34.5%
associate-/l*35.2%
*-commutative35.2%
associate-/l*36.5%
unpow236.5%
associate-*r/36.5%
*-commutative36.5%
*-rgt-identity36.5%
associate-*r/36.4%
associate-*l*36.4%
associate-*r/36.4%
metadata-eval36.4%
associate-*l*42.6%
Simplified42.8%
if -6.5e-52 < l < 3.5000000000000003e-30Initial program 63.8%
Simplified63.4%
Taylor expanded in t around inf 60.5%
pow1/260.5%
associate-*r*60.5%
associate-*r*58.8%
Applied egg-rr58.8%
Taylor expanded in n around 0 60.5%
Final simplification50.8%
(FPCore (n U t l Om U*) :precision binary64 (if (or (<= Om -1.16e-96) (not (<= Om 1.5e-48))) (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))) (sqrt (* (* l l) (* (* U (- 2.0 (* U* (/ n Om)))) (/ (* n -2.0) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.16e-96) || !(Om <= 1.5e-48)) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(((l * l) * ((U * (2.0 - (U_42_ * (n / Om)))) * ((n * -2.0) / Om))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((om <= (-1.16d-96)) .or. (.not. (om <= 1.5d-48))) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt(((l * l) * ((u * (2.0d0 - (u_42 * (n / om)))) * ((n * (-2.0d0)) / om))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.16e-96) || !(Om <= 1.5e-48)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(((l * l) * ((U * (2.0 - (U_42_ * (n / Om)))) * ((n * -2.0) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -1.16e-96) or not (Om <= 1.5e-48): tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(((l * l) * ((U * (2.0 - (U_42_ * (n / Om)))) * ((n * -2.0) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -1.16e-96) || !(Om <= 1.5e-48)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(Float64(l * l) * Float64(Float64(U * Float64(2.0 - Float64(U_42_ * Float64(n / Om)))) * Float64(Float64(n * -2.0) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -1.16e-96) || ~((Om <= 1.5e-48))) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt(((l * l) * ((U * (2.0 - (U_42_ * (n / Om)))) * ((n * -2.0) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -1.16e-96], N[Not[LessEqual[Om, 1.5e-48]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(l * l), $MachinePrecision] * N[(N[(U * N[(2.0 - N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(n * -2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.16 \cdot 10^{-96} \lor \neg \left(Om \leq 1.5 \cdot 10^{-48}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\ell \cdot \ell\right) \cdot \left(\left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right) \cdot \frac{n \cdot -2}{Om}\right)}\\
\end{array}
\end{array}
if Om < -1.16e-96 or 1.5e-48 < Om Initial program 50.6%
Simplified55.4%
Taylor expanded in n around 0 48.2%
*-commutative48.2%
unpow248.2%
associate-*r/54.5%
Simplified54.5%
if -1.16e-96 < Om < 1.5e-48Initial program 37.8%
Simplified54.3%
Taylor expanded in l around -inf 38.6%
associate-/l*38.6%
associate-*r/38.6%
*-commutative38.6%
associate-/r*38.3%
*-commutative38.3%
associate-/r*38.4%
mul-1-neg38.4%
unsub-neg38.4%
associate-/l*36.9%
unpow236.9%
Simplified36.9%
Taylor expanded in U around 0 38.4%
*-un-lft-identity38.4%
associate-/r/41.3%
*-commutative41.3%
*-commutative41.3%
associate-/l*39.9%
Applied egg-rr39.9%
*-lft-identity39.9%
unpow239.9%
*-commutative39.9%
unpow239.9%
associate-/r/39.8%
associate-/l*43.6%
associate-*l/43.5%
Simplified43.5%
Final simplification50.9%
(FPCore (n U t l Om U*) :precision binary64 (if (or (<= l -6e+129) (not (<= l 1.85e+81))) (sqrt (* -4.0 (/ n (/ Om (* U (* l l)))))) (pow (* 2.0 (* n (* U t))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((l <= -6e+129) || !(l <= 1.85e+81)) {
tmp = sqrt((-4.0 * (n / (Om / (U * (l * l))))));
} else {
tmp = pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((l <= (-6d+129)) .or. (.not. (l <= 1.85d+81))) then
tmp = sqrt(((-4.0d0) * (n / (om / (u * (l * l))))))
else
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((l <= -6e+129) || !(l <= 1.85e+81)) {
tmp = Math.sqrt((-4.0 * (n / (Om / (U * (l * l))))));
} else {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (l <= -6e+129) or not (l <= 1.85e+81): tmp = math.sqrt((-4.0 * (n / (Om / (U * (l * l)))))) else: tmp = math.pow((2.0 * (n * (U * t))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((l <= -6e+129) || !(l <= 1.85e+81)) tmp = sqrt(Float64(-4.0 * Float64(n / Float64(Om / Float64(U * Float64(l * l)))))); else tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((l <= -6e+129) || ~((l <= 1.85e+81))) tmp = sqrt((-4.0 * (n / (Om / (U * (l * l)))))); else tmp = (2.0 * (n * (U * t))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[l, -6e+129], N[Not[LessEqual[l, 1.85e+81]], $MachinePrecision]], N[Sqrt[N[(-4.0 * N[(n / N[(Om / N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6 \cdot 10^{+129} \lor \neg \left(\ell \leq 1.85 \cdot 10^{+81}\right):\\
\;\;\;\;\sqrt{-4 \cdot \frac{n}{\frac{Om}{U \cdot \left(\ell \cdot \ell\right)}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < -6.0000000000000006e129 or 1.85e81 < l Initial program 22.7%
Simplified44.8%
Taylor expanded in l around -inf 31.0%
associate-/l*33.2%
associate-*r/33.2%
*-commutative33.2%
associate-/r*30.7%
*-commutative30.7%
associate-/r*29.5%
mul-1-neg29.5%
unsub-neg29.5%
associate-/l*30.6%
unpow230.6%
Simplified30.6%
Taylor expanded in U around 0 30.7%
Taylor expanded in n around 0 19.5%
associate-/l*21.7%
*-commutative21.7%
unpow221.7%
Simplified21.7%
if -6.0000000000000006e129 < l < 1.85e81Initial program 59.3%
Simplified60.6%
Taylor expanded in t around inf 49.9%
pow1/249.9%
associate-*r*49.9%
associate-*r*48.3%
Applied egg-rr48.3%
Taylor expanded in n around 0 49.9%
Final simplification40.0%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l -6.5e+129)
(sqrt (* -4.0 (/ n (/ (/ Om (* l l)) U))))
(if (<= l 6.6e+80)
(pow (* 2.0 (* n (* U t))) 0.5)
(sqrt (* -4.0 (/ n (/ Om (* U (* l l)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= -6.5e+129) {
tmp = sqrt((-4.0 * (n / ((Om / (l * l)) / U))));
} else if (l <= 6.6e+80) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((-4.0 * (n / (Om / (U * (l * l))))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= (-6.5d+129)) then
tmp = sqrt(((-4.0d0) * (n / ((om / (l * l)) / u))))
else if (l <= 6.6d+80) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((-4.0d0) * (n / (om / (u * (l * l))))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= -6.5e+129) {
tmp = Math.sqrt((-4.0 * (n / ((Om / (l * l)) / U))));
} else if (l <= 6.6e+80) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((-4.0 * (n / (Om / (U * (l * l))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= -6.5e+129: tmp = math.sqrt((-4.0 * (n / ((Om / (l * l)) / U)))) elif l <= 6.6e+80: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((-4.0 * (n / (Om / (U * (l * l)))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= -6.5e+129) tmp = sqrt(Float64(-4.0 * Float64(n / Float64(Float64(Om / Float64(l * l)) / U)))); elseif (l <= 6.6e+80) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(-4.0 * Float64(n / Float64(Om / Float64(U * Float64(l * l)))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= -6.5e+129) tmp = sqrt((-4.0 * (n / ((Om / (l * l)) / U)))); elseif (l <= 6.6e+80) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((-4.0 * (n / (Om / (U * (l * l)))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, -6.5e+129], N[Sqrt[N[(-4.0 * N[(n / N[(N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 6.6e+80], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(n / N[(Om / N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6.5 \cdot 10^{+129}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{n}{\frac{\frac{Om}{\ell \cdot \ell}}{U}}}\\
\mathbf{elif}\;\ell \leq 6.6 \cdot 10^{+80}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{n}{\frac{Om}{U \cdot \left(\ell \cdot \ell\right)}}}\\
\end{array}
\end{array}
if l < -6.4999999999999995e129Initial program 16.0%
Simplified41.1%
Taylor expanded in l around -inf 27.4%
associate-/l*29.6%
associate-*r/29.6%
*-commutative29.6%
associate-/r*27.2%
*-commutative27.2%
associate-/r*27.2%
mul-1-neg27.2%
unsub-neg27.2%
associate-/l*27.2%
unpow227.2%
Simplified27.2%
Taylor expanded in n around 0 14.8%
associate-/l*17.1%
associate-/r*17.1%
unpow217.1%
Simplified17.1%
if -6.4999999999999995e129 < l < 6.59999999999999982e80Initial program 59.3%
Simplified60.6%
Taylor expanded in t around inf 49.9%
pow1/249.9%
associate-*r*49.9%
associate-*r*48.3%
Applied egg-rr48.3%
Taylor expanded in n around 0 49.9%
if 6.59999999999999982e80 < l Initial program 28.7%
Simplified48.0%
Taylor expanded in l around -inf 34.2%
associate-/l*36.2%
associate-*r/36.2%
*-commutative36.2%
associate-/r*33.8%
*-commutative33.8%
associate-/r*31.5%
mul-1-neg31.5%
unsub-neg31.5%
associate-/l*33.6%
unpow233.6%
Simplified33.6%
Taylor expanded in U around 0 33.8%
Taylor expanded in n around 0 23.6%
associate-/l*25.7%
*-commutative25.7%
unpow225.7%
Simplified25.7%
Final simplification40.0%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))))
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)))))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
end function
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)))))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}
\end{array}
Initial program 46.4%
Simplified55.0%
Taylor expanded in n around 0 41.4%
*-commutative41.4%
unpow241.4%
associate-*r/45.6%
Simplified45.6%
Final simplification45.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= n -2e-105) (pow (* 2.0 (* U (* n t))) 0.5) (pow (* 2.0 (* n (* U t))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -2e-105) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (n <= (-2d-105)) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -2e-105) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= -2e-105: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.pow((2.0 * (n * (U * t))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -2e-105) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -2e-105) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = (2.0 * (n * (U * t))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -2e-105], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -2 \cdot 10^{-105}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if n < -1.99999999999999993e-105Initial program 49.1%
Simplified50.1%
Taylor expanded in t around inf 32.5%
pow1/232.5%
associate-*r*32.5%
associate-*r*39.1%
Applied egg-rr39.1%
if -1.99999999999999993e-105 < n Initial program 45.6%
Simplified56.6%
Taylor expanded in t around inf 36.0%
pow1/236.1%
associate-*r*36.1%
associate-*r*33.6%
Applied egg-rr33.6%
Taylor expanded in n around 0 36.1%
Final simplification36.8%
(FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* n (* U t))) 0.5))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow((2.0 * (n * (U * t))), 0.5);
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = (2.0d0 * (n * (u * t))) ** 0.5d0
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow((2.0 * (n * (U * t))), 0.5);
}
def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * (n * (U * t))), 0.5)
function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5 end
function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * (n * (U * t))) ^ 0.5; end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
\\
{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}
\end{array}
Initial program 46.4%
Simplified55.0%
Taylor expanded in t around inf 35.2%
pow1/235.3%
associate-*r*35.3%
associate-*r*34.9%
Applied egg-rr34.9%
Taylor expanded in n around 0 35.3%
Final simplification35.3%
(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 46.4%
Simplified55.0%
Taylor expanded in t around inf 35.2%
pow1/235.3%
associate-*r*35.3%
associate-*r*34.9%
Applied egg-rr34.9%
*-un-lft-identity34.9%
unpow1/234.8%
associate-*r*35.2%
Applied egg-rr35.2%
*-lft-identity35.2%
associate-*r*34.8%
Simplified34.8%
Final simplification34.8%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* 2.0 n) (* U t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((2.0 * n) * (U * 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 * n) * (u * 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 * n) * (U * t)));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * n) * (U * t)))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * t))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * t))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}
\end{array}
Initial program 46.4%
Simplified55.0%
Taylor expanded in t around inf 35.2%
Final simplification35.2%
herbie shell --seed 2023189
(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*))))))