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 pitrou
Recipients belopolsky, pitrou, rhettinger
Date 2008-05-30.18:27:46
SpamBayes Score 0.1292111
Marked as misclassified No
Message-id <1212172068.31.0.92307380949.issue3008@psf.upfronthosting.co.za>
In-reply-to
Content
> I read the proposal as
> producing the true mathematical radix 2 representation of a float
> rather than its 64-bit memory layout.

The term "layout" was probably badly chosen.
Still, the explicit motivation for producing that representation is that
it it supposed to educate people about the actual implementation of
floats. Other than that, a radix 2 representation is quite an obscure
(and almost never used) way of representing float objects. Binary
representation of integers in comparison is more widely understood and
more frequently used, which -- I suppose -- justifies the existence of a
builtin function to obtain it.

> I fail to see how the proposed bin(..) can produce '0b11.00100..' from
> a float that compares equal to 3.

Oops, you are right. bin(3.0) would produce '0b11.', which is indeed
more readable.
History
Date User Action Args
2008-05-30 18:27:48pitrousetspambayes_score: 0.129211 -> 0.1292111
recipients: + pitrou, rhettinger, belopolsky
2008-05-30 18:27:48pitrousetspambayes_score: 0.129211 -> 0.129211
messageid: <1212172068.31.0.92307380949.issue3008@psf.upfronthosting.co.za>
2008-05-30 18:27:47pitroulinkissue3008 messages
2008-05-30 18:27:46pitroucreate