On Saturday, 11 July 2015 at 03:02:24 UTC, Nick B wrote:
FYI John Gustafson book is now out:
I was just thinking about overflow (more for my own interest than a practical reason). I wouldn't have known about this way to deal with it if you hadn't bumped this thread. So thanks, it's interesting (not sure if this book will adequately address Walter's original concern that it won't really reduce power consumption). I also found the discussion of rational numbers earlier in the thread interesting.
When I was looking at other ways to handle overflow, I learned about a change they made to Python circa 2.3 or 2.4 to handle overflow (PEP237). Basically, they take an approach described in the presentation in the original post that will cast an int to a long if there is an overflow.