On Fri, Mar 18, 2022 at 8:30 PM MRAB <pyt...@mrabarnett.plus.com> wrote:
> Wikipedia describes Euclidean division.
>
> Basically, the modulo is non-negative:
>
>      a == b * q + r where 0 <= r < abs(b)

That convention in the Wikipedia article dates back to a 2004 edit by
an anonymous (IP) editor. The only reference in that version was to a
course handout that only considered positive denominators.

There's nothing wrong with the convention, but I'm suspicious of the
idea that it's a widespread standard of some sort. I've never heard of
it before.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/MG7J6KWWBWZPMWVZYSMAXF4WVG2WL42A/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to