[BitTorrent] bencode float support

Lieven Marchand mal at wyrd.be
Tue Aug 10 16:48:05 EDT 2004


John Hoffman <theshadow at shambala.net> writes:

> float support will never be added to the official bencode specification, 
> because an important property of bencode is:
> bencode(bdecode(x)) == x

This is referred to in the lisp world as read/write consistency.

> This is impossible to do consistently with true floating-point values.

In Common Lisp/Scheme, it has been done 20 years ago. See for instance

Burger, Robert G. and Dybvig, R. Kent
Printing Floating-Point Numbers Quickly and Accurately

Steele, Jr, Guy L. and White, Jon L.
How to print floating-point numbers accurately

Clinger, William D.
How to read floating point numbers accurately

-- 
An amateur practices until he gets it right,
A professional practices until she can't get it wrong.



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/BitTorrent/

<*> To unsubscribe from this group, send an email to:
    BitTorrent-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



More information about the BitTorrent mailing list