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

Re: [Scheme-reports] result of (infinite? +nan.0+inf.0i)



On Tue, Sep 10, 2013 at 8:43 PM, John Cowan <cowan@x> wrote:
Per Bothner scripsit:

> What should be the result of (infinite? +nan.0+inf.0i)?  The report
> says #t but that seems undesirable, because it would mean that
> finite?/infinite?/nan? would no longer be a partitioning of the
> complex numbers,

It never has been.  If you look at R6RS, you'll see that these predicates
are defined on real numbers only; the extension to complex numbers is
new in R7RS.  The WG decided that the convention that a partly-infinite
complex number is an infinity and that a partly-NaN complex number is
a NaN was more important than extending the trichotomy.

There was some sentiment for declaring that any complex operation
that generated a partial NaN should generate a NaN, pure and simple,
but there were strong objections from the users of complex numbers,
who expected to be able to extract meaningful results from a partial NaN.

Well, the objections from "users of complex numbers" were
on both sides of the argument.  In my case, at least, the
intention was merely to _allow_ implementations to generate
pure NaNs in place of partial NaNs, and the standard does
allow this.

More generally, neither NaNs nor complex numbers are
required by the standard, and implementations are allowed
to implement signaling NaNs which makes all this moot.

-- 
Alex

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports