Re: [Scheme-reports] result of (infinite? +nan.0+inf.0i)
John Cowan 10 Sep 2013 11:43 UTC
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.
--
Winter: MIT, John Cowan
Keio, INRIA, cowan@ccil.org
Issue lots of Drafts. http://www.ccil.org/~cowan
So much more to understand!
Might simplicity return? (A "tanka", or extended haiku)
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports