Issue 34703: Unexpected Arithmetic Result (original) (raw)

Issue34703

Created on 2018-09-16 11:05 by chengxuncc, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg325478 - (view) Author: chengxuncc (chengxuncc) Date: 2018-09-16 11:05
>>> 2359296/10/1000**2 0.23592960000000002 >>> 2359296/10000000 0.2359296 You can see it.
msg325479 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2018-09-16 11:14
This isn't a bug; it's a result of Python using the hardware-provided binary floating-point, which can't represent all decimal numbers exactly. Please take a look at https://docs.python.org/3/tutorial/floatingpoint.html for more information.
History
Date User Action Args
2022-04-11 14:59:06 admin set github: 78884
2018-09-16 11:14:11 mark.dickinson set status: open -> closednosy: + mark.dickinsonmessages: + resolution: not a bugstage: resolved
2018-09-16 11:05:14 chengxuncc create