[Haskell-cafe] ANN: ieee version 0.7

Patrick Perry patperry at gmail.com
Mon Sep 20 00:27:02 EDT 2010

I'm looking at data-binary-754 right now, and it seems pretty
complicated.  Why don't they just cast the values bitwise to integers
and then serialize those?  Forgive my naivete-- I don't know much
about binary encoding issues.

I went the route of implementing everything in C and then using the
FFI.  There's a lot of lot of bit-twiddling involved when you work
with the guts of IEEE754, which is a lot easier to do in C.  See
for a truly ugly example.  I ported this code from the Tango math
library for D (
).  It's original author, Don Clugston, claims that the function is
about as fast as a ">" comparison.  Haskell's great, but I don't think
it could get nearly as fast for a function like this.


On Sun, Sep 19, 2010 at 11:16 PM, Conrad Parker <conrad at metadecks.org> wrote:
> On 20 September 2010 11:18, Patrick Perry <patperry at gmail.com> wrote:
>>> Given that IEEE is actually a standards body and they have many
>>> standards, wouldn't it be more appropriate to call this library
>>> ieee754?
>> If it seems important to people, I'd be happy to change the name.  I'm
>> not religious about these things.  Will it clutter up hackage, though?
> I reckon it's worth making it obvious that this library does 754 and
> not, say, 1394 or 802.11 ;-) On the other hand if you intend on
> expanding the package to implement every IEEE standard ... (j/k)
> Anyway, good work. Does this have any overlap with
> data-binary-ieee754? There was some recent discussion here about the
> encoding speed in that package.
> Conrad.

More information about the Haskell-Cafe mailing list