Re: rational arithmetic library?

taltman_at_noshpam.lbl.government
Date: 02/25/04


Date: Wed, 25 Feb 2004 13:13:48 -0800

Pascal Bourguignon <spam@thalassa.informatimago.com> writes:

> I don't see what's the problem?

Well, I posted to c.l.l to get the CL response to my problem. I
quickly found out that rational types as bignum tuples is a given via
the CLHS. So, you're right; with CL, I'm set. But I'm still hunting
for a Scheme implementation which will provide exactly that as well,
since my code is in Scheme. :-)

[snip]

> ;; Definition of generic functions allowing free mixing of integers
> ;; and rationals left to the reader...

This reader already concocted something along these lines:
http://thar.lbl.gov/~taltman/rational.scm.html
:-)

> Of course, if you feel that's your integers that are restricted, you
> can implement your unrestricted int type in a similar fashion, and use
> it instead of integer...

That's true, but I'd like to save myself the trouble of re-inventing
the wheel if it's avoidable.

Thanks!

~Tomer

-- 
()