
(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 20 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)))
(t_2
(* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))
(t_3 (pow (sqrt 2.0) 0.3333333333333333)))
(if (<= t_2 5e-323)
(pow
(*
t_3
(exp
(*
0.16666666666666666
(+
(log
(*
n
(+
t
(-
(/ (* n (* U* (pow l 2.0))) (pow Om 2.0))
(* 2.0 (/ (pow l 2.0) Om))))))
(log U)))))
3.0)
(if (<= t_2 INFINITY)
(sqrt
(pow
(cbrt
(* (* 2.0 (* n U)) (- t (fma 2.0 (* l (/ l Om)) (* t_1 (- U U*))))))
3.0))
(pow
(*
t_3
(exp
(*
0.16666666666666666
(+
(log
(*
(* n U)
(+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.0 Om)))))
(* -2.0 (log (/ 1.0 l)))))))
3.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);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)));
double t_3 = pow(sqrt(2.0), 0.3333333333333333);
double tmp;
if (t_2 <= 5e-323) {
tmp = pow((t_3 * exp((0.16666666666666666 * (log((n * (t + (((n * (U_42_ * pow(l, 2.0))) / pow(Om, 2.0)) - (2.0 * (pow(l, 2.0) / Om)))))) + log(U))))), 3.0);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(pow(cbrt(((2.0 * (n * U)) * (t - fma(2.0, (l * (l / Om)), (t_1 * (U - U_42_)))))), 3.0));
} else {
tmp = pow((t_3 * exp((0.16666666666666666 * (log(((n * U) * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om))))) + (-2.0 * log((1.0 / l))))))), 3.0);
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) t_3 = sqrt(2.0) ^ 0.3333333333333333 tmp = 0.0 if (t_2 <= 5e-323) tmp = Float64(t_3 * exp(Float64(0.16666666666666666 * Float64(log(Float64(n * Float64(t + Float64(Float64(Float64(n * Float64(U_42_ * (l ^ 2.0))) / (Om ^ 2.0)) - Float64(2.0 * Float64((l ^ 2.0) / Om)))))) + log(U))))) ^ 3.0; elseif (t_2 <= Inf) tmp = sqrt((cbrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(t_1 * Float64(U - U_42_)))))) ^ 3.0)); else tmp = Float64(t_3 * exp(Float64(0.16666666666666666 * Float64(log(Float64(Float64(n * U) * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om))))) + Float64(-2.0 * log(Float64(1.0 / l))))))) ^ 3.0; end return 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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[2.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]}, If[LessEqual[t$95$2, 5e-323], N[Power[N[(t$95$3 * N[Exp[N[(0.16666666666666666 * N[(N[Log[N[(n * N[(t + N[(N[(N[(n * N[(U$42$ * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Log[U], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[Power[N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision], N[Power[N[(t$95$3 * N[Exp[N[(0.16666666666666666 * N[(N[Log[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(-2.0 * N[Log[N[(1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)\\
t_3 := {\left(\sqrt{2}\right)}^{0.3333333333333333}\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{-323}:\\
\;\;\;\;{\left(t_3 \cdot e^{0.16666666666666666 \cdot \left(\log \left(n \cdot \left(t + \left(\frac{n \cdot \left(U* \cdot {\ell}^{2}\right)}{{Om}^{2}} - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right) + \log U\right)}\right)}^{3}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{{\left(\sqrt[3]{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, t_1 \cdot \left(U - U*\right)\right)\right)}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;{\left(t_3 \cdot e^{0.16666666666666666 \cdot \left(\log \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right) + -2 \cdot \log \left(\frac{1}{\ell}\right)\right)}\right)}^{3}\\
\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*)))) < 4.94066e-323Initial program 23.3%
Simplified23.4%
Applied egg-rr23.4%
Taylor expanded in U around 0 44.0%
if 4.94066e-323 < (*.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 68.7%
Simplified71.6%
associate-*r*71.6%
fma-udef71.6%
associate-*l/64.3%
associate-*r*68.7%
*-commutative68.7%
associate--l-68.7%
add-cube-cbrt68.3%
pow368.3%
Applied egg-rr75.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%
Simplified2.6%
Applied egg-rr2.6%
Taylor expanded in l around inf 26.6%
Final simplification61.9%
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)))
(t_2
(* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))
(t_3 (* l (/ l Om))))
(if (<= t_2 5e-323)
(pow
(*
(cbrt (sqrt 2.0))
(pow
(exp 0.16666666666666666)
(+
(log U)
(log
(* n (+ t (- (/ n (/ (* Om Om) (* (* l l) U*))) (* 2.0 t_3))))))))
3.0)
(if (<= t_2 INFINITY)
(sqrt
(pow
(cbrt (* (* 2.0 (* n U)) (- t (fma 2.0 t_3 (* t_1 (- U U*))))))
3.0))
(pow
(*
(pow (sqrt 2.0) 0.3333333333333333)
(exp
(*
0.16666666666666666
(+
(log
(*
(* n U)
(+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.0 Om)))))
(* -2.0 (log (/ 1.0 l)))))))
3.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);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)));
double t_3 = l * (l / Om);
double tmp;
if (t_2 <= 5e-323) {
tmp = pow((cbrt(sqrt(2.0)) * pow(exp(0.16666666666666666), (log(U) + log((n * (t + ((n / ((Om * Om) / ((l * l) * U_42_))) - (2.0 * t_3)))))))), 3.0);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(pow(cbrt(((2.0 * (n * U)) * (t - fma(2.0, t_3, (t_1 * (U - U_42_)))))), 3.0));
} else {
tmp = pow((pow(sqrt(2.0), 0.3333333333333333) * exp((0.16666666666666666 * (log(((n * U) * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om))))) + (-2.0 * log((1.0 / l))))))), 3.0);
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) t_3 = Float64(l * Float64(l / Om)) tmp = 0.0 if (t_2 <= 5e-323) tmp = Float64(cbrt(sqrt(2.0)) * (exp(0.16666666666666666) ^ Float64(log(U) + log(Float64(n * Float64(t + Float64(Float64(n / Float64(Float64(Om * Om) / Float64(Float64(l * l) * U_42_))) - Float64(2.0 * t_3)))))))) ^ 3.0; elseif (t_2 <= Inf) tmp = sqrt((cbrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - fma(2.0, t_3, Float64(t_1 * Float64(U - U_42_)))))) ^ 3.0)); else tmp = Float64((sqrt(2.0) ^ 0.3333333333333333) * exp(Float64(0.16666666666666666 * Float64(log(Float64(Float64(n * U) * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om))))) + Float64(-2.0 * log(Float64(1.0 / l))))))) ^ 3.0; end return 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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 5e-323], N[Power[N[(N[Power[N[Sqrt[2.0], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Exp[0.16666666666666666], $MachinePrecision], N[(N[Log[U], $MachinePrecision] + N[Log[N[(n * N[(t + N[(N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[Power[N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * t$95$3 + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision], N[Power[N[(N[Power[N[Sqrt[2.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision] * N[Exp[N[(0.16666666666666666 * N[(N[Log[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(-2.0 * N[Log[N[(1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)\\
t_3 := \ell \cdot \frac{\ell}{Om}\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{-323}:\\
\;\;\;\;{\left(\sqrt[3]{\sqrt{2}} \cdot {\left(e^{0.16666666666666666}\right)}^{\left(\log U + \log \left(n \cdot \left(t + \left(\frac{n}{\frac{Om \cdot Om}{\left(\ell \cdot \ell\right) \cdot U*}} - 2 \cdot t_3\right)\right)\right)\right)}\right)}^{3}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{{\left(\sqrt[3]{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \mathsf{fma}\left(2, t_3, t_1 \cdot \left(U - U*\right)\right)\right)}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\sqrt{2}\right)}^{0.3333333333333333} \cdot e^{0.16666666666666666 \cdot \left(\log \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right) + -2 \cdot \log \left(\frac{1}{\ell}\right)\right)}\right)}^{3}\\
\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*)))) < 4.94066e-323Initial program 23.3%
Simplified23.4%
Applied egg-rr23.4%
Taylor expanded in U around 0 44.0%
unpow1/344.0%
*-rgt-identity44.0%
exp-prod42.0%
Simplified42.0%
if 4.94066e-323 < (*.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 68.7%
Simplified71.6%
associate-*r*71.6%
fma-udef71.6%
associate-*l/64.3%
associate-*r*68.7%
*-commutative68.7%
associate--l-68.7%
add-cube-cbrt68.3%
pow368.3%
Applied egg-rr75.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%
Simplified2.6%
Applied egg-rr2.6%
Taylor expanded in l around inf 26.6%
Final simplification61.6%
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)))
(t_2 (- t (fma 2.0 (* l (/ l Om)) (* t_1 (- U U*)))))
(t_3
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U))))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U t_2)))
(if (<= t_3 INFINITY)
(sqrt (pow (cbrt (* (* 2.0 (* n U)) t_2)) 3.0))
(pow
(*
(cbrt (sqrt 2.0))
(pow
(exp 0.16666666666666666)
(-
(log (* (+ (/ n (/ (* Om Om) (- U U*))) (/ 2.0 Om)) (* U (- n))))
(* -2.0 (log l)))))
3.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);
double t_2 = t - fma(2.0, (l * (l / Om)), (t_1 * (U - U_42_)));
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * t_2));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(pow(cbrt(((2.0 * (n * U)) * t_2)), 3.0));
} else {
tmp = pow((cbrt(sqrt(2.0)) * pow(exp(0.16666666666666666), (log((((n / ((Om * Om) / (U - U_42_))) + (2.0 / Om)) * (U * -n))) - (-2.0 * log(l))))), 3.0);
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(t_1 * Float64(U - U_42_)))) t_3 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t_2))); elseif (t_3 <= Inf) tmp = sqrt((cbrt(Float64(Float64(2.0 * Float64(n * U)) * t_2)) ^ 3.0)); else tmp = Float64(cbrt(sqrt(2.0)) * (exp(0.16666666666666666) ^ Float64(log(Float64(Float64(Float64(n / Float64(Float64(Om * Om) / Float64(U - U_42_))) + Float64(2.0 / Om)) * Float64(U * Float64(-n)))) - Float64(-2.0 * log(l))))) ^ 3.0; end return 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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[Power[N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision], N[Power[N[(N[Power[N[Sqrt[2.0], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Exp[0.16666666666666666], $MachinePrecision], N[(N[Log[N[(N[(N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / Om), $MachinePrecision]), $MachinePrecision] * N[(U * (-n)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, t_1 \cdot \left(U - U*\right)\right)\\
t_3 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t_2}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{{\left(\sqrt[3]{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t_2}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{\sqrt{2}} \cdot {\left(e^{0.16666666666666666}\right)}^{\left(\log \left(\left(\frac{n}{\frac{Om \cdot Om}{U - U*}} + \frac{2}{Om}\right) \cdot \left(U \cdot \left(-n\right)\right)\right) - -2 \cdot \log \ell\right)}\right)}^{3}\\
\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 23.1%
Simplified23.3%
pow1/223.3%
fma-udef23.3%
associate-*l/23.3%
associate-*r*23.3%
*-commutative23.3%
associate--l-23.3%
associate-*r*23.3%
associate-*l*38.9%
Applied egg-rr39.8%
unpow1/239.8%
Simplified39.8%
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 68.5%
Simplified71.4%
associate-*r*71.4%
fma-udef71.4%
associate-*l/64.1%
associate-*r*68.5%
*-commutative68.5%
associate--l-68.5%
add-cube-cbrt68.1%
pow368.1%
Applied egg-rr75.3%
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%
Simplified2.6%
Applied egg-rr2.6%
Taylor expanded in l around inf 26.6%
unpow1/326.6%
*-rgt-identity26.6%
exp-prod26.1%
Simplified26.1%
Final simplification61.1%
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)))
(t_2
(* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))
(t_3 (cbrt (sqrt 2.0)))
(t_4 (* l (/ l Om))))
(if (<= t_2 5e-323)
(pow
(*
t_3
(pow
(exp 0.16666666666666666)
(+
(log U)
(log
(* n (+ t (- (/ n (/ (* Om Om) (* (* l l) U*))) (* 2.0 t_4))))))))
3.0)
(if (<= t_2 INFINITY)
(sqrt
(pow
(cbrt (* (* 2.0 (* n U)) (- t (fma 2.0 t_4 (* t_1 (- U U*))))))
3.0))
(pow
(*
t_3
(pow
(exp 0.16666666666666666)
(-
(log (* (+ (/ n (/ (* Om Om) (- U U*))) (/ 2.0 Om)) (* U (- n))))
(* -2.0 (log l)))))
3.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);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)));
double t_3 = cbrt(sqrt(2.0));
double t_4 = l * (l / Om);
double tmp;
if (t_2 <= 5e-323) {
tmp = pow((t_3 * pow(exp(0.16666666666666666), (log(U) + log((n * (t + ((n / ((Om * Om) / ((l * l) * U_42_))) - (2.0 * t_4)))))))), 3.0);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(pow(cbrt(((2.0 * (n * U)) * (t - fma(2.0, t_4, (t_1 * (U - U_42_)))))), 3.0));
} else {
tmp = pow((t_3 * pow(exp(0.16666666666666666), (log((((n / ((Om * Om) / (U - U_42_))) + (2.0 / Om)) * (U * -n))) - (-2.0 * log(l))))), 3.0);
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) t_3 = cbrt(sqrt(2.0)) t_4 = Float64(l * Float64(l / Om)) tmp = 0.0 if (t_2 <= 5e-323) tmp = Float64(t_3 * (exp(0.16666666666666666) ^ Float64(log(U) + log(Float64(n * Float64(t + Float64(Float64(n / Float64(Float64(Om * Om) / Float64(Float64(l * l) * U_42_))) - Float64(2.0 * t_4)))))))) ^ 3.0; elseif (t_2 <= Inf) tmp = sqrt((cbrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - fma(2.0, t_4, Float64(t_1 * Float64(U - U_42_)))))) ^ 3.0)); else tmp = Float64(t_3 * (exp(0.16666666666666666) ^ Float64(log(Float64(Float64(Float64(n / Float64(Float64(Om * Om) / Float64(U - U_42_))) + Float64(2.0 / Om)) * Float64(U * Float64(-n)))) - Float64(-2.0 * log(l))))) ^ 3.0; end return 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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[2.0], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$4 = N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 5e-323], N[Power[N[(t$95$3 * N[Power[N[Exp[0.16666666666666666], $MachinePrecision], N[(N[Log[U], $MachinePrecision] + N[Log[N[(n * N[(t + N[(N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[Power[N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * t$95$4 + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision], N[Power[N[(t$95$3 * N[Power[N[Exp[0.16666666666666666], $MachinePrecision], N[(N[Log[N[(N[(N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / Om), $MachinePrecision]), $MachinePrecision] * N[(U * (-n)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)\\
t_3 := \sqrt[3]{\sqrt{2}}\\
t_4 := \ell \cdot \frac{\ell}{Om}\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{-323}:\\
\;\;\;\;{\left(t_3 \cdot {\left(e^{0.16666666666666666}\right)}^{\left(\log U + \log \left(n \cdot \left(t + \left(\frac{n}{\frac{Om \cdot Om}{\left(\ell \cdot \ell\right) \cdot U*}} - 2 \cdot t_4\right)\right)\right)\right)}\right)}^{3}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{{\left(\sqrt[3]{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \mathsf{fma}\left(2, t_4, t_1 \cdot \left(U - U*\right)\right)\right)}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;{\left(t_3 \cdot {\left(e^{0.16666666666666666}\right)}^{\left(\log \left(\left(\frac{n}{\frac{Om \cdot Om}{U - U*}} + \frac{2}{Om}\right) \cdot \left(U \cdot \left(-n\right)\right)\right) - -2 \cdot \log \ell\right)}\right)}^{3}\\
\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*)))) < 4.94066e-323Initial program 23.3%
Simplified23.4%
Applied egg-rr23.4%
Taylor expanded in U around 0 44.0%
unpow1/344.0%
*-rgt-identity44.0%
exp-prod42.0%
Simplified42.0%
if 4.94066e-323 < (*.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 68.7%
Simplified71.6%
associate-*r*71.6%
fma-udef71.6%
associate-*l/64.3%
associate-*r*68.7%
*-commutative68.7%
associate--l-68.7%
add-cube-cbrt68.3%
pow368.3%
Applied egg-rr75.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%
Simplified2.6%
Applied egg-rr2.6%
Taylor expanded in l around inf 26.6%
unpow1/326.6%
*-rgt-identity26.6%
exp-prod26.1%
Simplified26.1%
Final simplification61.5%
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)))
(t_2 (- t (fma 2.0 (* l (/ l Om)) (* t_1 (- U U*)))))
(t_3
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))))
(if (<= t_3 0.0)
(* (sqrt (* 2.0 n)) (sqrt (* U t_2)))
(if (<= t_3 INFINITY)
(sqrt (pow (cbrt (* (* 2.0 (* n U)) t_2)) 3.0))
(sqrt
(*
-2.0
(*
(- (/ 2.0 Om) (* (/ n Om) (/ (- U* U) Om)))
(* n (* U (* l l))))))))))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);
double t_2 = t - fma(2.0, (l * (l / Om)), (t_1 * (U - U_42_)));
double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * t_2));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(pow(cbrt(((2.0 * (n * U)) * t_2)), 3.0));
} else {
tmp = sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l))))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(t_1 * Float64(U - U_42_)))) t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t_2))); elseif (t_3 <= Inf) tmp = sqrt((cbrt(Float64(Float64(2.0 * Float64(n * U)) * t_2)) ^ 3.0)); else tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om))) * Float64(n * Float64(U * Float64(l * l)))))); end return 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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[Power[N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, t_1 \cdot \left(U - U*\right)\right)\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t_2}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{{\left(\sqrt[3]{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t_2}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U* - U}{Om}\right) \cdot \left(n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 25.2%
Simplified25.2%
pow1/225.2%
fma-udef25.2%
associate-*l/25.2%
associate-*r*25.2%
*-commutative25.2%
associate--l-25.2%
associate-*r*25.2%
associate-*l*42.1%
Applied egg-rr40.4%
unpow1/240.4%
Simplified40.4%
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*))))) < +inf.0Initial program 68.5%
Simplified71.4%
associate-*r*71.4%
fma-udef71.4%
associate-*l/64.1%
associate-*r*68.5%
*-commutative68.5%
associate--l-68.5%
add-cube-cbrt68.1%
pow368.1%
Applied egg-rr75.3%
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%
Simplified2.6%
Taylor expanded in l around inf 39.4%
unpow239.4%
times-frac45.1%
associate-*r/45.1%
metadata-eval45.1%
*-commutative45.1%
unpow245.1%
Simplified45.1%
Final simplification64.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_2 0.0)
(pow (* 2.0 (* n (* U (+ t (* t_1 -2.0))))) 0.5)
(if (<= t_2 5e+142)
t_2
(if (<= t_2 INFINITY)
(pow
(*
(* 2.0 (* n U))
(+ t (* l (* l (- (* (/ n (* Om Om)) (- U* U)) (/ 2.0 Om))))))
0.5)
(sqrt
(*
-2.0
(*
(- (/ 2.0 Om) (* (/ n Om) (/ (- U* U) Om)))
(* n (* U (* l l)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * t_1)) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = pow((2.0 * (n * (U * (t + (t_1 * -2.0))))), 0.5);
} else if (t_2 <= 5e+142) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = pow(((2.0 * (n * U)) * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5);
} else {
tmp = sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l))))));
}
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 = (l * l) / Om;
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * t_1)) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = Math.pow((2.0 * (n * (U * (t + (t_1 * -2.0))))), 0.5);
} else if (t_2 <= 5e+142) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.pow(((2.0 * (n * U)) * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5);
} else {
tmp = Math.sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (l * l) / Om t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * t_1)) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_2 <= 0.0: tmp = math.pow((2.0 * (n * (U * (t + (t_1 * -2.0))))), 0.5) elif t_2 <= 5e+142: tmp = t_2 elif t_2 <= math.inf: tmp = math.pow(((2.0 * (n * U)) * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5) else: tmp = math.sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * t_1)) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(t_1 * -2.0))))) ^ 0.5; elseif (t_2 <= 5e+142) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n / Float64(Om * Om)) * Float64(U_42_ - U)) - Float64(2.0 / Om)))))) ^ 0.5; else tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om))) * Float64(n * Float64(U * Float64(l * l)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l * l) / Om; t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * t_1)) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_2 <= 0.0) tmp = (2.0 * (n * (U * (t + (t_1 * -2.0))))) ^ 0.5; elseif (t_2 <= 5e+142) tmp = t_2; elseif (t_2 <= Inf) tmp = ((2.0 * (n * U)) * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))) ^ 0.5; else tmp = sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * t$95$1), $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$2, 0.0], N[Power[N[(2.0 * N[(n * N[(U * N[(t + N[(t$95$1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$2, 5e+142], t$95$2, If[LessEqual[t$95$2, Infinity], N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(l * N[(l * N[(N[(N[(n / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t_1\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot \left(t + t_1 \cdot -2\right)\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+142}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) - \frac{2}{Om}\right)\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U* - U}{Om}\right) \cdot \left(n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 25.2%
Simplified25.2%
Taylor expanded in l around 0 21.9%
*-commutative21.9%
unpow221.9%
associate-/l*21.9%
unpow221.9%
associate-*r/21.9%
metadata-eval21.9%
Simplified21.9%
pow1/221.9%
associate-*l*22.0%
associate-/r/22.0%
Applied egg-rr22.0%
Taylor expanded in n around 0 39.4%
*-commutative39.4%
cancel-sign-sub-inv39.4%
metadata-eval39.4%
unpow239.4%
Simplified39.4%
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*))))) < 5.0000000000000001e142Initial program 96.8%
if 5.0000000000000001e142 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 33.5%
Simplified47.7%
Taylor expanded in l around 0 31.2%
*-commutative31.2%
unpow231.2%
associate-/l*32.9%
unpow232.9%
associate-*r/32.9%
metadata-eval32.9%
Simplified32.9%
pow1/234.4%
associate-*l*50.9%
associate-/r/50.9%
Applied egg-rr50.9%
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%
Simplified2.6%
Taylor expanded in l around inf 39.4%
unpow239.4%
times-frac45.1%
associate-*r/45.1%
metadata-eval45.1%
*-commutative45.1%
unpow245.1%
Simplified45.1%
Final simplification65.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) 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 t_1)) t_2)))))
(if (<= t_4 0.0)
(pow (* 2.0 (* n (* U (+ t (* t_1 -2.0))))) 0.5)
(if (<= t_4 5e+142)
(sqrt (* t_3 (+ (+ t (* 2.0 (/ -1.0 (/ Om (* l l))))) t_2)))
(if (<= t_4 INFINITY)
(pow
(*
(* 2.0 (* n U))
(+ t (* l (* l (- (* (/ n (* Om Om)) (- U* U)) (/ 2.0 Om))))))
0.5)
(sqrt
(*
-2.0
(*
(- (/ 2.0 Om) (* (/ n Om) (/ (- U* U) Om)))
(* n (* U (* l l)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (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 = sqrt((t_3 * ((t - (2.0 * t_1)) + t_2)));
double tmp;
if (t_4 <= 0.0) {
tmp = pow((2.0 * (n * (U * (t + (t_1 * -2.0))))), 0.5);
} else if (t_4 <= 5e+142) {
tmp = sqrt((t_3 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_2)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = pow(((2.0 * (n * U)) * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5);
} else {
tmp = sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l))))));
}
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 = (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 = Math.sqrt((t_3 * ((t - (2.0 * t_1)) + t_2)));
double tmp;
if (t_4 <= 0.0) {
tmp = Math.pow((2.0 * (n * (U * (t + (t_1 * -2.0))))), 0.5);
} else if (t_4 <= 5e+142) {
tmp = Math.sqrt((t_3 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_2)));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.pow(((2.0 * (n * U)) * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5);
} else {
tmp = Math.sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = (l * l) / 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 * t_1)) + t_2))) tmp = 0 if t_4 <= 0.0: tmp = math.pow((2.0 * (n * (U * (t + (t_1 * -2.0))))), 0.5) elif t_4 <= 5e+142: tmp = math.sqrt((t_3 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_2))) elif t_4 <= math.inf: tmp = math.pow(((2.0 * (n * U)) * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5) else: tmp = math.sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * 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 = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) + t_2))) tmp = 0.0 if (t_4 <= 0.0) tmp = Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(t_1 * -2.0))))) ^ 0.5; elseif (t_4 <= 5e+142) tmp = sqrt(Float64(t_3 * Float64(Float64(t + Float64(2.0 * Float64(-1.0 / Float64(Om / Float64(l * l))))) + t_2))); elseif (t_4 <= Inf) tmp = Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n / Float64(Om * Om)) * Float64(U_42_ - U)) - Float64(2.0 / Om)))))) ^ 0.5; else tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om))) * Float64(n * Float64(U * Float64(l * l)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l * l) / 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 * t_1)) + t_2))); tmp = 0.0; if (t_4 <= 0.0) tmp = (2.0 * (n * (U * (t + (t_1 * -2.0))))) ^ 0.5; elseif (t_4 <= 5e+142) tmp = sqrt((t_3 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_2))); elseif (t_4 <= Inf) tmp = ((2.0 * (n * U)) * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))) ^ 0.5; else tmp = sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $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 * t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Power[N[(2.0 * N[(n * N[(U * N[(t + N[(t$95$1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$4, 5e+142], N[Sqrt[N[(t$95$3 * N[(N[(t + N[(2.0 * N[(-1.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(l * N[(l * N[(N[(N[(n / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{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 t_1\right) + t_2\right)}\\
\mathbf{if}\;t_4 \leq 0:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot \left(t + t_1 \cdot -2\right)\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;t_4 \leq 5 \cdot 10^{+142}:\\
\;\;\;\;\sqrt{t_3 \cdot \left(\left(t + 2 \cdot \frac{-1}{\frac{Om}{\ell \cdot \ell}}\right) + t_2\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) - \frac{2}{Om}\right)\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U* - U}{Om}\right) \cdot \left(n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 25.2%
Simplified25.2%
Taylor expanded in l around 0 21.9%
*-commutative21.9%
unpow221.9%
associate-/l*21.9%
unpow221.9%
associate-*r/21.9%
metadata-eval21.9%
Simplified21.9%
pow1/221.9%
associate-*l*22.0%
associate-/r/22.0%
Applied egg-rr22.0%
Taylor expanded in n around 0 39.4%
*-commutative39.4%
cancel-sign-sub-inv39.4%
metadata-eval39.4%
unpow239.4%
Simplified39.4%
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*))))) < 5.0000000000000001e142Initial program 96.8%
clear-num96.8%
inv-pow96.8%
Applied egg-rr96.8%
unpow-196.8%
Simplified96.8%
if 5.0000000000000001e142 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 33.5%
Simplified47.7%
Taylor expanded in l around 0 31.2%
*-commutative31.2%
unpow231.2%
associate-/l*32.9%
unpow232.9%
associate-*r/32.9%
metadata-eval32.9%
Simplified32.9%
pow1/234.4%
associate-*l*50.9%
associate-/r/50.9%
Applied egg-rr50.9%
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%
Simplified2.6%
Taylor expanded in l around inf 39.4%
unpow239.4%
times-frac45.1%
associate-*r/45.1%
metadata-eval45.1%
*-commutative45.1%
unpow245.1%
Simplified45.1%
Final simplification65.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (* n (pow (/ l Om) 2.0)))
(t_3 (* t_2 (- U* U)))
(t_4 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) t_3)))))
(if (<= t_4 0.0)
(*
(sqrt (* 2.0 n))
(sqrt (* U (- t (fma 2.0 (* l (/ l Om)) (* t_2 (- U U*)))))))
(if (<= t_4 5e+142)
(sqrt (* t_1 (+ (+ t (* 2.0 (/ -1.0 (/ Om (* l l))))) t_3)))
(if (<= t_4 INFINITY)
(pow
(*
(* 2.0 (* n U))
(+ t (* l (* l (- (* (/ n (* Om Om)) (- U* U)) (/ 2.0 Om))))))
0.5)
(sqrt
(*
-2.0
(*
(- (/ 2.0 Om) (* (/ n Om) (/ (- U* U) Om)))
(* n (* U (* l l)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = n * pow((l / Om), 2.0);
double t_3 = t_2 * (U_42_ - U);
double t_4 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + t_3)));
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (l * (l / Om)), (t_2 * (U - U_42_))))));
} else if (t_4 <= 5e+142) {
tmp = sqrt((t_1 * ((t + (2.0 * (-1.0 / (Om / (l * l))))) + t_3)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = pow(((2.0 * (n * U)) * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5);
} else {
tmp = sqrt((-2.0 * (((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (n * (U * (l * l))))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = Float64(n * (Float64(l / Om) ^ 2.0)) t_3 = Float64(t_2 * Float64(U_42_ - U)) t_4 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_3))) tmp = 0.0 if (t_4 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(t_2 * Float64(U - U_42_))))))); elseif (t_4 <= 5e+142) tmp = sqrt(Float64(t_1 * Float64(Float64(t + Float64(2.0 * Float64(-1.0 / Float64(Om / Float64(l * l))))) + t_3))); elseif (t_4 <= Inf) tmp = Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n / Float64(Om * Om)) * Float64(U_42_ - U)) - Float64(2.0 / Om)))))) ^ 0.5; else tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om))) * Float64(n * Float64(U * Float64(l * l)))))); end return 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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 5e+142], N[Sqrt[N[(t$95$1 * N[(N[(t + N[(2.0 * N[(-1.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(l * N[(l * N[(N[(N[(n / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := t_2 \cdot \left(U* - U\right)\\
t_4 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_3\right)}\\
\mathbf{if}\;t_4 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, t_2 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{elif}\;t_4 \leq 5 \cdot 10^{+142}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t + 2 \cdot \frac{-1}{\frac{Om}{\ell \cdot \ell}}\right) + t_3\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) - \frac{2}{Om}\right)\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U* - U}{Om}\right) \cdot \left(n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 25.2%
Simplified25.2%
pow1/225.2%
fma-udef25.2%
associate-*l/25.2%
associate-*r*25.2%
*-commutative25.2%
associate--l-25.2%
associate-*r*25.2%
associate-*l*42.1%
Applied egg-rr40.4%
unpow1/240.4%
Simplified40.4%
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*))))) < 5.0000000000000001e142Initial program 96.8%
clear-num96.8%
inv-pow96.8%
Applied egg-rr96.8%
unpow-196.8%
Simplified96.8%
if 5.0000000000000001e142 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0Initial program 33.5%
Simplified47.7%
Taylor expanded in l around 0 31.2%
*-commutative31.2%
unpow231.2%
associate-/l*32.9%
unpow232.9%
associate-*r/32.9%
metadata-eval32.9%
Simplified32.9%
pow1/234.4%
associate-*l*50.9%
associate-/r/50.9%
Applied egg-rr50.9%
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%
Simplified2.6%
Taylor expanded in l around inf 39.4%
unpow239.4%
times-frac45.1%
associate-*r/45.1%
metadata-eval45.1%
*-commutative45.1%
unpow245.1%
Simplified45.1%
Final simplification65.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U)))
(t_2
(sqrt
(*
t_1
(+
(+ t (* (/ (* l l) Om) -2.0))
(* n (* (pow (/ l Om) 2.0) (- U* U))))))))
(if (<= l 6e-107)
t_2
(if (<= l 5.4e+38)
(sqrt
(*
2.0
(*
U
(*
n
(+
(* (/ n Om) (/ (* (* l l) U*) Om))
(fma l (* (/ l Om) -2.0) t))))))
(if (<= l 9.2e+42)
t_2
(pow
(* t_1 (+ t (* l (* l (- (* (/ n (* Om Om)) (- U* U)) (/ 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 = 2.0 * (n * U);
double t_2 = sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (pow((l / Om), 2.0) * (U_42_ - U))))));
double tmp;
if (l <= 6e-107) {
tmp = t_2;
} else if (l <= 5.4e+38) {
tmp = sqrt((2.0 * (U * (n * (((n / Om) * (((l * l) * U_42_) / Om)) + fma(l, ((l / Om) * -2.0), t))))));
} else if (l <= 9.2e+42) {
tmp = t_2;
} else {
tmp = pow((t_1 * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5);
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) t_2 = sqrt(Float64(t_1 * Float64(Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)))))) tmp = 0.0 if (l <= 6e-107) tmp = t_2; elseif (l <= 5.4e+38) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(Float64(l * l) * U_42_) / Om)) + fma(l, Float64(Float64(l / Om) * -2.0), t)))))); elseif (l <= 9.2e+42) tmp = t_2; else tmp = Float64(t_1 * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n / Float64(Om * Om)) * Float64(U_42_ - U)) - Float64(2.0 / Om)))))) ^ 0.5; end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t$95$1 * N[(N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, 6e-107], t$95$2, If[LessEqual[l, 5.4e+38], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 9.2e+42], t$95$2, N[Power[N[(t$95$1 * N[(t + N[(l * N[(l * N[(N[(N[(n / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
t_2 := \sqrt{t_1 \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{if}\;\ell \leq 6 \cdot 10^{-107}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\ell \leq 5.4 \cdot 10^{+38}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot U*}{Om} + \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 9.2 \cdot 10^{+42}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;{\left(t_1 \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) - \frac{2}{Om}\right)\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 5.9999999999999994e-107 or 5.39999999999999992e38 < l < 9.2e42Initial program 53.5%
Simplified51.3%
if 5.9999999999999994e-107 < l < 5.39999999999999992e38Initial program 42.2%
Simplified41.5%
Taylor expanded in U around 0 42.2%
associate-*r*52.8%
Simplified58.2%
if 9.2e42 < l Initial program 37.2%
Simplified43.0%
Taylor expanded in l around 0 47.7%
*-commutative47.7%
unpow247.7%
associate-/l*47.7%
unpow247.7%
associate-*r/47.7%
metadata-eval47.7%
Simplified47.7%
pow1/248.0%
associate-*l*53.5%
associate-/r/53.4%
Applied egg-rr53.4%
Final simplification52.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U))))
(if (<= l 4.7e-166)
(sqrt (* t t_1))
(pow
(* t_1 (+ t (* l (* l (- (* (/ n (* Om Om)) (- U* U)) (/ 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 = 2.0 * (n * U);
double tmp;
if (l <= 4.7e-166) {
tmp = sqrt((t * t_1));
} else {
tmp = pow((t_1 * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
if (l <= 4.7d-166) then
tmp = sqrt((t * t_1))
else
tmp = (t_1 * (t + (l * (l * (((n / (om * om)) * (u_42 - u)) - (2.0d0 / om)))))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (l <= 4.7e-166) {
tmp = Math.sqrt((t * t_1));
} else {
tmp = Math.pow((t_1 * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) tmp = 0 if l <= 4.7e-166: tmp = math.sqrt((t * t_1)) else: tmp = math.pow((t_1 * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (2.0 / Om)))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if (l <= 4.7e-166) tmp = sqrt(Float64(t * t_1)); else tmp = Float64(t_1 * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n / Float64(Om * Om)) * Float64(U_42_ - U)) - Float64(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 = 2.0 * (n * U); tmp = 0.0; if (l <= 4.7e-166) tmp = sqrt((t * t_1)); else tmp = (t_1 * (t + (l * (l * (((n / (Om * Om)) * (U_42_ - U)) - (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[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 4.7e-166], N[Sqrt[N[(t * t$95$1), $MachinePrecision]], $MachinePrecision], N[Power[N[(t$95$1 * N[(t + N[(l * N[(l * N[(N[(N[(n / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;\ell \leq 4.7 \cdot 10^{-166}:\\
\;\;\;\;\sqrt{t \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;{\left(t_1 \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) - \frac{2}{Om}\right)\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 4.70000000000000014e-166Initial program 52.4%
Simplified50.6%
Taylor expanded in t around inf 39.7%
if 4.70000000000000014e-166 < l Initial program 43.6%
Simplified46.7%
Taylor expanded in l around 0 45.4%
*-commutative45.4%
unpow245.4%
associate-/l*45.5%
unpow245.5%
associate-*r/45.5%
metadata-eval45.5%
Simplified45.5%
pow1/245.8%
associate-*l*49.9%
associate-/r/49.9%
Applied egg-rr49.9%
Final simplification43.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U))))
(if (<= l 1.5e-165)
(sqrt (* t t_1))
(if (<= l 1.7e+149)
(sqrt (* t_1 (+ t (* (* l l) (- (/ n (/ (* Om Om) U*)) (/ 2.0 Om))))))
(pow (* (* 2.0 n) (* U (- t (* 2.0 (/ l (/ Om l)))))) 0.5)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (l <= 1.5e-165) {
tmp = sqrt((t * t_1));
} else if (l <= 1.7e+149) {
tmp = sqrt((t_1 * (t + ((l * l) * ((n / ((Om * Om) / U_42_)) - (2.0 / Om))))));
} else {
tmp = pow(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
if (l <= 1.5d-165) then
tmp = sqrt((t * t_1))
else if (l <= 1.7d+149) then
tmp = sqrt((t_1 * (t + ((l * l) * ((n / ((om * om) / u_42)) - (2.0d0 / om))))))
else
tmp = ((2.0d0 * n) * (u * (t - (2.0d0 * (l / (om / l)))))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (l <= 1.5e-165) {
tmp = Math.sqrt((t * t_1));
} else if (l <= 1.7e+149) {
tmp = Math.sqrt((t_1 * (t + ((l * l) * ((n / ((Om * Om) / U_42_)) - (2.0 / Om))))));
} else {
tmp = Math.pow(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) tmp = 0 if l <= 1.5e-165: tmp = math.sqrt((t * t_1)) elif l <= 1.7e+149: tmp = math.sqrt((t_1 * (t + ((l * l) * ((n / ((Om * Om) / U_42_)) - (2.0 / Om)))))) else: tmp = math.pow(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if (l <= 1.5e-165) tmp = sqrt(Float64(t * t_1)); elseif (l <= 1.7e+149) tmp = sqrt(Float64(t_1 * Float64(t + Float64(Float64(l * l) * Float64(Float64(n / Float64(Float64(Om * Om) / U_42_)) - Float64(2.0 / Om)))))); else tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l / Float64(Om / l)))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * U); tmp = 0.0; if (l <= 1.5e-165) tmp = sqrt((t * t_1)); elseif (l <= 1.7e+149) tmp = sqrt((t_1 * (t + ((l * l) * ((n / ((Om * Om) / U_42_)) - (2.0 / Om)))))); else tmp = ((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))) ^ 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[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 1.5e-165], N[Sqrt[N[(t * t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.7e+149], N[Sqrt[N[(t$95$1 * N[(t + N[(N[(l * l), $MachinePrecision] * N[(N[(n / N[(N[(Om * Om), $MachinePrecision] / U$42$), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{-165}:\\
\;\;\;\;\sqrt{t \cdot t_1}\\
\mathbf{elif}\;\ell \leq 1.7 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{n}{\frac{Om \cdot Om}{U*}} - \frac{2}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.49999999999999989e-165Initial program 52.4%
Simplified50.6%
Taylor expanded in t around inf 39.7%
if 1.49999999999999989e-165 < l < 1.6999999999999999e149Initial program 55.8%
Simplified53.5%
Taylor expanded in l around 0 50.5%
*-commutative50.5%
unpow250.5%
associate-/l*50.8%
unpow250.8%
associate-*r/50.8%
metadata-eval50.8%
Simplified50.8%
Taylor expanded in U around 0 50.2%
unpow250.2%
associate-*r/50.2%
metadata-eval50.2%
+-commutative50.2%
mul-1-neg50.2%
unsub-neg50.2%
associate-/l*50.2%
unpow250.2%
Simplified50.2%
if 1.6999999999999999e149 < l Initial program 24.1%
Simplified35.9%
Taylor expanded in l around 0 37.1%
*-commutative37.1%
unpow237.1%
associate-/l*37.1%
unpow237.1%
associate-*r/37.1%
metadata-eval37.1%
Simplified37.1%
pow1/237.5%
associate-*l*46.0%
associate-/r/46.0%
Applied egg-rr46.0%
Taylor expanded in n around 0 38.2%
associate-*r*38.2%
*-commutative38.2%
*-commutative38.2%
unpow238.2%
associate-/l*46.6%
*-commutative46.6%
Simplified46.6%
Final simplification42.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U))))
(if (<= U -1.05e-157)
(pow (* t_1 (+ t (* l (* l (- (/ (* n U*) (* Om Om)) (/ 2.0 Om)))))) 0.5)
(if (<= U 0.0012)
(pow (* (* 2.0 n) (* U (- t (* 2.0 (/ l (/ Om l)))))) 0.5)
(sqrt
(* t_1 (+ t (* (* l l) (- (/ n (/ (* Om Om) U*)) (/ 2.0 Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (U <= -1.05e-157) {
tmp = pow((t_1 * (t + (l * (l * (((n * U_42_) / (Om * Om)) - (2.0 / Om)))))), 0.5);
} else if (U <= 0.0012) {
tmp = pow(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))), 0.5);
} else {
tmp = sqrt((t_1 * (t + ((l * l) * ((n / ((Om * Om) / U_42_)) - (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) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
if (u <= (-1.05d-157)) then
tmp = (t_1 * (t + (l * (l * (((n * u_42) / (om * om)) - (2.0d0 / om)))))) ** 0.5d0
else if (u <= 0.0012d0) then
tmp = ((2.0d0 * n) * (u * (t - (2.0d0 * (l / (om / l)))))) ** 0.5d0
else
tmp = sqrt((t_1 * (t + ((l * l) * ((n / ((om * om) / u_42)) - (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 t_1 = 2.0 * (n * U);
double tmp;
if (U <= -1.05e-157) {
tmp = Math.pow((t_1 * (t + (l * (l * (((n * U_42_) / (Om * Om)) - (2.0 / Om)))))), 0.5);
} else if (U <= 0.0012) {
tmp = Math.pow(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))), 0.5);
} else {
tmp = Math.sqrt((t_1 * (t + ((l * l) * ((n / ((Om * Om) / U_42_)) - (2.0 / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) tmp = 0 if U <= -1.05e-157: tmp = math.pow((t_1 * (t + (l * (l * (((n * U_42_) / (Om * Om)) - (2.0 / Om)))))), 0.5) elif U <= 0.0012: tmp = math.pow(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))), 0.5) else: tmp = math.sqrt((t_1 * (t + ((l * l) * ((n / ((Om * Om) / U_42_)) - (2.0 / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if (U <= -1.05e-157) tmp = Float64(t_1 * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n * U_42_) / Float64(Om * Om)) - Float64(2.0 / Om)))))) ^ 0.5; elseif (U <= 0.0012) tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l / Float64(Om / l)))))) ^ 0.5; else tmp = sqrt(Float64(t_1 * Float64(t + Float64(Float64(l * l) * Float64(Float64(n / Float64(Float64(Om * Om) / U_42_)) - Float64(2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * U); tmp = 0.0; if (U <= -1.05e-157) tmp = (t_1 * (t + (l * (l * (((n * U_42_) / (Om * Om)) - (2.0 / Om)))))) ^ 0.5; elseif (U <= 0.0012) tmp = ((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))) ^ 0.5; else tmp = sqrt((t_1 * (t + ((l * l) * ((n / ((Om * Om) / U_42_)) - (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$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[U, -1.05e-157], N[Power[N[(t$95$1 * N[(t + N[(l * N[(l * N[(N[(N[(n * U$42$), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[U, 0.0012], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(t$95$1 * N[(t + N[(N[(l * l), $MachinePrecision] * N[(N[(n / N[(N[(Om * Om), $MachinePrecision] / U$42$), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;U \leq -1.05 \cdot 10^{-157}:\\
\;\;\;\;{\left(t_1 \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n \cdot U*}{Om \cdot Om} - \frac{2}{Om}\right)\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;U \leq 0.0012:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{n}{\frac{Om \cdot Om}{U*}} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if U < -1.05e-157Initial program 54.7%
Simplified61.4%
Taylor expanded in l around 0 56.0%
*-commutative56.0%
unpow256.0%
associate-/l*54.9%
unpow254.9%
associate-*r/54.9%
metadata-eval54.9%
Simplified54.9%
pow1/255.0%
associate-*l*62.3%
associate-/r/63.4%
Applied egg-rr63.4%
Taylor expanded in U around 0 64.5%
associate-*r/64.5%
mul-1-neg64.5%
unpow264.5%
Simplified64.5%
if -1.05e-157 < U < 0.00119999999999999989Initial program 43.7%
Simplified45.8%
Taylor expanded in l around 0 38.5%
*-commutative38.5%
unpow238.5%
associate-/l*39.9%
unpow239.9%
associate-*r/39.9%
metadata-eval39.9%
Simplified39.9%
pow1/240.0%
associate-*l*45.6%
associate-/r/44.9%
Applied egg-rr44.9%
Taylor expanded in n around 0 42.9%
associate-*r*43.6%
*-commutative43.6%
*-commutative43.6%
unpow243.6%
associate-/l*50.3%
*-commutative50.3%
Simplified50.3%
if 0.00119999999999999989 < U Initial program 61.4%
Simplified53.8%
Taylor expanded in l around 0 60.8%
*-commutative60.8%
unpow260.8%
associate-/l*68.3%
unpow268.3%
associate-*r/68.3%
metadata-eval68.3%
Simplified68.3%
Taylor expanded in U around 0 65.1%
unpow265.1%
associate-*r/65.1%
metadata-eval65.1%
+-commutative65.1%
mul-1-neg65.1%
unsub-neg65.1%
associate-/l*71.8%
unpow271.8%
Simplified71.8%
Final simplification57.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om -1.8e+122)
(sqrt (* (* 2.0 (* n U)) (- t (* 2.0 (* l (/ l Om))))))
(if (<= Om 1e-95)
(pow (* 2.0 (* n (* U (+ t (* (/ (* l l) Om) -2.0))))) 0.5)
(sqrt (* (* (* 2.0 n) U) (- t (* (/ l Om) (* 2.0 l))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -1.8e+122) {
tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om))))));
} else if (Om <= 1e-95) {
tmp = pow((2.0 * (n * (U * (t + (((l * l) / Om) * -2.0))))), 0.5);
} else {
tmp = sqrt((((2.0 * n) * U) * (t - ((l / Om) * (2.0 * l)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (om <= (-1.8d+122)) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (2.0d0 * (l * (l / om))))))
else if (om <= 1d-95) then
tmp = (2.0d0 * (n * (u * (t + (((l * l) / om) * (-2.0d0)))))) ** 0.5d0
else
tmp = sqrt((((2.0d0 * n) * u) * (t - ((l / om) * (2.0d0 * l)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -1.8e+122) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om))))));
} else if (Om <= 1e-95) {
tmp = Math.pow((2.0 * (n * (U * (t + (((l * l) / Om) * -2.0))))), 0.5);
} else {
tmp = Math.sqrt((((2.0 * n) * U) * (t - ((l / Om) * (2.0 * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -1.8e+122: tmp = math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om)))))) elif Om <= 1e-95: tmp = math.pow((2.0 * (n * (U * (t + (((l * l) / Om) * -2.0))))), 0.5) else: tmp = math.sqrt((((2.0 * n) * U) * (t - ((l / Om) * (2.0 * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -1.8e+122) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))); elseif (Om <= 1e-95) tmp = Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0))))) ^ 0.5; else tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(Float64(l / Om) * Float64(2.0 * l))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -1.8e+122) tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om)))))); elseif (Om <= 1e-95) tmp = (2.0 * (n * (U * (t + (((l * l) / Om) * -2.0))))) ^ 0.5; else tmp = sqrt((((2.0 * n) * U) * (t - ((l / Om) * (2.0 * l))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -1.8e+122], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 1e-95], N[Power[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(N[(l / Om), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.8 \cdot 10^{+122}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}\\
\mathbf{elif}\;Om \leq 10^{-95}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right)}\\
\end{array}
\end{array}
if Om < -1.8000000000000001e122Initial program 48.3%
Simplified57.0%
Taylor expanded in Om around inf 44.5%
unpow244.5%
associate-*r/59.2%
Simplified59.2%
if -1.8000000000000001e122 < Om < 9.99999999999999989e-96Initial program 43.0%
Simplified41.9%
Taylor expanded in l around 0 41.6%
*-commutative41.6%
unpow241.6%
associate-/l*41.7%
unpow241.7%
associate-*r/41.7%
metadata-eval41.7%
Simplified41.7%
pow1/241.9%
associate-*l*43.1%
associate-/r/42.3%
Applied egg-rr42.3%
Taylor expanded in n around 0 43.8%
*-commutative43.8%
cancel-sign-sub-inv43.8%
metadata-eval43.8%
unpow243.8%
Simplified43.8%
if 9.99999999999999989e-96 < Om Initial program 59.4%
clear-num59.4%
inv-pow59.4%
Applied egg-rr59.4%
unpow-159.4%
Simplified59.4%
Taylor expanded in Om around inf 53.5%
metadata-eval53.5%
cancel-sign-sub-inv53.5%
unpow253.5%
associate-*r/59.5%
associate-*r*59.5%
Simplified59.5%
Final simplification52.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.5e-85) (sqrt (* t (* 2.0 (* n U)))) (pow (* (* 2.0 n) (* U (- t (* 2.0 (/ l (/ Om l)))))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-85) {
tmp = sqrt((t * (2.0 * (n * U))));
} else {
tmp = pow(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.5d-85) then
tmp = sqrt((t * (2.0d0 * (n * u))))
else
tmp = ((2.0d0 * n) * (u * (t - (2.0d0 * (l / (om / l)))))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-85) {
tmp = Math.sqrt((t * (2.0 * (n * U))));
} else {
tmp = Math.pow(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e-85: tmp = math.sqrt((t * (2.0 * (n * U)))) else: tmp = math.pow(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e-85) tmp = sqrt(Float64(t * Float64(2.0 * Float64(n * U)))); else tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l / Float64(Om / l)))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.5e-85) tmp = sqrt((t * (2.0 * (n * U)))); else tmp = ((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e-85], N[Sqrt[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{-85}:\\
\;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.50000000000000011e-85Initial program 52.2%
Simplified50.1%
Taylor expanded in t around inf 39.3%
if 1.50000000000000011e-85 < l Initial program 41.6%
Simplified45.9%
Taylor expanded in l around 0 48.1%
*-commutative48.1%
unpow248.1%
associate-/l*48.1%
unpow248.1%
associate-*r/48.1%
metadata-eval48.1%
Simplified48.1%
pow1/248.3%
associate-*l*52.5%
associate-/r/52.4%
Applied egg-rr52.4%
Taylor expanded in n around 0 43.2%
associate-*r*44.7%
*-commutative44.7%
*-commutative44.7%
unpow244.7%
associate-/l*48.8%
*-commutative48.8%
Simplified48.8%
Final simplification41.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* 2.0 (* n U)) (- 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 * (n * U)) * (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 * (n * u)) * (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 * (n * U)) * (t - (2.0 * (l * (l / Om))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l * (l / Om))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * Float64(n * U)) * 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 * (n * U)) * (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[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}
\end{array}
Initial program 49.4%
Simplified51.8%
Taylor expanded in Om around inf 41.3%
unpow241.3%
associate-*r/46.2%
Simplified46.2%
Final simplification46.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- t (* (/ l Om) (* 2.0 l))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * (t - ((l / Om) * (2.0 * l)))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * (t - ((l / om) * (2.0d0 * l)))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * (t - ((l / Om) * (2.0 * l)))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * (t - ((l / Om) * (2.0 * l)))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(Float64(l / Om) * Float64(2.0 * l))))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * (t - ((l / Om) * (2.0 * l))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(N[(l / Om), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right)}
\end{array}
Initial program 49.4%
clear-num49.4%
inv-pow49.4%
Applied egg-rr49.4%
unpow-149.4%
Simplified49.4%
Taylor expanded in Om around inf 41.3%
metadata-eval41.3%
cancel-sign-sub-inv41.3%
unpow241.3%
associate-*r/46.2%
associate-*r*46.2%
Simplified46.2%
Final simplification46.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.1e-106) (sqrt (* t (* 2.0 (* n U)))) (pow (* 2.0 (* U (* n t))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.1e-106) {
tmp = sqrt((t * (2.0 * (n * U))));
} else {
tmp = pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4.1d-106) then
tmp = sqrt((t * (2.0d0 * (n * u))))
else
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.1e-106) {
tmp = Math.sqrt((t * (2.0 * (n * U))));
} else {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.1e-106: tmp = math.sqrt((t * (2.0 * (n * U)))) else: tmp = math.pow((2.0 * (U * (n * t))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.1e-106) tmp = sqrt(Float64(t * Float64(2.0 * Float64(n * U)))); else tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.1e-106) tmp = sqrt((t * (2.0 * (n * U)))); else tmp = (2.0 * (U * (n * t))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.1e-106], N[Sqrt[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.1 \cdot 10^{-106}:\\
\;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 4.0999999999999999e-106Initial program 52.7%
Simplified50.6%
Taylor expanded in t around inf 39.5%
if 4.0999999999999999e-106 < l Initial program 41.0%
Simplified45.0%
Taylor expanded in t around inf 13.3%
pow1/214.6%
associate-*r*17.6%
Applied egg-rr17.6%
Final simplification33.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.1e-62) (sqrt (* t (* 2.0 (* n U)))) (sqrt (* 2.0 (* U (* n t))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.1e-62) {
tmp = sqrt((t * (2.0 * (n * U))));
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 2.1d-62) then
tmp = sqrt((t * (2.0d0 * (n * u))))
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.1e-62) {
tmp = Math.sqrt((t * (2.0 * (n * U))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.1e-62: tmp = math.sqrt((t * (2.0 * (n * U)))) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.1e-62) tmp = sqrt(Float64(t * Float64(2.0 * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.1e-62) tmp = sqrt((t * (2.0 * (n * U)))); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.1e-62], N[Sqrt[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.1 \cdot 10^{-62}:\\
\;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 2.0999999999999999e-62Initial program 52.5%
Simplified50.4%
Taylor expanded in t around inf 39.1%
if 2.0999999999999999e-62 < l Initial program 40.7%
Simplified45.1%
Taylor expanded in t around inf 12.4%
associate-*r*13.9%
Simplified13.9%
Final simplification32.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (n * (U * t))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (n * (u * t))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (n * (U * t))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (n * (U * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (n * (U * t)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 49.4%
Simplified51.8%
Taylor expanded in t around inf 29.9%
Final simplification29.9%
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 49.4%
Simplified51.8%
Taylor expanded in t around inf 29.9%
associate-*r*30.7%
Simplified30.7%
Final simplification30.7%
herbie shell --seed 2023272
(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*))))))