Karim Belabas on Thu, 24 May 2012 11:37:49 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: core of a negative ineteger |
* Max Alekseyev [2012-05-24 11:05]: > I believe that core of a negative integer should return a negative > integer (that would match the definition of core). Currently the > result is always positive. > In particular, core(-1) should return -1 not 1 and core(-1,1) should > return [-1,1]. > Don't you agree? Indeed. I introduced this in master when fixing [#1305] http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1305 > Currently we have: > > ? core(-1) > %1 = 1 > ? core(-1,1) > *** at top-level: core(-1,1) > *** ^---------- > *** core: negative integer in sqrtint. Fixed in master now: (11:37) gp > core(-1) %1 = -1 (11:37) gp > core(-1,1) %2 = [-1, 1] Cheers, K.B. -- Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17 Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux1.fr/~belabas/ F-33405 Talence (France) http://pari.math.u-bordeaux1.fr/ [PARI/GP] `