Post Reply 
Python round() broken
04-17-2021, 11:10 PM
Post: #3
RE: Python round() broken
(04-17-2021 08:48 PM)toml_12953 Wrote:  
(04-17-2021 07:08 PM)Guenter Schink Wrote:  Is it just my G2 to show this error in Python?

round(3/7,6) ==> 0.24285709999999999 (if I counted the 9s correctly)
should be 0.2428571

Wow! Your calculator is really off! I get

0.4285709999999999

Smile

grrr.. typo - first digit "2" shouldn't be there. But what would you expect with rounding to 6 digits? The result should be 0.428571

Günter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Python round() broken - Guenter Schink - 04-17-2021, 07:08 PM
RE: Python round() broken - toml_12953 - 04-17-2021, 08:48 PM
RE: Python round() broken - Guenter Schink - 04-17-2021 11:10 PM
RE: Python round() broken - toml_12953 - 04-18-2021, 12:32 AM



User(s) browsing this thread: 1 Guest(s)