@@ -124,40 +124,27 @@ noted otherwise, all return values are floats.
124124Number-theoretic functions
125125--------------------------
126126
127- .. function :: comb(n, k)
128-
129- Return the number of ways to choose *k * items from *n * items without repetition
130- and without order.
131-
132- Evaluates to ``n! / (k! * (n - k)!) `` when ``k <= n `` and evaluates
133- to zero when ``k > n ``.
127+ These functions are aliases of corresponding functions in the
128+ :mod: `imath ` module.
134129
135- Also called the binomial coefficient because it is equivalent
136- to the coefficient of k-th term in polynomial expansion of
137- ``(1 + x)ⁿ ``.
130+ .. function :: comb(n, k)
138131
139- Raises :exc: `TypeError ` if either of the arguments are not integers.
140- Raises :exc: `ValueError ` if either of the arguments are negative.
132+ An alias of :func: `imath.comb `.
141133
142134 .. versionadded :: 3.8
143135
144136
145137.. function :: factorial(n)
146138
147- Return *n * factorial as an integer. Raises :exc: `ValueError ` if *n * is not integral or
148- is negative.
139+ An alias of :func: `imath.factorial `.
149140
150141 .. versionchanged :: 3.10
151142 Floats with integral values (like ``5.0 ``) are no longer accepted.
152143
153144
154145.. function :: gcd(*integers)
155146
156- Return the greatest common divisor of the specified integer arguments.
157- If any of the arguments is nonzero, then the returned value is the largest
158- positive integer that is a divisor of all arguments. If all arguments
159- are zero, then the returned value is ``0 ``. ``gcd() `` without arguments
160- returns ``0 ``.
147+ An alias of :func: `imath.gcd `.
161148
162149 .. versionadded :: 3.5
163150
@@ -168,42 +155,21 @@ Number-theoretic functions
168155
169156.. function :: isqrt(n)
170157
171- Return the integer square root of the nonnegative integer *n *. This is the
172- floor of the exact square root of *n *, or equivalently the greatest integer
173- *a * such that *a *\ ² |nbsp | ≤ |nbsp | *n *.
174-
175- For some applications, it may be more convenient to have the least integer
176- *a * such that *n * |nbsp | ≤ |nbsp | *a *\ ², or in other words the ceiling of
177- the exact square root of *n *. For positive *n *, this can be computed using
178- ``a = 1 + isqrt(n - 1) ``.
158+ An alias of :func: `imath.isqrt `.
179159
180160 .. versionadded :: 3.8
181161
182162
183163.. function :: lcm(*integers)
184164
185- Return the least common multiple of the specified integer arguments.
186- If all arguments are nonzero, then the returned value is the smallest
187- positive integer that is a multiple of all arguments. If any of the arguments
188- is zero, then the returned value is ``0 ``. ``lcm() `` without arguments
189- returns ``1 ``.
165+ An alias of :func: `imath.lcm `.
190166
191167 .. versionadded :: 3.9
192168
193169
194170.. function :: perm(n, k=None)
195171
196- Return the number of ways to choose *k * items from *n * items
197- without repetition and with order.
198-
199- Evaluates to ``n! / (n - k)! `` when ``k <= n `` and evaluates
200- to zero when ``k > n ``.
201-
202- If *k * is not specified or is ``None ``, then *k * defaults to *n *
203- and the function returns ``n! ``.
204-
205- Raises :exc: `TypeError ` if either of the arguments are not integers.
206- Raises :exc: `ValueError ` if either of the arguments are negative.
172+ An alias of :func: `imath.perm `.
207173
208174 .. versionadded :: 3.8
209175
@@ -838,6 +804,3 @@ Constants
838804
839805 Module :mod: `cmath `
840806 Complex number versions of many of these functions.
841-
842- .. |nbsp | unicode :: 0xA0
843- :trim:
0 commit comments