Max Alekseyev on Sat, 24 Feb 2018 18:06:47 +0100


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

forpart() behavior


Hello!

In PARI/GP version Version 2.10.0 (development 21603-bef585b) I observe:

===
? forpart(p=1,print(p),[0,5],3)
Vecsmall([0, 0, 1])
? forpart(p=0,print(p),[0,5],3)
? forpart(p=1,print(p),[0,5],[3,4])
Vecsmall([0, 1, 1, -1])
===

I believe "forpart(p=0,print(p),[0,5],3)" should produce "Vecsmall([0, 0, 0])",
and "forpart(p=1,print(p),[0,5],[3,4])" should produce "Vecsmall([0,
0, 1])" and "Vecsmall([0, 0, 0, 1])".

What's wrong?

Regards,
Max