DoubleFloats.jl
DoubleFloats.jl copied to clipboard
Cannot compute incomplete gamma function for some arguments
gamma(Double64(z),x) works fine when x < 3, but if I call for example gamma(Double64(z),3) it chokes. The reason is that it goes on to a different branch of the code that uses logabsgamma(), which is not defined for Double64 arguments. I cannot do the extension like you did using Quadmath as it does not implement logabsgamma(), so I think the simplest solution would be defining
SpecialFunctions.logabsgamma(x::Double64) = Double64.(logabsgamma(BigFloat(x)))
A bit unrelated, but I'm confused by what you are doing in the file gamma_erf.jl. Why do you write
loggamma(x::Double64) = Double64Float128(lgamma, x)
instead of
SpecialFunctions.loggamma(x::Double64) = Double64Float128(lgamma, x)
In this way you're not extending the function, but shadowing it, so it conflicts with the version from SpecialFunctions.