fixed bad math for calc floor, and now removed superfluous zerodiv exception