Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b7fade4f
Commit
b7fade4f
authored
Jun 01, 2019
by
Raymond Hettinger
Committed by
GitHub
Jun 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put math.comb() docs is correct place alphabetically (GH-13734)
parent
6a150bca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
Doc/library/math.rst
Doc/library/math.rst
+15
-15
No files found.
Doc/library/math.rst
View file @
b7fade4f
...
...
@@ -36,6 +36,21 @@ Number-theoretic and representation functions
:class:`~numbers.Integral` value.
.. function:: comb(n, k)
Return the number of ways to choose *k* items from *n* items without repetition
and without order.
Also called the binomial coefficient. It is mathematically equal to the expression
``n! / (k! (n - k)!)``. It is equivalent to the coefficient of the *k*-th term in the
polynomial expansion of the expression ``(1 + x) ** n``.
Raises :exc:`TypeError` if the arguments not integers.
Raises :exc:`ValueError` if the arguments are negative or if *k* > *n*.
.. versionadded:: 3.8
.. function:: copysign(x, y)
Return a float with the magnitude (absolute value) of *x* but the sign of
...
...
@@ -232,21 +247,6 @@ Number-theoretic and representation functions
:meth:`x.__trunc__() <object.__trunc__>`.
.. function:: comb(n, k)
Return the number of ways to choose *k* items from *n* items without repetition
and without order.
Also called the binomial coefficient. It is mathematically equal to the expression
``n! / (k! (n - k)!)``. It is equivalent to the coefficient of the *k*-th term in the
polynomial expansion of the expression ``(1 + x) ** n``.
Raises :exc:`TypeError` if the arguments not integers.
Raises :exc:`ValueError` if the arguments are negative or if *k* > *n*.
.. versionadded:: 3.8
Note that :func:`frexp` and :func:`modf` have a different call/return pattern
than their C equivalents: they take a single argument and return a pair of
values, rather than returning their second return value through an 'output
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment