floating point rounding errors

Handy if you’re using python to lookup a value and it returns a rounding error.
example:
mychop[0] = 0.99999999999432
we want it to be the nearest integer, and the value could be negative

def rounder(num):
	if num < 0:
		return math.floor(num)
	else:
		return math.ceil(num)

docs.python.org/3.3/library/fun … html#round does this not do what you want?

Round ‘should’ work but I found in some cases it wasn’t.