Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ Number-theoretic and representation functions

Roughly equivalent to::

sum(itertools.starmap(operator.mul, zip(p, q, strict=True)))
sum(map(operator.mul, p, q, strict=True))

For float and mixed int/float inputs, the intermediate products
and sums are computed with extended precision.
Expand Down
4 changes: 2 additions & 2 deletions Modules/clinic/mathmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Modules/mathmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2710,15 +2710,15 @@ Return the sum of products of values from two iterables p and q.

Roughly equivalent to:

sum(itertools.starmap(operator.mul, zip(p, q, strict=True)))
sum(map(operator.mul, p, q, strict=True))

For float and mixed int/float inputs, the intermediate products
and sums are computed with extended precision.
[clinic start generated code]*/

static PyObject *
math_sumprod_impl(PyObject *module, PyObject *p, PyObject *q)
/*[clinic end generated code: output=6722dbfe60664554 input=82be54fe26f87e30]*/
/*[clinic end generated code: output=6722dbfe60664554 input=a2880317828c61d2]*/
{
PyObject *p_i = NULL, *q_i = NULL, *term_i = NULL, *new_total = NULL;
PyObject *p_it, *q_it, *total;
Expand Down
Loading