simplify using ifloor intrinsic

Slight speed improvement with clearer code.