On Mon, Sep 20, 2010 at 03:22, Daniel Fischer <daniel.is.fisc...@web.de> wrote: > unsafeCoerce is not supposed to work for casts between Integral and > Floating types. If you try to unsafeCoerce# between unboxed types, say > Double# and Word64#, you're likely to get a compile failure (ghc panic). > If you unsafeCoerce between the boxed types, it will probably work, but > there are no guarantees. > > There's a feature request for unboxed coercion (i.e. reinterpretation of > the bit-pattern): > > http://hackage.haskell.org/trac/ghc/ticket/4092
Interesting -- in that bug report, Simon Mar says that converting the value using pointers will work correctly. I've changed d-b-ieee754 over to use this method (v 0.4.2); the tests are still passing, so I'll call it success. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe