[issue41269] Wrong subtraction calculations

2020-07-10 Thread Mark Dickinson


Mark Dickinson  added the comment:

Thanks for the report. This isn't a Python bug, but a common issue when working 
with floating-point numbers.

I recommend taking a look at this section of the tutorial for more information: 
https://docs.python.org/3.8/tutorial/floatingpoint.html

--
nosy: +mark.dickinson
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41269] Wrong subtraction calculations

2020-07-10 Thread Ivan


New submission from Ivan :

I've started to learn python and tried command:
print(-2.989 + 2)
it gives me result of -0.9889
same error can be observed with numbers from 4 and below like:
print(-2.989 + 4)
1.0111

print(-2.989 + 3)
0.01112

print(-2.989 + 1)
-1.9889

Numbers above 4 seam to work fine

--
components: Windows
files: python error.jpg
messages: 373465
nosy: Svabo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Wrong subtraction calculations
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49313/python error.jpg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com