2

When I run the following commands

g := UnivariatePolynomial(Rationals, [12,-5,0,0,0,1]);
RootsOfPolynomialAsRadicals(g);

I get this error

  ***   too many arguments: ...;,nf=nfinit([f,nfbasis(f,1)]);fac=lift(nffact
  ***                                                   ^--------------------
  ***   at top-level: for(i=1,#fac[,1],for(j=1,fac[i,2
  ***                             ^--------------------
  ***   incorrect type in _[,_] OCcompoC [not a matrix] (t_POL).
Error, List Element: <list>[1] must have an assigned value in
  faktoren[1] := lcoeff * faktoren[1]; at /proc/cygdrive/C/gap486/pkg/Alnuth-3.0.0/gap/factors.gi:99 called from
FactorsPolynomialPari( AlgExtEmbeddedPol( H, poly )
 ) at /proc/cygdrive/C/gap486/pkg/Alnuth-3.0.0/gap/factors.gi:51 called from
FactorsPolynomialAlgExt( erw.H, poly ) at /proc/cygdrive/C/gap486/pkg/radiroot/lib/SplittField.gi:237 called from
RR_Zerfaellungskoerper( poly, rec(
    roots := [  ],
    degs := [  ],
    coeffs := [  ],
    K := FieldByMatrices( [ [ [ 1 ] ] ] ),
    H := Rationals ) ) at /proc/cygdrive/C/gap486/pkg/radiroot/lib/Radicals.gi:293 called from
CallFuncList( RootsOfPolynomialAsRadicalsNC, arg
 ) at /proc/cygdrive/C/gap486/pkg/radiroot/lib/Radicals.gi:253 called from
<function "RootsOfPolynomialAsRadicals">( <arguments> )
 called from read-eval loop at line 2 of *stdin*
you can 'return;' after assigning a value

I am using GAP 4.8.6 on windows 10, installed from the windows installer on the GAP downloads page, and PARI/GP 2.9.1 64 bit (stable installer). I've also tried manually downloading and using the latest versions of Alnuth and Radiroot but I'm still getting the same error. Does anyone know how to fix this?

Ben
  • 470
  • 1
  • 6
  • 18
  • Did you ever find a solution? I'm having the same problem myself. – Fly by Night Oct 14 '17 at 23:52
  • @FlybyNight No, unfortunately. – Ben Oct 15 '17 at 02:59
  • How about running its tests, as recommended in the manual, by doing `LoadPackage("radiroot"); ReadPackage( "radiroot", "tst/testall.g" );` – Dima Pasechnik Oct 15 '17 at 09:49
  • @DimaPasechnik The package loads just fine, but running the tests gives the same errors as in my original post. Calling nfbasis with too many arguments, and a type error. – Ben Oct 15 '17 at 13:03
  • I hear it's some incompatibility with a newer version of Pari/GP they missed... – Dima Pasechnik Oct 15 '17 at 13:05
  • see my answer on https://math.stackexchange.com/questions/2472644/having-trouble-with-radiroot-in-gap/2473891#2473891 It works on Linux, with GAP 4.8.8 built from source. I also have PARI-GP version 2.7.1 installed, in case it matters. – Dima Pasechnik Oct 15 '17 at 19:10
  • Just tried installing pari 2.7.1, still getting the same errors. – Ben Oct 15 '17 at 22:33
  • 1
    I got help from GAP Support for a similar problem, and it worked. Please see my post: https://math.stackexchange.com/a/2477034/38495 – Fly by Night Oct 17 '17 at 16:14
  • @FlybyNight Thanks, I have it working now too. – Ben Oct 17 '17 at 16:35

1 Answers1

0

This now works in GAP 4.11.0, with Alnuth 3.1.2, RadiRoot 2.8 and Pari/GP 2.9.3, under macOS:

g := UnivariatePolynomial(Rationals, [12,-5,0,0,0,1]);
RootsOfPolynomialAsRadicals(g);

starts an xdvi viewer which displays the result. It's hard to read as an image, so I am providing the LaTeX source for it, which may be more useful:

\documentclass[fleqn]{article} 
\setlength{\paperwidth}{84cm} 
\setlength{\textwidth}{80cm} 
\setlength{\paperheight}{59.5cm} 
\setlength{\textheight}{57cm} 
\begin{document} 
\noindent
An expression by radicals for the roots of the polynomial $x^{5} - 5x + 12$ with the $n$-th root of unity $\zeta_n$ and
\\
$\omega_1 = \sqrt[2]{ - 10}$,\\
$\omega_2 = \sqrt[5]{\left( - \frac{421}{5}\zeta_{5} - \frac{449}{5}\zeta_{5}^{2} - \frac{49}{5}\zeta_{5}^{3} + \frac{229}{5}\zeta_{5}^{4}\right) + \left( - \frac{168}{25}\zeta_{5} - \frac{849}{25}\zeta_{5}^{2} - \frac{1101}{25}\zeta_{5}^{3} - \frac{582}{25}\zeta_{5}^{4}\right)\omega_1}$,\\
\\
is:
\\
\noindent
$\left( - \frac{2}{11}\zeta_{5} - \frac{1}{11}\zeta_{5}^{2} + \frac{4}{11}\zeta_{5}^{3} - \frac{4}{11}\zeta_{5}^{4}\right)\omega_2 + \left( - \frac{42}{121}\zeta_{5} + \frac{34}{121}\zeta_{5}^{2} - \frac{92}{121}\zeta_{5}^{3} + \frac{15}{121}\zeta_{5}^{4}\right)\omega_2^2 + \left(\frac{91}{605}\zeta_{5} + \frac{7}{605}\zeta_{5}^{2} + \frac{38}{605}\zeta_{5}^{3} + \frac{149}{605}\zeta_{5}^{4}\right)\omega_1\omega_2^2 + \left(\frac{175}{1331}\zeta_{5} + \frac{302}{1331}\zeta_{5}^{2} + \frac{706}{1331}\zeta_{5}^{3} + \frac{482}{1331}\zeta_{5}^{4}\right)\omega_2^3 + \left(\frac{255}{1331}\zeta_{5} + \frac{364}{1331}\zeta_{5}^{2} + \frac{40}{1331}\zeta_{5}^{3} + \frac{246}{1331}\zeta_{5}^{4}\right)\omega_1\omega_2^3 + \left( - \frac{11480}{14641}\zeta_{5} + \frac{420}{14641}\zeta_{5}^{2} + \frac{7725}{14641}\zeta_{5}^{3} - \frac{740}{14641}\zeta_{5}^{4}\right)\omega_2^4 + \left(\frac{786}{14641}\zeta_{5} + \frac{6399}{14641}\zeta_{5}^{2} + \frac{45}{14641}\zeta_{5}^{3} + \frac{1275}{14641}\zeta_{5}^{4}\right)\omega_1\omega_2^4$
\end{document}

It's difficult to say what was the original problem, there were many changes in both packages, which are now hosted on GitHub - the source code repositories are https://github.com/gap-packages/radiroot and https://github.com/gap-packages/alnuth.