#include<bits/stdc++.h>

    ///--------------------------------------------------------------------------------
    #define     T()                 ll t;    cin>>t;        while(t--)
    #define        ll                  long long
    #define        vi                     vector<ll>
    #define     pii                 pair<ll,ll>
    #define     vpair                 vector< pii >
    #define     fast                 ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    #define     repp(i,a,n)         for(ll i= a ; i < n ; ++i)
    #define     rep(i,n)            for(ll i= 0 ; i < n ; ++i)
    #define     p_b                     push_back
    #define     p_f                 push_front
    #define     pop_b                 pop_back()
    #define     pop_f                 pop_front()
    #define     m_p                 make_pair
    #define      sumv(v)              accumulate(v.begin(),v.endd(),0);
    #define     sortv(v)             sort(v.begin(),v.endd())
    #define     sort_dec(v)         sort(v.begin(),v.endd(),greater<ll>() )
    #define     l_b(v,l)               lower_bound (v.begin(), v.endd(), l)
    #define     u_b(v,l)               upper_bound (v.begin(), v.endd(), l)
    #define     pq                     priority_queue
    #define     ff                     first
    #define     ss                     second
    #define     len                 length()
    #define     all(v)              v.begin(),v.endd()
    #define     mset(a,b)           memset(a,b,sizeof(a));

    ///==========INPUT=============///
    #define     sc(a)           cin>>a;
    #define     sc2(a,b)        cin>>a>>b;
    #define     sc3(a,b,c)      cin>>a>>b>>c;
    #define     sc4(a,b,c,d)    cin>>a>>b>>c>>d;
    ///==========PRINTING=============///
    #define     prarr(arr)      rep(i,sizeof(arr)/sizeof(ll)) cout<<arr[i]<<" "; nl
    #define     prvec(v)        rep(i,v.size()) cout<<v[i]<<" "; nl
    #define     pr(x)           cout<<x<<"\n";
    #define     pr2(x, y)       cout<<x<<" "<<y<<"\n";
    #define     pr3(x, y, z)    cout<<x<<" "<<y<<" "<<z<<"\n";

    ///==========DEBUGGING=============///
    #define     debug(a)             cout<<"*"<<a<<enddl;
    #define     debug2(a,b)         cout<<"$"<<a<<" "<<b<<enddl;
    #define     debug3(a,b,c)         cout<<"$"<<a<<" "<<b<<" "<<c<<enddl;
    #define     bug                 cout<<"#"<<enddl;
    #define     nl                     cout<<'\n';
    #define     enddl                '\n'

    ///==========CONSTANTS=============///
    #define     max6     1000005
    #define     max5     100004
    #define     max4     10003
    #define     mod       1000000007
    #define     inf      1e9
    ll powermod(ll _a,ll _b,ll _m)    {ll _r=1;while(_b){if(_b%2==1)_r=(_r*_a)%_m;_b/=2;_a=(_a*_a)%_m;}return _r;}

    using namespace std;

    int main()
    {
        fast
        double n,k;
        sc2(n,k)
        double ans=0;
        for(ll i=1;i<=n;i++)
        {
            double d=1/n;
            ll a=i;
            while(a<k)
            {
                a=a*2;
                d*=0.5;
            }
            ans+=d;
            
        }
        cout<<fixed<<setprecision(10);
        cout<<ans;
    }


Measured memory_bytes: 256