Here's a quick poll.

In Python, if I write "-1 % 5", I get 4. This is how we do it in Sage  
as well (and I think it's the right way--that's not what I'm trying  
to ask). However, in C if I write "-1 % 5" I get -1. The question is,  
what should I get in Cython if I write (a % b) where a and b are cdef  
ints? Should I

[ ] Get 4, because it should behave just like in Python, even though  
it will require extra logic and be a bit slower

[ ] Get -1, because they're C ints, and besides we wouldn't be using  
Cython if we didn't care about performance

[ ] Let the programmer decide (e.g. using http://wiki.cython.org/ 
enhancements/compilerdirectives ) recognizing that % will mean  
different things in different contexts.

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to