embarassingly slow ceil/floor implementations