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 mdealencar
Recipients mdealencar
Date 2014-02-03.14:28:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za>
In-reply-to
Content
The following code demonstrates an inconsistency of this method in dealing with zeros after the decimal mark.


from decimal import Context

context = Context(prec=2)

for x in [100., 10., 1., 0.1]:
    print(context.create_decimal_from_float(x), context.create_decimal_from_float(4.56*x))


Produces the output:
1.0E+2 4.6E+2
10 46
1 4.6
0.10 0.46

Line 3 is inconsistent. It should be "1.0 4.6".
History
Date User Action Args
2014-02-03 14:28:52mdealencarsetrecipients: + mdealencar
2014-02-03 14:28:52mdealencarsetmessageid: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za>
2014-02-03 14:28:52mdealencarlinkissue20502 messages
2014-02-03 14:28:52mdealencarcreate