Package: pari
Version: 2.61 [2, 6, 1, 15210, "71d3c79"]
A recent commit, fc88f1c9d8, with description "divisors: allow the [N,faN] format + disallow N = 0" doesn't seem to work as intended.
arith2.c:
678 case t_VEC:
679 if (lg(n) != 3) pari_err_TYPE("divisors",n);
680 F = gel(n,2); /* fall through */
681 case t_MAT:
682 F = n;
683 if (lg(F) != 3) pari_err_TYPE("divisors",n);
As you can see, if n is of type t_VEC F is set to gel(n, 2), and then immediately reset to n. This means that it produces an error if used:
? fordiv([9,factor(9)],d,print(d))
*** at top-level: fordiv([9,factor(9)]
*** ^--------------------
*** fordiv: incorrect type in divisors [integer vector] (t_MAT).
*** Break loop: type 'break' to go back to GP prompt
It's possible that I misunderstand the intent of the change, but in any case line #680 is redundant at present so this seems to be some sort of error.
Charles Greathouse
Analyst/Programmer
Case Western Reserve University