loop3 :: Int -> Int -> Int
loop3 l u
   | len < 100       = len
   | otherwise       = let a = loop3 l mid
                           b = loop3 mid u
                       in a + b
  where len = u - l
        mid = (u + l) `shiftRI` 1
loop3 :: Int -> Int -> Int
loop3 l u
   | len < 100       = len
   | otherwise       = let a = loop3 l mid
                           b = loop3 mid u
                       in a + b
  where len = u - l
        mid = (u + l) `shiftRI` 1
loop3 l u
   | len < 100       = len
   | otherwise       = let a = loop3 l mid
                           b = loop3 mid u
                       in a + b
  where len = u - l
        mid = (u + l) `shiftRI` 1