Python rounding problem

Posted by pocoa on Stack Overflow See other posts from Stack Overflow or by pocoa
Published on 2010-05-21T08:28:57Z Indexed on 2010/05/21 8:50 UTC
Read the original article Hit count: 311

Filed under:
|
|
|
>>> num = 4.123456
>>> round(num, 3) # expecting 4.123
4.1230000000000002

I'm expecting 4.123 as a result, Am I wrong?

© Stack Overflow or respective owner

Related posts about python

Related posts about math