
13 Mar
2008
13 Mar
'08
8:51 a.m.
On Thu, 13 Mar 2008, Lennart Augustsson wrote:
Wow, you have a tough mission if you want to replicate the bit level answers for double (btw, hi Jacob). Libraries differ for transcendental function, and even worse, CPUs differ. You may get different answers on an Intel and and AMD. That said, I think your best bet is to import log2 and log10 from C and use those.
Haskell sadly lacks an efficient way to go from a Double to its bit pattern. :(
You can do nasty casting using STArray: http://slavepianos.org/rd/sw/sw-78/Sound/OpenSoundControl/Cast.hs