[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

number syntax

>     [Bartley:]
>     Is it permissible for an exact 3.5 to print (by default) as 7/2 or an
>     inexact 2 to print as 2.0?
> [Jinx:]
> It depends on the format specification.  For the explicit ones, there
> should be no question.  I think, however, that if the format is (HEUR)
> it should print as #i2  .

I agree that an inexact integer 2 >should< print as #i2, but is it
permissible to print it as 2.0?

Likewise, is it permissible for the reader to read 2.0 as an inexact
integer 2?  May it read #e3.5 as the rational number 7/2 rather than
an "exact" float (whatever that may be)?  What I'm leading to is that
any discussion about how to represent numbers that are read in without
benefit of an explicit exactness indicator will have to deal with the
issue of alternative ways to represent exactness.

BTW--How do those that believe in keeping exactness orthogonal to numeric
subtype plan to deal with "exact" reals that are not rational?