William D Clinger wrote:
> In either case, I think flonums should be in the base
> language, because most hardware now supports them much
> more efficiently than they could be implemented in a
> library module.
Hmm. Looking around my office, I see a router, a network-attached
storage device, and a cell phone that all have ARM CPUs without FPUs.
Taking this further, I can imagine someone wanting to implement a system
that has bignums and is optimized for executable size (or simplicity)
rather then execution speed. Perhaps I just have an over-active
imagination. They might make the decision to force all integers to be
bignums, which eliminates type dispatch for integers and thereby reduces
the size of the executable. So, why force fixnums into the language?
From the point of view of the user, they are merely a detail of most
implementations.
> There is certainly room for different
> opinions about this, of course. One purpose of SRFI-77
> was to gain a sense of the community's opinion on this
> and other issues.
Yes, and I am very grateful for the opportunity to comment.
> No. Consider fx+, which as defined in SRFI-77 performs
> addition modulo hi-lo+1.
Okay. However, I do not find the semantics of fx+ to be especially
compelling. It depends on an accident of the hardware (the number of
bits in a fixnum) rather than some more general property of numbers. It
may well be useful to the implementor of the library, but since the
implementor of the library is likely to be the implementor of the whole
system, if they need it they can define it.
Regards,
Alan
--
Dr Alan Watson
Centro de Radioastronomía y Astrofísica
Universidad Astronómico Nacional de México