[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] More NaN and Infsanity
On Sat, Apr 28, 2012 at 04:49:24PM -0400, John Cowan wrote:
> Given that the six R6RS implementations are split 3-3, and that all the
> Java ones prefer +nan.0, I don't think it's worth filing a ticket to
> standardize this behavior. Fast is almost certainly better than right
> in this case.
Fast would *probably* be returning either +nan.0 or +inf.0, whichever is
encountered first. I'm not sure that's the best thing to do.
If fast is best, then (> 1.0 +nan.0 'some-symbol) should return #f.
Currently, that's exactly what Chicken does and I consider it slightly
broken but probably not important enough to fix.
> > What should the value of the various trig functions be given nan/inf
> > values?
> Whatever IEEE 754 says. Editorial ticket #365 will add more examples
> (probably ripped off from R6RS) for the transcendental functions.
I'll take a look at that.
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
Scheme-reports mailing list