Hi Tim,

On Sun, Jan 21, 2007 at 09:08:18PM -0500, Tim Peters wrote:
> >BTW - isn't that case in contradiction with the general Python rule that
> >if b > 0, then a % b should return a number between 0 included and b
> >excluded?
> 
> Sure.

You're not addressing my point, though, so I was probably not clear
enough.  My surprize was not that a % b was equal to b in this case, and
so not strictly smaller than b (because I expect such things when
working with floats).  My surprize was that Decimals don't even try to
be between 0 and b, and sometimes give a result that is far outside the
range.  This surprized me because I expected floats and Decimals to try
to give "approximately equal" results...


A bientot,

Armin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to