8 Nov
2003
8 Nov
'03
9:41 p.m.
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 -- Ben Escoto