We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stirling numbers of the second kind are always nonnegative and yet:
julia> stirlings2(26,10) -5247188700862703611
The same issue plagues stirlings1. We have
stirlings1
julia> stirlings1(26,10) 9107464261356742080
but the correct value is 196928100451110820242880.
196928100451110820242880
The text was updated successfully, but these errors were encountered:
Allow calling stirlings1 and stirlings2 with Integer arguments
stirlings2
Integer
11fd77b
This allows to call them with `BigInt` arguments to avoid overflow. Closes JuliaMath#104.
Both errors are caused by overflow. stirlings1 and stirlings2 take arguments of type Int, which is usually Int64, but
Int
Int64
typemax(Int64)
#193 addresses this by allowing stirlings1 and stirlings2 to be called with arguments of any subtype of Integer:
julia> stirlings1(big(26), 10) 196928100451110820242880 julia> stirlings2(big(26), 10) 13199555372846848005
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Stirling numbers of the second kind are always nonnegative and yet:
The same issue plagues
stirlings1
. We havebut the correct value is
196928100451110820242880
.The text was updated successfully, but these errors were encountered: