Dirty trick to avoid overlflows in double_factorial
This commit is contained in:
parent
e5477bfeb1
commit
761216d32f
2
math.jl
2
math.jl
|
|
@ -15,7 +15,7 @@ laguerre(l, n, x) = gamma(n + l + 3/2) * better_sum([(-x * x)^k / gamma(k + l +
|
|||
ho_basis(l, n, x) = (-1)^n / sqrt_sqrt_pi * 2^((n + l + 2) / 2) * sqrt_factorial(n) / sqrt_double_factorial(2*n + 2*l + 1) * x^(l + 1) * exp(-x^2 / 2) * laguerre(l, n, x)
|
||||
|
||||
# for implementation of simple relative coordinates
|
||||
double_factorial(n) = Iterators.prod(n:-2:1)
|
||||
double_factorial(n) = Iterators.prod(Float64, n:-2:1)
|
||||
|
||||
"Gaussian integral for n ∈ Integers (Ref: Wolfram MathWorld + simplifications)"
|
||||
gauss_int(a, n) = double_factorial(n - 1) / (2 * a)^((n + 1)/2) * (iseven(n) ? sqrt(π / 2) : 1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue