[issue35996] Optional modulus argument for new math.prod() function

2019-05-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35996] Optional modulus argument for new math.prod() function

2019-05-12 Thread Mark Dickinson
Mark Dickinson added the comment: Put me down for a -1, too. > One would also be able to things like prod(range(1, n), n) == n - 1 for > Wilson's primality test. That's not the most convincing use-case, since that's a _horribly_ inefficient way to do a primality test in the first place

[issue35996] Optional modulus argument for new math.prod() function

2019-02-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35996] Optional modulus argument for new math.prod() function

2019-02-15 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35996] Optional modulus argument for new math.prod() function

2019-02-15 Thread Berry Schoenmakers
Berry Schoenmakers added the comment: I had the same reservations but after rethinking it several times concluded that the modulus argument would fit really well. Indeed, Mathematica doesn't support the Modulus option for the Product[] function. But they don't even support it for the

[issue35996] Optional modulus argument for new math.prod() function

2019-02-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Put me down for -1. In 40 years of programming, I've needed a modulus on a product exactly zero times. -- ___ Python tracker ___

[issue35996] Optional modulus argument for new math.prod() function

2019-02-14 Thread Josh Rosenberg
Josh Rosenberg added the comment: "One other issue is that the arguments to prod() need not be integers, so a modulus argument wouldn't make sense in those contexts." The arguments to pow don't need to be integers either, yet the optional third argument is only really relevant to integers.

[issue35996] Optional modulus argument for new math.prod() function

2019-02-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other issue is that the arguments to prod() need not be integers, so a modulus argument wouldn't make sense in those contexts. -- ___ Python tracker

[issue35996] Optional modulus argument for new math.prod() function

2019-02-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think even Mathematica has found a need for this: https://reference.wolfram.com/language/ref/Product.html -- ___ Python tracker

[issue35996] Optional modulus argument for new math.prod() function

2019-02-14 Thread Berry Schoenmakers
New submission from Berry Schoenmakers : It's nice to see the arrival of the prod() function, see PR11359. Just as for the built-in pow(x, y[, z]) function it would be very useful to have an optional argument z for computing integer products modulo z. Typical use case in cryptography would