On Feb 2, 2015, at 10:22, Ed Kellett <edk141@gmail.com> wrote:

On Mon Feb 02 2015 at 4:52:49 PM Chris Barker <chris.barker@noaa.gov> wrote:On Mon, Feb 2, 2015 at 7:27 AM, Thomas Güttler <guettliml@thomas-guettler.de> wrote:Infinite what?

IntegerWell, inf is supported in floats because it is supported in the native machine double.There's also the appeal to mathematics: integers and infinities are mutually exclusive.

An affinely-extended integer set is just as easy to define as an affinely-extended real set, and it preserves the laws of integer arithmetic with the obvious extensions to undefined results (e.g., a+(b+c) == (a+b)+c or both are undefined). In particular, undefined results can be safely modeled with either a quiet nan or with exceptions.

(Also, Python integers don't actually quite model the integers, because for large enough values you get a memory error.)

By contrast, floats aren't numbers (by most definitions) to begin with, so there's no axiomatic basis to worry about breaking.

But, more importantly, the floats with inf and -inf model the affinely extended real numbers the same way the floats without infinities model the reals, so there is definitely an axiomatic basis to the design, not just some haphazard choice Intel made for no good reason.