
Perhaps this module will help:
http://hackage.haskell.org/package/data-binary-ieee754
Regards
Krzysztof Skrzętnicki
On Tue, Nov 10, 2009 at 10:28, Philip Scott
Hi Folks,
I'd just like to say thank you very much for your patient answers to my questions so far; it has been a real help on my Haskell adventure. Once I am become a Haskell god like y'all I will endeavour to repay the debt.
My current puzzle is doubles. I've extensively scoured the net and found various mentions of the same problem, but as far as I can see no answers; which I can't quite believe as it must be something people do all the time.
I need to interface my Haskell program with an existing C++ one over a TCP socket. I need to feed the C++ program doubles in standard 64-bit network order IEEE 765-1985 format, but if I serialize a double using Data.Binary I get something which has altogeather too many bytes (I read somewhere it is an int and a long for the exponent and mantissa).
Any advice (or pointers to old threads, it isn't very easy to search the list archives) will be compensated for by a credit note for milk and cookies next time you are in the Cambridge, UK area :)
- Philip
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners