You just have a few problems.  Where should be lowercase.  The single quotes should be backticks "`".  You may have some indentation issues.  And lastly, you have some problems with e and f

   e = round (log $ fromIntegral n)
   f = round (log 2)

Otherwise it seems fine.


On Sun, Dec 1, 2013 at 2:22 AM, willie ekaputra <willieekaputra@gmail.com> wrote:

Hi everyone !
I am newbie and I made this code for counting k, so that 2^k divisor of n.Somehow it doesn't work.
Anyone knows what is  wrong?

Regards and thanks.
Wili.

maxexp2:: Int -> Int
maxexp2 n
    |n== 0 || 2^k 'mod' n /=0 =0
    |otherwise = k
          Where
           k= e ' div' f
           e=round (fromIntegral (log n))
            f = round (fromIntegral (log 2))


_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners