Purge rint() and use llrint and friends.