float to bfloat



I prefer that the float to bigfloat conversion would 

(i)  not depend on the setting of any global variable  other than fpprec 
(not on ratepsilon, or ....),
(ii) always evaluate to the nearest bigfloat (unless it is a NaN or other 
such exception),
(iii) be coded by extracting the various parts of a float and pasting them 
into a big float.
 
Yes, some users might not understand why  bfloat(float(8 / 9)) evaluates 
to 

      8.88888888888888839545643349993042647838592529296875b-1

while bfloat(8/9) evaluates to

     8.88888888888888888888888888888888888888888888888888b-1

But many things about floating point numbers mystify users; and (ii) 
should be clear to any user that 
understands something about floating-point numbers.  I prefer (iii) over 
other schemes, because
it seems that it should be faster than other methods (float --> rational 
--> bfloat) and (assuming 
IEEE floats) more reliable.

Barton






Richard Fateman <fateman@cs.berkeley.edu>
Sent by: maxima-admin@math.utexas.edu
01/22/2004 10:35 AM

 
        To:     maxima@mail.ma.utexas.edu
        cc: 
        Subject:        Re: [Maxima] float to bfloat



The first of these requires a lot less explanation to most people.
In either case a careful explanation should be available so the
behavior is not viewed as a bug.


RJF


_______________________________________________
Maxima mailing list
Maxima@www.math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima