This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: difference in comparison behavior between 32 bit and 64 bit releases
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Lane.Stevens, ezio.melotti, mark.dickinson
Priority: normal Keywords:

Created on 2011-04-08 00:17 by Lane.Stevens, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg133279 - (view) Author: Lane Stevens (Lane.Stevens) Date: 2011-04-08 00:17
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.
msg133281 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-04-08 00:23
I think that's "normal", the 2.7 doc[0] 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.

[0]: http://docs.python.org/library/decimal.html#decimal.Decimal
History
Date User Action Args
2022-04-11 14:57:15adminsetgithub: 56010
2011-04-08 00:23:00ezio.melottisetstatus: open -> closed

nosy: + mark.dickinson, ezio.melotti
messages: + msg133281

resolution: not a bug
stage: resolved
2011-04-08 00:17:23Lane.Stevenscreate