-- fib n = (power fn n - power fn (-n)) / sqrt(5)
--   where fn = (1+sqrt(5)) / 2

power :: (Integral a, Floating b) => a -> b
power x y | y>0 = x * power x (y-1)
          | y<0 = 1 / power x (y+1)
          | otherwise = 1
power :: (Integral a, Floating b) => a -> b
power x y | y>0 = x * power x (y-1)
          | y<0 = 1 / power x (y+1)
          | otherwise = 1
power x y | y>0 = x * power x (y-1)
          | y<0 = 1 / power x (y+1)
          | otherwise = 1