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 rhettinger
Recipients christian.heimes, gvanrossum, nascheme, noam, rhettinger, tim.peters
Date 2007-12-18.09:05:58
SpamBayes Score 0.47815263
Marked as misclassified No
Message-id <1197968759.06.0.779430800266.issue1580@psf.upfronthosting.co.za>
In-reply-to
Content
ISTM shorter repr's are inherently misleading and will make it more 
harder to diagnose why 1.1 * 3 != 3.3 or why round(1.0 % 0.1, 1) == 0.1 
which is *very* far-off of what you might expect. 

The 17 digit representation is useful in that it suggests where the 
problem lies.  In contrast, showing two numbers with reprs of different 
lengths will strongly suggest that the shorter one is exactly 
represented.  Currently, that is a useful suggestion, 10.25 shows as 
10.25 while 10.21 shows as 10.210000000000001 (indicating that the 
latter is not exactly represented).  If you start showing 1.1 as 1.1, 
then you've lost both benefits.

FWIW, I prefer the current 17 digit behavior, its speed, its cross-754 
round-trip guarantees, and it psychological cues about exactness.
History
Date User Action Args
2007-12-18 09:05:59rhettingersetspambayes_score: 0.478153 -> 0.47815263
recipients: + rhettinger, gvanrossum, tim.peters, nascheme, christian.heimes, noam
2007-12-18 09:05:59rhettingersetspambayes_score: 0.478153 -> 0.478153
messageid: <1197968759.06.0.779430800266.issue1580@psf.upfronthosting.co.za>
2007-12-18 09:05:59rhettingerlinkissue1580 messages
2007-12-18 09:05:58rhettingercreate