[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bounded, infinite ranges?
- To: firstname.lastname@example.org
- Subject: bounded, infinite ranges?
- From: Stavros Macrakis <email@example.com>
- Date: Wed, 21 Oct 1992 16:04:12 -0400
- Cc: firstname.lastname@example.org
- In-reply-to: Andy Wilson's message of Tue, 20 Oct 92 14:16 PDT <m0mhQvy-00018uC@ishark.intel.com>
- Sender: email@example.com
...Naively, one might assume that (size range) could be defined as
(/ (- (top range) (bottom range)) (by range)). However, since
floats are in fact represented finitely, if the "by:" step size for
range is sufficiently small there might well be too few allowable
bit patterns to represent the theoretical number of intervals in
The elements of the range should be in general calculated as from+I*by
rather than as ((from+by)+by)+by+... This also guarantees that you
don't get killed by round-off. On the other hand, it does mean that
more than one element of the range may have the same value.