-
-
Couldn't load subscription status.
- Fork 5.7k
RFC: Special functions and amos #1466
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
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
) Stdlib: LinearAlgebra URL: https://github.com/JuliaLang/LinearAlgebra.jl.git Stdlib branch: master Julia branch: master Old commit: d568106 New commit: 7e11b5e Julia version: 1.13.0-DEV LinearAlgebra version: 1.13.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/LinearAlgebra.jl@d568106...7e11b5e ``` $ git log --oneline d568106..7e11b5e 7e11b5e Add `AbstractArray` conversions for `AbstractQ` (#1470) 52c41f7 Add missing methods to `diagind` documentation (#1473) 28ee87e Overload array constructors for BunchKaufman (#1461) (#1466) 6f73f65 Add 'eigmin'/'eigmax' methods for 'Eigen' (#1468) 7b21cab Use `Iterators.rest` within `generic_norm` to simplify code (#1459) 57ac0eb Make `parentof_applytri` fully type-stable (#1243) 880a9fe Add `_sym_uplo` to skip validation (#1441) 8d6ca14 Public function to access the `uplo` for `Symmetric`/`Hermitian` (#1440) 7a4b27e Make `dot` with Bool-arrays type-stable (#1456) 6fe77f8 Make `dot` with Bool-arrays type-stable 5af75df Remove zeroing in `similar` for `Hermitian` (#1455) 5685390 Index into diag in `Tridigaonal` * `Diagonal` (#1454) 51923a5 Forward structure-preserving broadcasting to diag for `Diagonal` (#1423) 35a4427 Iterator norm in `isapprox` for `Array`s (#1378) 98723df Structured broadcasting for UpperHessenberg (#1325) ``` Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>
#59927) Stdlib: LinearAlgebra URL: https://github.com/JuliaLang/LinearAlgebra.jl.git Stdlib branch: release-1.12 Julia branch: backports-release-1.12 Old commit: 24f5e21 New commit: 5567504 Julia version: 1.12.1 LinearAlgebra version: 1.12.0(Does not match) Bump invoked by: @ViralBShah Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/LinearAlgebra.jl@24f5e21...5567504 ``` $ git log --oneline 24f5e21..5567504 5567504 Backports to v1.12 (#1472) a2a4981 Overload array constructors for BunchKaufman (#1461) (#1466) 1ebc0cb Generic fallback for `fillstored!` (#1389) ``` Co-authored-by: ViralBShah <744411+ViralBShah@users.noreply.github.com>
This moves special functions to
base/math.jl. It also removes the amos library from the julia sources, and instead uses it from openlibm.