You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2022-03-30.11:04:59.302>created_at=<Date2022-03-30.10:45:33.440>labels= ['3.7', 'invalid', 'type-bug', 'library']
title='round function is not working as expected'updated_at=<Date2022-03-30.11:04:59.300>user='https://bugs.python.org/vishalatul09'
round function is not working as expected .
my number is x= 0.967565*185000= 178999.525
round(x,2)
answer is coming as 178999.52
expected value is 178999.53
The behavior of round() for floats can be surprising: for example, round(2.675, 2) gives 2.67 instead of the expected 2.68. This is not a bug: it’s a result of the fact that most decimal fractions can’t be represented exactly as a float. See Floating Point Arithmetic: Issues and Limitations for more information.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: