On 2020-12-12 10:55 +0100, Marc Nieper-Wißkirchen wrote:
> The question about how to make use of SRFI 208 in a safe and portable
> fashion, however, remains. Couldn't we add some inspection features?
> For example, to use `make-nan` safely, I need to know what the largest
> payload may be.
Since the spec of make-nan states that "it is an error if _payload_ is
larger than a NaN can hold", wouldn't it be sufficient to handle such
an error if it is signaled? The other uses for inspection features
seem obscure to me, and I believe that we're not in favor of adding
any.
> How is the behavior of `make-nan` when the underlying floating-point
> implementation allows for payloads but cannot make free use of the
> sign or quiet bit? Would this mean that such a Scheme system cannot
> provide a `make-nan`?
This seems like an extreme edge-case, and one which we're not
interested in specifying.
Again, we obviously don't and can't have a really portable
implementation of SRFI 208. How the SRFI is supposed to work on
strange systems without IEEE-754 support or without access to some
NaN components is going to be up to the implementers working with
those systems.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"Simplicity does not precede complexity, but follows it."
--Alan J. Perlis