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 noam
Recipients christian.heimes, gvanrossum, nascheme, noam, rhettinger, tim.peters
Date 2007-12-18.09:34:42
SpamBayes Score 0.518283
Marked as misclassified No
Message-id <b348a0850712180134i29919315t3c2ad7a20baabe05@mail.gmail.com>
In-reply-to <1197968759.06.0.779430800266.issue1580@psf.upfronthosting.co.za>
Content
2007/12/18, Raymond Hettinger <report@bugs.python.org>:
> 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.

Currently, repr(1.3) == '1.3', suggesting that it is exactly
represented, which isn't true. I think that unless you use an
algorithm that will truncate zeros only if the decimal representation
is exact, the suggested algorithm is less confusing than the current
one, in that it doesn't suggest that 1.3 is exactly stored and 1.1
isn't.
History
Date User Action Args
2007-12-18 09:34:42noamsetspambayes_score: 0.518283 -> 0.518283
recipients: + noam, gvanrossum, tim.peters, nascheme, rhettinger, christian.heimes
2007-12-18 09:34:42noamlinkissue1580 messages
2007-12-18 09:34:42noamcreate