2007/12/31, L.Guo <[EMAIL PROTECTED]>:
> 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ï
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to