Message6270
Logged In: NO
Making a 3-arg integer pow return a tiny floating point
number seems weird to me. I don't see any situation
where I'd want that. If I call pow with b<0 without
expecting it to use the egcd to get the integer answer mod
c, I've almost certainly made a mistake. So my first
preference is still egcd, but second preference is to stay
with the old behavior of throwing an exception rather than
have my integer calculation suddenly turn into a floating
point calculation without my realizing it.
I'm also enthused about changing / to turn 2/3 into a
float, but at least I understand the argument that 2/3=0
confuses newbies. But newbies won't be using 3-arg pow(),
so we needn't worry about confusing them. IMHO anyone using
3-arg pow on integers will expect an integer result.
By the way (off topic), 3-arg pow with ~150 decimal digits
is about 5x slower in Python than in carefully optimized
asm on an x86, which is pretty good. But on a StrongARM
it appears to be about 30x slower :-(. This can't really
be fixed without adding a lot more code. Sigh. |
|
Date |
User |
Action |
Args |
2007-08-23 13:56:03 | admin | link | issue457066 messages |
2007-08-23 13:56:03 | admin | create | |
|