From: William Djaja Tjokroaminata Date: 2003-02-13T13:07:37+09:00 Subject: Re: Range#length? Yukihiro Matsumoto wrote: > Hi, > In message "Re: Range#length?" > on 03/02/13, William Djaja Tjokroaminata writes: > |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 > I'm not sure what "sup" and "inf" stand for. > matz. Hi Matz, I was taking the point from ahoward, which said "what would be the last_member of (0.0 ... 42.0) ??" In any Advanced Calculus or Real Analysis course, they introduced the concept of "Supremum" (sup) which is the smallest upper bound and "Infinum" (inf) which is the greatest lower bound. A smallest upper bound that belongs to the set is also called Maximum, and similarly, a greatest lower bound that belongs to the set is also called Minimum. Therefore, (0.0 .. 42.0).max == 42.0 but (0.0 ... 42.0).max does not exist. However, (0.0 .. 42.0).sup and (0.0 ... 42.0).sup both exist and are equal to 42.0. For a quick, more formal treatment of the subject, we can read e.g. http://www.math.purdue.edu/~rcp/11_sup-inf_public.pdf I am sorry if I am being too formal mathematically; I was only responding to ahoward's points. Regards, Bill