Shiro Kawai <xxxxxx@gmail.com> writes:
> 1. Those generators are described to return "a uniformly random distribution",
> but sampling uniformly from unbounded range doesn't make sense. The reference
> implementation limits the range with max-int. Maybe we can mention that those
> generators sample from "implementation-dependent range"?
Sure, that wording is better.
> 2. The reference implementation uses max-int to limit the range of inexact
> numbers. It is the implementation's discretion, but you might want to test with
> extreme values (e.g. 1.0e300, or numbers in the IEEE denormalized range), if the
> tested procedure takes floating point numbers. We may leave it to the user, but
> in that case it's even better to mention that the inexact-real-generator returns
> numbers in a certain bounded range (except the initial fixed sequence), so that
> the user need to make their own generators if they want to test wider range of
> values.
It might be better to create a new max-inexact value to cover the entire
IEEE 754 range, if the ieee-float cond-expand feature is available. If
not, max-inexact can fall back to max-int.
I will add a note to the generator section warning the user about the
implementation-defined ranges.
> 3. Is there an implementation that distinguish exact 0 and exact -0? Is it even
> possible?
Not that I know of. R7RS-small says "Negative zero is an inexact real
value", which eliminates the possibility of an exact -0 I think.