From: William Djaja Tjokroaminata Date: 2003-02-13T04:04:55+09:00 Subject: Re: Range#length? ahoward wrote: > On Tue, 11 Feb 2003, Vraj Mohan wrote: >> Yukihiro Matsumoto wrote: >> > Hi, >> > >> > Do you think of a good name for it? I'm glad to add a method if >> > you have a good name. >> > >> > matz. >> How about "last_member"? > what would be the last_member of > (0.0 ... 42.0) ?? Hi, How about "sup" and "inf"? Using '{}' notation for set, '()' for open interval, and '[]' for closed internval, then {40, 41, 42} .sup >> 42 (40.0, 42.0) .sup >> 42.0 [40.0, 42.0] .sup >> 42.0 Regarding the "length" or "size" of a floating point range, I guess we can decide which is more useful from programming point of view, whether to return infinity (aleph one, actually, according to the Continuum Hypothesis) or to return Range.sup - Range.inf (which is more in line with the Measure Theory). Regards, Bill