Subject: Maxima rationals compared to CL rationals
From: Barton Willis
Date: Wed, 1 Aug 2007 13:37:35 -0500
Raymond Toy <raymond.toy at ericsson.com> wrote on 08/01/2007 01:22:33 PM:
>
> Sounds like gcl is not working as well as it should be. I thought gcl
> used gmp which is comparable in speed to clisp's bignum routines.
>
> Ray
I refreshed my memory of Kunth 4.5.1:
To add u / u' + v / v' do:
d : gcd(u', v'),
if d # 1
t : u * (v' / d) + v * (u' / d),
return t / gcd(t, d)
else (u * v' + v u') / (u' * v')
Maybe GCL doesn't use such a scheme. It seems that the function addk
takes over rational number addition. I'm not sure right now if
addk uses Knuth 4.5.1 addition.
Barton