Help me please : Rounding-down numbers
tim_one at email.msn.com
Thu Mar 27 04:21:38 CET 2003
> I have a floating number which I need to "round-down" to the nearest
> whole number. I am doing this by type-casting it as an "int". Would
> this work all the time ? Or is there any instances when this will
> "round-up" ?
The question is clear enough. What I'm unclear about is what you found
unclear in the docs for the int() function:
and in particular what about
Conversion of floating point numbers to integers truncates
did you read as leaving the question open?
More information about the Python-list