Richard Fateman <fateman at cs.berkeley.edu> wrote:
> I think using Lisp rational numbers should be done.
OK, I agree. (There is one argument in favor of keeping ((rat ) n d)
that I know of. And that is we could
in principle, have rational number-like object that are an extension of
common lisp rationals. These are,
in particular, ((rat) 1 0) for "infinity" and ((rat) 0 0) for
"undefined". It turns out that these extended rational
numbers have some nice properties and combine with the regular numbers
neatly. But not entirely neatly.)
One issue is that CL ratios unconditionally do automatic gcd
simplification in two ways:
cl-user(19): (/ 10 4)
5/2 ; a different, mathematically equal ratio
cl-user(19): (/ 10 5)
2 ; an object of type integer, not type ratio
These are almost always what one wants, but does Maxima always behave
similarly in these two cases? If not, is there any circumstance where
automatic simplification would not be wanted?