9 Nov
2003
9 Nov
'03
12:11 a.m.
W liĆcie z sob, 08-11-2003, godz. 22:41, Ben Escoto pisze:
If I want to convert a Float to a Double, should I use
fromRational . toRational
realToFrac :: (Fractional b, Real a) => a -> b It is actually defined as fromRational . toRational but GHC knows to generate specialized code for particular types.
And similarly, (fromInteger . toInteger) is the right way to convert the integral types?
fromIntegral :: (Num b, Integral a) => a -> b -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/