
31 Dec
2007
31 Dec
'07
12:47 p.m.
2007/12/31, L.Guo
Hi MailList Haskell-Cafe:
I am a new haskeller. And was farmilar with C.
When tring to do some calculate, like this:
input = 5 :: Int factor = 1.20 :: Float output = factor ** (toFloat input)
I found that I do not know any function could do just what 'toFloat' should do.
What should I do then ?
'fromIntegral' do 'toFloat' and others convertions. But in your case, using (^) instead of (**) would probably be the good choice. -- Jedaï