[Edu-sig] Re: rationals

Kirby Urner urnerk@qwest.net
Fri, 11 Oct 2002 07:21:34 -0700


At 09:52 AM 10/11/2002 -0400, Christopher A. Craig wrote:
>"Kirby Urner" <urnerk@qwest.net> writes:
>
> > The only thing that nags is using two symbols instead of one to
> > signify a type.  Complex (1j1) and float (1e1) get away with one
> > symbol, which is why 3r2 was somewhat appealing (but the r tends
> > to get lost).
>
>Technically, you're only using one symbol.  You could specify a
>rational with an integral value with just 'r'.

You could, if there's only a numerator, as in 2r.  But 3/2r contains
two symbols signifying type, whereas 3r2 contains only one.  I feel
I can live with either option.  3r/2 I don't really like, but I see
it as an operation rat/int returning 3/2r or (3/2)r or something
(I like the r as the final symbol in the number name, as L used to
be for longs).

Kirby