Skip to content

Commit 82ec8e2

Browse files
authored
removed factorial (#297)
Co-authored-by: PaulXiCao <>
1 parent 0597dd0 commit 82ec8e2

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

Diff for: src/gamma.jl

-7
Original file line numberDiff line numberDiff line change
@@ -818,13 +818,6 @@ logabsbeta(a::Number, b::Number) = loggamma(a) + loggamma(b) - loggamma(a + b),
818818

819819
## from base/numbers.jl
820820

821-
# this trickery is needed while the deprecated method in Base exists
822-
@static if !hasmethod(Base.factorial, Tuple{Number})
823-
import Base: factorial
824-
end
825-
factorial(x) = Base.factorial(x) # to make SpecialFunctions.factorial work unconditionally
826-
factorial(x::Number) = gamma(x + 1) # fallback for x not Integer
827-
828821
"""
829822
logabsbinomial(n, k)
830823

Diff for: test/gamma.jl

-4
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@
6868
@test loggamma(1.4+3.7im) -3.7094025330996841898 + 2.4568090502768651184im
6969
@test loggamma(1.4+3.7im) log(gamma(1.4+3.7im))
7070
@test loggamma(-4.2+0im) logabsgamma(-4.2)[1] - 5pi*im
71-
@test SpecialFunctions.factorial(3.0) == gamma(4.0) == factorial(3)
72-
for x in (3.2, 2+1im, 3//2, 3.2+0.1im)
73-
@test SpecialFunctions.factorial(x) == gamma(1+x)
74-
end
7571
@test logfactorial(0) == logfactorial(1) == 0
7672
@test logfactorial(2) == loggamma(3)
7773
# Ensure that the domain of logfactorial matches that of factorial (issue #21318)

0 commit comments

Comments
 (0)