On May 26, 2007, at 5:07 PM, Nick Alexander wrote:
> I seem to recall that Python's __divmod__ semantics are not > mathematically friendly, but maybe that is just C's semantics? > Perhaps someone who knows more should clarify? Hmmmm there seems to be some weirdness when the divisor d is negative, i.e. it returns a negative remainder. I would prefer the remainder always be in [0, abs(d)). For positive divisors it seems mathematically sane. In fact I would prefer that it doesn't work at all for negative divisors. Depends what you're doing I suppose. David --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
