KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Five easy pieces #2: getting around Re: Five easy pieces #2: getting around

  • calummack

    Member
    September 3, 2022 at 12:00 am
    up:{[x;nd]string%[;s]ceiling x*s:10 xexp nd}; 
    dn:{[x;nd]string%[;s]floor x*s:10 xexp nd}; 
    rnd:{[x;nd;m] d:`up`dn`nr!(up[;nd];dn[;nd];.Q.f[nd;]); (d m) each x};

    Seems to work.