Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

35.5 - 29.58 = 5.920000000000002 (it's false !) #72472

Closed
Hogren mannequin opened this issue Sep 27, 2016 · 2 comments
Closed

35.5 - 29.58 = 5.920000000000002 (it's false !) #72472

Hogren mannequin opened this issue Sep 27, 2016 · 2 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@Hogren
Copy link
Mannequin

Hogren mannequin commented Sep 27, 2016

BPO 28285
Nosy @serhiy-storchaka

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 = None
closed_at = <Date 2016-09-27.10:18:42.008>
created_at = <Date 2016-09-27.10:13:55.009>
labels = ['type-bug', 'invalid']
title = "35.5 - 29.58 = 5.920000000000002 (it's false !)"
updated_at = <Date 2016-09-27.10:18:42.006>
user = 'https://bugs.python.org/Hogren'

bugs.python.org fields:

activity = <Date 2016-09-27.10:18:42.006>
actor = 'serhiy.storchaka'
assignee = 'none'
closed = True
closed_date = <Date 2016-09-27.10:18:42.008>
closer = 'serhiy.storchaka'
components = []
creation = <Date 2016-09-27.10:13:55.009>
creator = 'Hogren'
dependencies = []
files = []
hgrepos = []
issue_num = 28285
keywords = []
message_count = 2.0
messages = ['277511', '277512']
nosy_count = 2.0
nosy_names = ['serhiy.storchaka', 'Hogren']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue28285'
versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

@Hogren
Copy link
Mannequin Author

Hogren mannequin commented Sep 27, 2016

I was using python as calculator when I enter :
35.5 - 29.58

I am surprising when python give me a result with many decimals:
5.920000000000002

I tried to change one number :
35.5 - 29.57
The result is correct : 5.93

The error is present again when I tried to inverse numbers (29.57-35.5).

The error is again present when I tried to use 35.50 in place of 35.5.

I tested on python 2.7 and 3.4, compiled with gcc 4.9.3, on Gentoo.

Thanks for all who contribute to this good project which is Python !

Hogren

@Hogren Hogren mannequin added the type-bug An unexpected behavior, bug, or error label Sep 27, 2016
@serhiy-storchaka
Copy link
Member

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant