Skip to content

Commit

Permalink
Start to correct the binomials. (#914)
Browse files Browse the repository at this point in the history
* Start to correct the binomials.

* remove the dodgy tests
  • Loading branch information
tthsqe12 committed Dec 20, 2021
1 parent 18898f6 commit 5db4abf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/src/Rings/integer.md
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,8 @@ bell(ZZ(20))

* `binomial(n::fmpz, k::fmpz) -> fmpz`

Returns the binomial coefficient ``\frac{n!}{k!(n - k)!}``. If ``n, k < 0`` or
``k > n`` we return zero.
Returns the binomial coefficient ``\frac{n (n-1) \cdots (n-k+1)}{k!}`` for
``k \ge 0`` and returns `0` for `k < 0`.

!!! note
Julia already defines the `binomial` function for `Int`, which throws an
Expand Down
2 changes: 0 additions & 2 deletions test/Rings/integer-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,6 @@ end
@test binomial(ZZ(1), ZZ(0)) == 1
@test binomial(ZZ(1), ZZ(1)) == 1

@test binomial(ZZ(-3), ZZ(2)) == 0
@test binomial(ZZ(-3), ZZ(0)) == 0
@test binomial(ZZ(2), ZZ(-3)) == 0
@test binomial(ZZ(0), ZZ(-3)) == 0
@test binomial(ZZ(-1), ZZ(-1)) == 0
Expand Down

0 comments on commit 5db4abf

Please sign in to comment.