Karim Belabas on Sun, 15 Nov 2015 16:01:40 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: chinese([])


* Max Alekseyev [2015-11-11 23:28]:
> Is there any reason why chinese([]) returns 1?

History... The underlying routine started out as a generic product
before being adapted to associative operators which could benefit from
divide&conquer approach.

Since empty product := 1, it remained that way for the general case as
well.

> I would rather argue that it should return Mod(0,1).
> First, it's t_INTMOD as any other chinese(...) outputl; and second, it
> includes all integers as they all reside in every residue class from the
> empty vector [].

Fixed in master. Thanks for pointing that out !

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]
`