Binary.Put and Double

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Binary.Put and Double

Rick Richardson
I need to serialize an ieee compliant 64 bit floating point number, most
often used as a Double in C.

I'm guessing that the value I need to serialize is CDouble, but Put supports
putWord64*  .

How do I convert Double to Word64 while ensuring that it is in the format of
CDouble?

Is this the right approach? If so, how is this done?

--
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein



--
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090315/e4dda9e6/attachment-0001.htm