Hi,
Python's math module contain handy functions like floor & ceil. These functions take a floating point number and return the nearest integer bellow or above it. However these functions return the answer as a floating point number. For example:
In [1]: import math
In [2]: f=math.floor(2.3)
In [3]: f
Out[3]: 2.0
What is the safest way to get an integer out of this float, without running the risk of rounding errors (for example if the float is the equivalent of 1.99999... )? or perhaps I should use another function altogether?
Thanks, Boaz