Charles Greathouse on Wed, 09 May 2012 14:48:18 +0200


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

Errors in poliscycloprod


poliscycloprod(polcyclo(1)^2) returns 0 instead of 1.  More generally,
it seems that poliscycloprod(polcyclo(m)^n) is 0 for any m >= 1 and n
>= 2.  This does not follow the documentation, which says, properly in
my opinion,

poliscycloprod(f): returns 1 if f is a product of cyclotomic
polynonials, and 0 otherwise.

One thing I'd like to do with the function is to detect periodic
sequences by the denominator of their g.f., and in that case repeated
factors -- especially of x-1 -- are very common.


Further, on the Windows git version,

? poliscycloprod(x^3-1)
  ***   at top-level: poliscycloprod(x^3-1
  ***                 ^--------------------
  *** poliscycloprod: the PARI stack overflows !
  current stack size: 157286400 (150.000 Mbytes)
  [hint] you can increase GP stack with allocatemem()

which seems to happen for x^k - 1 for all k not a power of 2.

Charles Greathouse
Analyst/Programmer
Case Western Reserve University