floating-point number - hardware or lisp dependent?



Yes, Guy Steele was very interested in this problem, but we should also
give credit to Jon L White.  See their joint paper "Retrospective: How to
Print Floating-Point Numbers Accurately" (2004),
(pdf<http://grouper.ieee.org/groups/754/email/pdfq3pavhBfih.pdf>;)
which discusses the origins of the work (in 1971) and has a good
bibliography.

There's also Will Clinger's "Retrospective: How to Read Floating Point
Numbers Accurately" (2004)
(pdf<http://www.cesura17.net/~will/Professional/Research/Papers/retrospective.pdf>;
).

Both are discussions of papers that the authors had written some years
earlier.

               -s


On Thu, Apr 4, 2013 at 8:05 PM, Henry Baker <hbaker1 at pipeline.com> wrote:

> Guy Steele of the Common Lisp standardization committee went to a lot of
> trouble to try to assure users of Common Lisp that
>
> (read (print x)) == x, (that read was a left inverse of print).
>
> i.e., that _all numbers_, including *** floating point numbers ***, would
> be *** bit-for-bit identical *** after reading the printed value (assuming
> that you didn't force Lisp to use fewer than its preferred number of
> digits).
>
> I can't point you to the particular paragraph in the CL standard, but I
> don't think that a Common Lisp is conforming if it can't achive this goal.
>
> As a result, I would imagine that some (many?) Common Lisps may be better
> at floating point input/output than Maxima is.
>
> At 12:59 PM 4/4/2013, Stavros Macrakis wrote:
> >My guess is that the numbers are reading correctly, but not being
> correctly rounded when printed.  Even the same Lisp might be using
> different numerical libraries on different platforms.
>
>
>
>