
2 Feb
2008
2 Feb
'08
1:30 a.m.
I have a list. Each component is a list with 2 whole numbers. I want to multiply the second number by the log of the first eg tail ([519432,525806]) * log (head [519432,525806]). I get the ffg error message: No instance for (Floating [t]) arising from a use of `log' at <interactive>:1:25-50 Possible fix: add an instance declaration for (Floating [t]) In the second argument of `(*)', namely `log (head [519432, 525806])' In the expression: tail ([519432, 525806]) * log (head [519432, 525806]) In the definition of `it': it = tail ([519432, 525806]) * log (head [519432, 525806]) I've tried the only type signature I know "fromIntegral" but it does not help. How to fix? Thanks Logesh