In NumExts, there's floatToDouble and doubleToFloat. On Sat, 8 Nov 2003, Ben Escoto wrote:
> Quick and probably stupid question: > > If I want to convert a Float to a Double, should I use > > fromRational . toRational > > ? It seems to work, but isn't this a bit weird? It took a while for > me to figure this out. I suppose they are rationals because of the > finite precision of Floats and Doubles? And similarly, (fromInteger > . toInteger) is the right way to convert the integral types? > > Why not just have a function like: > > convertIntegral :: (Integral a, Integral b) => a -> b > > > -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
