[Numpy-discussion] Integers to integer powers, let's make a decision

Allan Haldane allanhaldane at gmail.com
Fri Jun 10 15:59:08 EDT 2016


On 06/10/2016 01:50 PM, Alan Isaac wrote:
> Again, **almost all** integer combinations overflow: that's the point.

Don't almost all integer combinations overflow for multiplication as well?

I estimate that for unsigned 32 bit integers, only roughly 1 in 2e8
combinations don't overflow.

The fraction is approximately (np.euler_gamma + 32*np.log(2))/2.0**32,
if I didn't make a mistake.

:)
Allan



More information about the NumPy-Discussion mailing list