import Control.Arrow
import Control.Monad
import Data.List
import qualified Data.ByteString.Char8 as B
import Debug.Trace

main :: IO ()
main = readLine >>= print . solve

solve :: [Int] -> Double
solve [n, k] = sum $ map calc [1..n]
    where
        calc x
            | x < k = 1 / c 
            | otherwise = 1 / fromIntegral n
            where
                c = (* (fromIntegral n)) . (2 ^) . fromIntegral . ceiling . logBase 2 $ fromIntegral k / fromIntegral x

readLine :: IO [Int]
readLine = unfoldr (fmap (second (maybe B.empty snd . B.uncons)) . B.readInt) <$> B.getLine

readContents :: Int -> IO [[Int]]
readContents = flip replicateM readLine