-
Notifications
You must be signed in to change notification settings - Fork 42
Depend on IrrationalConstants.jl #118
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
Conversation
| Return the logarithm of [multivariate gamma function](https://en.wikipedia.org/wiki/Multivariate_gamma_function) ([DLMF 35.3.1](https://dlmf.nist.gov/35.3.1)). | ||
| """ | ||
| function logmvgamma(p::Int, a::Real) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test for this, i.e. test/misc.jl:45, is currently failing because the numerical accuracy is slightly different than logbeta. I'm very confused as to why it started failing now as the constants aren't even being used in logmvgamma.
This came up before I made the change to use logπ btw; that was an attempt to fix it.
|
This will lead to ambiguity warnings and redefinitions with LogExpFunctions 0.2, won't it? It seems a bit more consistent also to update LogExpFunctions to 0.3 which depends on IrrationalConstants. Similar to LogExpFunctions maybe one should not reexport the constants anymore and require users to load IrrationalConstants explicitly, @tpapp? |
Ah yes sorry, checked that LogExpFunctions now depends on IrrationalConstants.jl but forgot to bump the compat version 👍 |
|
Also should prob wait for JuliaMath/SpecialFunctions.jl#333 since otherwise bumping LogExpFunctions.jl to 0.3 will lead to a downgrade of SpecialFunctions. |
|
SpecialFunctions 1.6.1 supports LogExpFunctions 0.3. |
Codecov Report
@@ Coverage Diff @@
## master #118 +/- ##
=======================================
Coverage 28.72% 28.72%
=======================================
Files 11 11
Lines 369 369
=======================================
Hits 106 106
Misses 263 263
Continue to review full report at Codecov.
|
|
Aaaaah you're back my love ❤️ Should we bump the compat entry for SpecialFunctions then? |
For LogExpFunctions you mean, I guess? SpecialFunctions 1.6.1 is already supported. |
|
No I mean, this PR will be breaking if you can't use IrrationalConstants.jl, right? So if IrrationalConstants.jl is only compat with SpecialFunctions 1.6.1, then should we lower bound the compat entry for SpecialFunctiosn here in StatsFuns for to 1.6.1? |
|
You can use IrrationalConstants also with older versions of SpecialFunctions - they don't depend on IrrationalConstants, so you should be able to install both packages just fine. |
|
Haha, of course; nevermind me! 🙃 Sooo are we good then, with the exception of that one test which now seems to fail because of "numerical improvement"? And what should I do with that test? Just relax the rtol a bit? |
|
I've seen these test failures before, maybe they are caused by some changes in SpecialFunctions. Can it be reproduced on the master branch? Otherwise, I think we still have to address #118 (comment) - currently both LogExpFunctions (0.2) and IrrationalConstants define and export these constants. |
|
We could also support both LogExpFunctions 0.2 and 0.3, it seems, by changing |
|
Fixed and extended by #122. |
Now that IrrationalConstants.jl have been released, the constants in StatsFuns are no longer required.
This is nice since it means that we can take advantange the constants that before were defined in StatsFuns.jl in other packages, without depending on StatsFuns.jl, e.g. some of them would be useful in SpecialFunctions.jl.
EDIT: This has also been done in LogExpFunctions.jl 👍