[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: implementation of rational numbers
- To: William A. Kornfeld <BAK at MIT-AI>
- Subject: Re: implementation of rational numbers
- From: Deutsch at PARC-MAXC
- Date: Sun ,27 Sep 81 16:15:00 EDT
- Cc: LISP-FORUM at MIT-AI
- In-reply-to: BAK's message of 27 September 1981 06:39-EDT
Smalltalk-80 has both bignums and rationals; our implementation of rational
numbers converts to lowest terms after every operation. Currently we just do the
operation in the straightforward way and apply Silver's gcd algorithm to the
result, although of course there are better ways than this to implement the
elementary arithmetic operations. We don't have much experience with rationals,
so anything you learn would probably interest us. It would be very easy for us
to switch over to the "lazy reduction" method you suggest, if that turned out to
be advantageous.