why does math.pow yields OverflowError (while python itself can calculate that large number)

Tzury Bar Yochay Afro.Systems at gmail.com
Thu Oct 23 06:24:16 EDT 2008


> Because math.pow returns a float; 100 ** 155 won't fit in a float.

Sure that is the reason.
May I rephrase, my question:
Why not returning another type as long as we can calculate it?
After all, math module is likely to be used on large numbers as well.



More information about the Python-list mailing list