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 pushpendre rastogi
Recipients pushpendre rastogi
Date 2015-03-10.14:26:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425997586.58.0.418147847293.issue23627@psf.upfronthosting.co.za>
In-reply-to
Content
Hi, The string formatting module in python 2.7 incorrectly formats floating point values. The following code shows the problem

>>> print "%.10s"%(-7.7176718e-05)
-7.7176718
>> print "%.10s"%(-0.0000771767)
-7.71767e-

Ideally the code should have thrown an exception (first preference)
or it should have printed  -0.0000771767 (second preference) or -7.7176718e-05 (third preference)
History
Date User Action Args
2015-03-10 14:26:26pushpendre rastogisetrecipients: + pushpendre rastogi
2015-03-10 14:26:26pushpendre rastogisetmessageid: <1425997586.58.0.418147847293.issue23627@psf.upfronthosting.co.za>
2015-03-10 14:26:26pushpendre rastogilinkissue23627 messages
2015-03-10 14:26:26pushpendre rastogicreate