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

difference in comparison behavior between 32 bit and 64 bit releases #56010

Closed
LaneStevens mannequin opened this issue Apr 8, 2011 · 2 comments
Closed

difference in comparison behavior between 32 bit and 64 bit releases #56010

LaneStevens mannequin opened this issue Apr 8, 2011 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@LaneStevens
Copy link
Mannequin

LaneStevens mannequin commented Apr 8, 2011

BPO 11801
Nosy @mdickinson, @ezio-melotti

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 2011-04-08.00:23:00.575>
created_at = <Date 2011-04-08.00:17:23.359>
labels = ['interpreter-core', 'type-bug', 'invalid']
title = 'difference in comparison behavior between 32 bit and 64 bit releases'
updated_at = <Date 2011-04-08.00:23:00.529>
user = 'https://bugs.python.org/LaneStevens'

bugs.python.org fields:

activity = <Date 2011-04-08.00:23:00.529>
actor = 'ezio.melotti'
assignee = 'none'
closed = True
closed_date = <Date 2011-04-08.00:23:00.575>
closer = 'ezio.melotti'
components = ['Interpreter Core']
creation = <Date 2011-04-08.00:17:23.359>
creator = 'Lane.Stevens'
dependencies = []
files = []
hgrepos = []
issue_num = 11801
keywords = []
message_count = 2.0
messages = ['133279', '133281']
nosy_count = 3.0
nosy_names = ['mark.dickinson', 'ezio.melotti', 'Lane.Stevens']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue11801'
versions = ['Python 2.6']

@LaneStevens
Copy link
Mannequin Author

LaneStevens mannequin commented Apr 8, 2011

I have two systems running

python-2.6.4-27.fc13.x86_64
and
python-2.6.4-27.fc13.i686

respectively. Given the following statement the 64-bit version returns False and the 32-bit version returns True.

Decimal('1.0') > 0.0

Decimal('1.0') > 0 returns True on both systems.

@LaneStevens LaneStevens mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Apr 8, 2011
@ezio-melotti
Copy link
Member

I think that's "normal", the 2.7 doc0 says:
"""
Changed in version 2.7: A comparison between a float instance x and a Decimal instance y now returns a result based on the values of x and y. In earlier versions x < y returned the same (arbitrary) result for any Decimal instance x and any float instance y.
"""

This means that in Python 2.6 a comparison between Decimal and float is a meaningless operation that might return arbitrary values.

@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
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant