Rémi Lapeyre <remi.lape...@henki.fr> added the comment:

Could it be 
https://github.com/python/cpython/blob/master/Modules/mathmodule.c#L2565

When 0 is in the iterator, i_result get sets to 0 and then on the next 
iteration x/i_result is 0/0 which is undefined behavior?

C99 6.5.5p5 - The result of the / operator is the quotient from the division of 
the first operand by the second; the result of the % operator is the remainder. 
In both operations, if the value of the second operand is zero, the behavior is 
undefined.

I will do some tests, if it's that I will post a patch.

----------
nosy: +remi.lapeyre

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35959>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to