Fix float division problem, and -1/0 problem.