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

Re: arithmetic issues

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.




On Fri, 21 Oct 2005, John.Cowan wrote:

>Aubrey Jaffer scripsit:
>
>> I recommend 12.bits minimum precision for both fixnums and flonums.
>
> I think that's way too small, particularly if we are going to explicitly
> adopt CL's link between fixnums and {string,vector} indices.

Agreed.  R5RS requires an implementation to support "exact integers"
through the range that can be used as vector indices, which IMO is
the right thing.  To state that the implementation is not allowed
to have arrays accessed by non-fixnums is a needless limitation,
especially if the fixnum range is chosen very small.  12 bits, minus
one for negative numbers, would mean *all* vectors restricted to less
than 1023 elements, and that's uncomfortably small.

As for strings, pfah.  If you work in corpus linguistics it's not
too uncommon to have literally millions of characters in a string.
I'd really hate to see strings limited to 1023 characters.

>> Being error objects, syntax for NaNs should be unspecified.

>I don't see how that follows.

He means that NaNs should arise from error operations, not from
the normal functioning of the reader.  If (read) returns an error
object, it should mean that (read) encountered an error.

I see the point, although I'm not quite sure I agree with it entirely.
At the very least you have to be able to tell the difference between
a live, immediate error, and what you get back from an accessor after
storing an error object in whatever structure it accesses.  Accessors
include READ.  Storing includes WRITE.

				Bear