Observe the following python program
def goo(y,x): y = float(y) x = float(x) yup = (y - x - 1) / x yup = str(yup) yup = yup.split(\".\")
The default for the print statement is to round the value to the nearest. int() truncates.
print
int()
>>> print 2.99999999999999 3.0 >>> print int(2.99999999999999) 2
If you want to see a more exact representation, use repr.
repr
>>> print repr(2.9999999999999) 2.9999999999999