-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
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
pdf(::Binomial, ::Int) should return rational number. #889
Comments
Would be cool to have, though may not be that practical. |
I just need this for relatively small |
I think the delegate_statsfuns is also an issue, we cannot enjoy generics with functions called from R. In the case of Binomial, it's a bit sad to have to call R, PR welcome |
I'd be happy to work on this, but I'm mostly new contributing to open source. Why do you say delegate_statsfuns is "also" an issue? To me, it seems like it's the only place in binomial.jl where Rationals are unnecessarily converted into Floats. Wouldn't the solution be to implement the functionality of delegate_statsfuns for the binomial distribution directly in binomial.jl, indeed removing the dependence on R? |
The solution to the R dependency is JuliaStats/StatsFuns.jl#113. |
If the parameters of binomial distribution are given in rational number, then perhaps the pdf function should also return rational number. But now it gives Float64, which can cause some unintended rounding problems.
The text was updated successfully, but these errors were encountered: