Karim BELABAS on Tue, 8 Dec 1998 14:30:29 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: polredabs() |
[Igor:] > ? t2norm(x^4-x-1) > %13 = 4.276475609680439616479500351 > ? t2norm(polredabs(x^4-x-1)) > %14 = 4.345048321046443827557722074 > > I think though it is a 2.0.12-introduced bug, because > in 2.0.11 polredabs(x^4-x-1) would return itself, rather than > x^4-x^3-1, like 2.0.12 does. Right. A typo crept in while performing the final change of basis [inverting a permutation, which is almost always = identity]. Here's a patch. Karim. *** src/basemath/bibli1.c.orig Fri Nov 6 16:08:07 1998 --- src/basemath/bibli1.c Tue Dec 8 14:23:37 1998 *************** *** 3106,3112 **** perm = sindexsort(vnorm); sperm = cgetg(n,t_MAT); uperm = cgetg(n,t_MAT); ! for (i=1; i<n; i++) { uperm[perm[i]] = u[n-i]; sperm[n-i] = s[perm[i]]; } if (DEBUGLEVEL>2) {fprintferr("\nEntree dans smallvectors\n"); flusherr();} if (check) basis = init_chk(chk_nf,uperm); --- 3105,3111 ---- perm = sindexsort(vnorm); sperm = cgetg(n,t_MAT); uperm = cgetg(n,t_MAT); ! for (i=1; i<n; i++) { uperm[n-i] = u[perm[i]]; sperm[n-i] = s[perm[i]]; } if (DEBUGLEVEL>2) {fprintferr("\nEntree dans smallvectors\n"); flusherr();} if (check) basis = init_chk(chk_nf,uperm); -- Karim Belabas email: Karim.Belabas@math.u-psud.fr Dep. de Mathematiques, Bat. 425 Universite Paris-Sud Tel: (00 33) 1 69 15 57 48 F-91405 Orsay (France) Fax: (00 33) 1 69 15 60 19 -- PARI/GP Home Page: http://pari.home.ml.org