[r6rs-discuss] R5.95 questions

From: R. Kent Dybvig <dyb>
Date: Wed, 27 Jun 2007 00:05:07 -0400

> > > The wisdom of this move is also open to question.
> > > Inasmuch as the second argument is inexact, its
> > > integer object-ness is likely to be accidental.
> >
> > This is precisely why I have always believed that integer? should return
> > false for all inexact values.
>
> So this is your revenge?

Not at all. We're just removing a restriction on flexpt that makes sense
only if flonums can't be integers. By removing the restriction, we gain
some useful generality, for now we can write, e.g., (flexpt x 3.0) to cube
an arbitrary flonum. It shouldn't be a hardship to implement, since the
POSIX power functions, which I suspect most Scheme implementations already
use, directly or indirectly, support negative bases with integer powers.
The POSIX power functions also serve as a precedent, and no one has
provided a rationale for why we shouldn't follow it.

Kent
Received on Wed Jun 27 2007 - 00:05:07 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC