floor() function definition
Grant Edwards
grante at visi.com
Wed May 16 23:28:41 EDT 2001
On Wed, 16 May 2001 22:54:41 GMT, Dev_NuLL <dev_null at email.com> wrote:
>>Try it and see!
>
>Seems to strip everythin off the right of the decimal point in a
>positive number.
>
>After looking at the negative numbers it gives the closet integer less
>than x.
That's it exactly.
To be honest, the "try it and see" approach doesn't work very
well for most library functions. floor() just happens to be
one of the ones where a handful of test cases provide a pattern
apparent enough to figure out what it does.
--
Grant Edwards grante Yow! YOW!! The land of the
at rising SONY!!
visi.com
More information about the Python-list
mailing list