[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bounded, infinite ranges?
- To: email@example.com
- Subject: bounded, infinite ranges?
- From: Stavros Macrakis <firstname.lastname@example.org>
- Date: Wed, 21 Oct 1992 16:04:12 -0400
- Cc: email@example.com
- In-reply-to: Andy Wilson's message of Tue, 20 Oct 92 14:16 PDT <m0mhQvy-00018uC@ishark.intel.com>
- Sender: firstname.lastname@example.org
...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.