|Bill Allombert on Tue, 7 Jan 2003 19:47:20 +0100|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: gp: gcd(0), tan(Pi/2) error messages unhelpful|
On Tue, Jan 07, 2003 at 01:12:04PM -0500, Michael Somos wrote: > pari-dev, > > > For the first one, it's more awkward. > > Really? The three functions (gcd,lcm,chinese) according to the > documentation require at least one argument, but the rest are > optional. Therefore, I would expect that giving only one argument > would be valid. It seems this is not currently the case. In my > actual application, I accidently only gave one argument by mistake. > In any case, replacing "associative" with "associative (gcd,lcm, > chinese)" would be a small step towards helpfulness. Shalom, Michael Giving one argument is valid iff it is a vector. Since I have implemented this strange feature in the first place I have some responsibilities with these problems. The goal was to use divide and conquer strategy with lcm and chinese. For consistency, I have implemented it for gcd, which is silly, because divide and conquer is waistful in this case, and there is already content(). Also it would be nice to have the equivalent for the multiplication. Currently we use factorback for that. ? lcm([123,456,789]) %1 = 4917048 Using "associative (gcd,lcm,chinese)" is wrong because we can add new functions at any time, and we will certainly forget to update the list. Cheers, Bill.