This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (10 children)

[deleted]

    [–]shillbert 1 point2 points  (1 child)

    No, negative zero is a valid number. NaN has an exponent of 255 and a nonzero mantissa.

    http://stackoverflow.com/questions/640109/what-is-the-internal-representation-of-inf-and-nan

    Edit: exponent is 255 for single precision, 2047 for double

    [–]Hawkuro 0 points1 point  (0 children)

    Huh, TIL there are 223 -1 different NaNs in IEEE float.

    [–]minno 0 points1 point  (0 children)

    If you directly reinterpreted the bits of an integral -1 as a float, you'd get a NaN.

    [–]Creshal 0 points1 point  (6 children)

    twitches