32-bit fixed point overflow

816 Views Asked by At

I'm doing some 'early computing' on a 32-bit Windows PC, and looking at the limits.

Now, 2**32 is 4,294,967,296, and I find that

4294967290 + 5  

is perfectly OK, and

    4294967290 + 6 

quite properly overflows.

What puzzles me is that

   429496729 * 10

overflows, although the product, 4294967290, is in range.

Anyone interested?

1

There are 1 best solutions below

2
On BEST ANSWER

In the absense of any code, I'd guess 429496729 gets implicitly typed as signed integer, for which 4294967290 is too much.