-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: Special functions and amos #1466
Conversation
Remove amos library and update the amos license. Move extras/specfun.jl into base/math.jl, and move the location of the documentation as well.
+1 This raises an issue I sometimes wonder about: how encompassing should As I'm revising [https://github.com/johnmyleswhite/julia/commit/897ba33f2b189ea7ad9f6e7804d4a1d5b3c8db8d] the Distributions module, I've needed to pull in the psigamma, digamma and trigamma functions, which are derivatives of the gamma function that is included in Viral's patch. Where would functions like that belong? Having a central place for them seems very valuable, but having that place be |
That's a good question. Why would |
My concern is that I just don't know how many more special functions are left. I only need about 7 more, which is totally reasonable. But would 100 more be ok? |
I think that's a bridge we can cross when we get there. I suspect there aren't all that many more. Another approach would be to split them into smaller logical groups, but that could get annoying. |
Let's start with the 7. We'll worry about the refactoring when more surface. :-) |
Ok. Should I give you code for adding them now? Or I should wait until this gets merged and then look through what's missing to create an additional pull request? |
I think it would be simplest for you to checkout the |
I've made changes to pull in the three missing gamma-related functions from Rmath. Unfortunately I didn't see how to get this to work without making it an essential library. I'm pushing what I've done mostly for feedback. I have no idea if I'll have power tomorrow, so I don't response to comments, that's why. |
I didn't realize that the functions you wanted are from Rmath. I am going to mull over this for a bit. |
Let's try to find other implementations from netlib. There is a lot of code there, such as http://www.netlib.org/slatec/fnlib/ |
Ok. I'll search through and try to find another implementation. |
Jeff is right that Netlib has what we need in the cpsi.f function. Should I translate it over to Julia? |
If it is not too much effort, it would be a good idea to translate to julia. Otherwise, I can add it to the build as part of openlibm. |
Sorry for the delay. I've now implemented a simpler version of the digamma function in pure Julia. We'll eventually want to upgrade to the broader algorithm used by Rmath which includes the trigamma function and other derivatives of the gamma function, but it will take me a while to work through the Fortran code for that broader algorithm. This version is simple enough that I am confident in its correctness. |
Resolve FC conflict for building openlibm. Conflicts: deps/Makefile
@johnmyleswhite I am merging this in, and we can start a new pull request for trigamma and other derivatives of the gamma function. We also need tests for these. |
RFC: Special functions and amos
I've added tests for the digamma function. I will try to work on the other derivatives of the gamma function over the weekend. |
RFC: Special functions and amos
This moves special functions to
base/math.jl
. It also removes the amos library from the julia sources, and instead uses it from openlibm.