float to bfloat



Barton reports that bfloat(float(8/9)) == bfloat(8/9), which is not the
closest bfloat to float(8/9).

Raymond explains that floattofp rationalizes the float first, and adds
"I agree that there should be fuzz digits, but it is rather nice to see
the bigfloat looks like an obvious extension."

bfloat should not be in the business of guessing -- it should represent
the precise float in question.

I suspect that float.lisp is using floattofp uses fixfloat out of
expediency -- a machine-independent way of putting a float in rational
form before integer-decode-float was widely available and reliable.

By the way, there are some bugs in older versions of fixfloat (my
588346, 789053) but apparently they have been fixed.

Willis, Ray -- didn't we discuss all this over a year ago?  I think the
only reason we didn't convert to integer-decode-float at that time was
that it was buggy in GCL.  In GCL 2.5.0, (integer-decode-float 1.0)
crashes (my GCL Support Request #101688 of Jan 2003) -- this is reported
fixed now.

         -s