JuliaMath / HypergeometricFunctions.jl

A Julia package for calculating hypergeometric functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make DualNumbers a weak dependency

ararslan opened this issue · comments

DualNumbers has been a direct dependency of this package for about as long as this package has tracked its dependencies. Methods of some internal functions are defined for Dual but dual numbers don't seem to actually be used. As far as I can tell, it would be a non-functional change from this package's perspective to remove the dependency and the methods. That said, I don't know whether there was a reason (e.g. integration with some other specific downstream package) that these methods are defined for Dual. If it's important to have those methods defined, they could potentially be moved to an extension (for Julia 1.9+), or otherwise perhaps the dependency can be removed altogether.

I don’t there’s a deep reason other than at one point I tried to auto-diff a hyper geometric function. I think just removing the code is fine

Pro: it's reasonable to remove superfluous dependencies. (I'm always in favour of that!)
Con: #59 would result in code duplication elsewhere.
And: the using and compilation times of this package are dominated by SpecialFunctions, not DualNumbers.

As a historical note, this repository started as a submodule in SingularIntegralEquations.jl but was made into a package ostensibly to remove the ApproxFun compilation time from most users. Dual argument 2F1s are used here https://github.com/JuliaApproximation/SingularIntegralEquations.jl/blob/d4f5caeb37a76e58b131575897955ce1c29d5f36/src/stieltjesmoment.jl#L28-L51.

Looking at #59, it seems that continuing support in SingularIntegralEquations.jl would require duplicating the methods that are no longer declared for Dual128 and DualComplex256, which is not ideal for maintenance.