[Haskell-cafe] How to convert number types.

L.Guo leaveye.guo at gmail.com
Mon Dec 31 12:37:39 EST 2007

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 ?


More information about the Haskell-Cafe mailing list