Skip to content

Commit

Permalink
corrected type mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
konkam committed Apr 8, 2020
1 parent fb61e67 commit 3be8263
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Cnk.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Cnk(n, k, σ)
# = Cnk(n, k, σ, 0)
σ_arb = RR(σ)
return 1//fac(RR(k)) * sum([ (-1)^i * binom(k, i, RR) * risingfac(-i * σ_arb,n) for i in 0:k])
return 1//fac(RR(k)) * sum([ (-1)^i * binom(k, i, RR_in) * risingfac(-i * σ_arb,n) for i in 0:k])
end


Expand Down
2 changes: 1 addition & 1 deletion src/Vnk.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Vnk_NGG(n, k, β, σ)
β_arb = RR(β)
σ_arb = RR(σ)
return exp(β_arb) * σ_arb^(k-1) // RR(gamma(n)) * sum([binom(n-1, i, RR) * (-1)^i * β_arb ^(i//σ_arb) * real(gamma(k-i//CC(σ_arb), CC(β_arb))) for i in 0:(n-1)])
return exp(β_arb) * σ_arb^(k-1) // RR(gamma(n)) * sum([binom(n-1, i, RR_in) * (-1)^i * β_arb ^(i//σ_arb) * real(gamma(k-i//CC(σ_arb), CC(β_arb))) for i in 0:(n-1)])
end

function Vnk_2PD(n, k, θ, σ)
Expand Down
4 changes: 2 additions & 2 deletions src/common_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Nemo.binom, Nemo.gamma
prec = 5000 ## Increase for better precision
RR_in = RealField(prec)
RR(x)::arb = RR_in(x)
CC_in = ComplexField(prec)
CC(x)::acb = CC_in(x)
CC = ComplexField(prec)
# CC(x)::acb = CC_in(x)
binom(n::Int64, k::Int64, r::Nemo.ArbField) = binom(convert(UInt64, n),convert(UInt64, k), r)
gamma(x::Int64) = Nemo.gamma(RR(x))

Expand Down

0 comments on commit 3be8263

Please sign in to comment.