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

Re: [Scheme-reports] More NaN and Infsanity



John Cowan writes:
> Jussi Piitulainen scripsit:
> 
> > The construction of the Stern-Brocot tree that I've seen (related to
> > the notion of the simplest rational in an interval) starts with two
> > extreme "values", 0/1 and 1/0. All positive rationals are built
> > between these. The pretense is that 1/0 is the simplest rational
> > representation of "infinity". So it may make sense to return +inf.0.
> 
> Except that +inf.0 is not rational, so it can't be returned.

Yes, I just tried to give a bit of context, perhaps not the best.
Would it be a good idea to add some reference to the text? Rationalize
may be the least-well-known of Scheme's mathematical functions. I
don't know what to cite, though.

> > (Does the spec really say "rational but not real"?)
> 
> No, the converse:  +inf.0, -inf.0, and +nan.0 are real but not rational.
> R6RS says the same.

Good. The other way it sounded weird.


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