Re: newb: Python Floating Point

2007-03-15 Thread Dan Bishop
On Mar 15, 6:09 pm, "johnny" <[EMAIL PROTECTED]> wrote: > When I do the following, rounding to 2 decimal places doesn't seem to > work. I should get 0.99 : In binary, 0.99 is the recurring fraction 0.11 010111101000 010111101000 010111101000 Thus, it can't be exactly

Re: newb: Python Floating Point

2007-03-15 Thread Robert Kern
johnny wrote: > When I do the following, rounding to 2 decimal places doesn't seem to > work. I should get 0.99 : > a =0.99 a > 0.98999 round(a,2) > 0.98999 http://docs.python.org/tut/node16.html -- Robert Kern "I have come to believe that the whole worl