News for hackers. Stuff that matters.
Re:Why floats suck - accurate galaxy-wide coordinates in 128... by marshray on Monday May 02, 2011 @09:07PM (#2508588)
http://en.wikipedia.org/wiki/IEEE_754-1985

The spec allows the programmer to decide if the various degenerate cases in arithmetic will raise a signal, or result in a special value which propagates through the rest of the calcuations (INF, NaN, etc.).

Certainly there are times to prefer one over the other, but the facilities that were standardized back in the 80's are generally more than adequate for most uses.

Whether or not your platform C compiler lets you access these settings in a convenient and portable way is another question however...:-)

Re:Why floats suck - accurate galaxy-wide coordinates in 128... by andos on Monday May 02, 2011 @09:43PM (#2508663)
As long as everybody decides consciously whether to propagate garbage or raise flags, the world is safe.
Re:Why floats suck - accurate galaxy-wide coordinates in 128... by marshray on Tuesday May 03, 2011 @11:23AM (#2510283)
My policy is to prefer to signal or throw an exception. It's not something that can be accidentally ignored by an unconscious programmer.