lib: implement divRound()