On Tue, Sep 24, 2013 at 11:36 AM, Stijn van Drongelen <rhymoid@gmail.com> wrote:
On Tue, Sep 24, 2013 at 5:39 PM, Sven Panne <svenpanne@gmail.com> wrote:
2013/9/22 Mike Meyer <mwm@mired.org>:
> On Sat, Sep 21, 2013 at 5:28 PM, Bardur Arantsson <spam@scientician.net>
> wrote:
> Trying to make something whose name is "Not A Number" act like a
> number sounds broken from the start.

The point here is that IEEE floats are actually more something like a
"Maybe Float", with various "Nothing"s, i.e. the infinities and NaNs,
which all propagate in a well-defined way.

So, `Either IeeeFault Float`? ;)

Sort of, but IeeeFault isn't really a zero.   Sometimes they can get back to a normal Float value:

  Prelude> let x = 1.0/0
  Prelude> x
  Infinity
  Prelude> 1/x
  0.0

Also, IEEE float support doesn't make sense as a library, it needs to be built into the compiler (ignoring extensible compiler support via the FFI).  The whole point of IEEE floats is that they're very fast, but in order to take advantage of that the compiler needs to know about them in order to use the proper CPU instructions.  Certainly you could emulate them in software, but then they'd no longer be fast, so there'd be no point to it.