unittest
{
	assert( [ "3 10" ].parse.expand.solve == "0.145833333" );
	assert( [ "100000 5" ].parse.expand.solve == "0.999973750" );
}



import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto nk = input.front.split.to!( long[] );
	return tuple( nk[ 0 ], nk[ 1 ] );
}

auto solve( long n, long k )
{
	real ans = 0F;
	foreach( i; 1L .. n + 1 )
	{
		real r = 1F;
		for( auto s = i; s < k; s *= 2 ) r /= 2;
		ans += r / n;
	}
	return format( "%0.9f", ans );
}
