On Mar 12, 2009, at 2:17 PM, Jason Grout wrote: > Craig Citro wrote: >> and be *as fast as humanly possible*. Plus, when we move things from >> Python down to Cython, we already have changes to make -- for >> instance, x**2 has to change, because C doesn't support >> exponentiation, so why would it be any different for %? > > Cython doesn't automatically translate x**2 into x*x or pow(x, > 2)? If > not, why not?
There's actually a thread to re-implement this. Originally, Pyrex translated a**b to pow(a,b) for c ints, which was strange given the result was a floating point number, so we disabled it. Of course there's a narrow range of non-overflowing values. - Robert --~--~---------~--~----~------------~-------~--~----~ 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://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
