This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nobody
Recipients
Date 2001-09-01.06:34:42
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 13:56:03adminlinkissue457066 messages
2007-08-23 13:56:03admincreate