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.

Author umedoblock
Recipients umedoblock, zach.ware
Date 2015-08-08.05:38:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1439012321.54.0.470801950622.issue24827@psf.upfronthosting.co.za>
In-reply-to
Content
I don't agree with "not a bug".

>>> s1, v1, ndigits1 = "1.65", 1.65, 1
>>> s2, v2, ndigits2 = "2.675", 2.675, 2

>>> decimal.Decimal(v1)
Decimal('1.649999999999999911182158029987476766109466552734375')
>>> round(v1, ndigits1)
1.6
>>> round(decimal.Decimal(s1), ndigits1)
Decimal('1.6') # EQUAL expression round(v1, ndigits1)

>>> decimal.Decimal(v2)
Decimal('2.67499999999999982236431605997495353221893310546875')
>>> round(v2, ndigits2)
2.67
>>> round(decimal.Decimal(s2), ndigits2)
Decimal('2.68') # DIFFERENT expression round(v2, ndigits2)

decimal module should give me different expression about below.
round(decimal.Decimal(s1), ndigits1) and round(v1, ndigits1).

BECAUSE

round(decimal.Decimal(s2), ndigits2) and round(v2, ndigits2)
give me DIFFERENT expression.
History
Date User Action Args
2015-08-08 05:38:41umedoblocksetrecipients: + umedoblock, zach.ware
2015-08-08 05:38:41umedoblocksetmessageid: <1439012321.54.0.470801950622.issue24827@psf.upfronthosting.co.za>
2015-08-08 05:38:41umedoblocklinkissue24827 messages
2015-08-08 05:38:40umedoblockcreate