-
Notifications
You must be signed in to change notification settings - Fork 105
removed factorial #297
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
removed factorial #297
Conversation
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
==========================================
+ Coverage 88.17% 88.20% +0.02%
==========================================
Files 11 11
Lines 2630 2628 -2
==========================================
- Hits 2319 2318 -1
+ Misses 311 310 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
The gamma function is also not the only function that interpolates the factorials, e.g. https://en.wikipedia.org/wiki/Hadamard%27s_gamma_function |
|
I'm generally fine with this. However, since it is a breaking change, it would be good to survey packages using SpecialFunctions to get a sense for whether they rely on this… |
|
The following search on github.com Another search A more general search
The search "language:Julia factorial(Float" yields 6 results. The search "https://github.com/JulHoltzDevelopers/WavesAndEigenvalues.jl" yields no result. Those were just the first searches that popped to my mind. But it seems to me like |
|
Can we merge this and bump the minor version number to signal the API change? |
The only breaking change in SpecialFunctions 2.0 [was deleting](JuliaMath/SpecialFunctions.jl#297) the `factorial(x::Real) = gamma(x+1)` function, and since you apparently only use `factorial` for integer arguments this shouldn't affect you.
The only breaking change in SpecialFunctions 2.0 [was deleting](JuliaMath/SpecialFunctions.jl#297) the `factorial(x::Real) = gamma(x+1)` function, and since we don't use `factorial` this shouldn't affect us.
The only breaking change in SpecialFunctions 2.0 [was deleting](JuliaMath/SpecialFunctions.jl#297) the `factorial(x::Real) = gamma(x+1)` function, and since you don't use `factorial` for non-integer arguments this shouldn't affect you.
Base.factorialis extended in SpecialFunction.jl.This is type piracy and doesn't follow Julia's style guide.
There is at least one problem with it for which we did not find a solution so far:
The method
Base.factorial(x::BigFloat)assumesx::UIntand therefor, we cannot overwrite it using thegammafunction for arbitraryBigFloats. There is also an issue #232 for it.As stated by stevengj at issue #296 one should much rather just call
gammafor non-integer arguments directly. Thus, there is no need for an extendedfactorialfunction.