primorial operator '#' for GP?

[email protected]
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
GP has factorial operator:
? 11!
%6 = 39916800
?

Similarly primorial is product of first n primes.

prodeuler produces only a floating point approximation:
? prodeuler(p=2,11,p)
%7 = 2310.0000000000000000000000000000000000
?

Something like this is exact:
? P(x)={r=1;forprime(p=2,x,r*=p);r}
%8 = (x)->r=1;forprime(p=2,x,r*=p);r
? P(11)
%9 = 2310
?

Any chance to see "#" as operator in GP like "!"?
? 11#
   ***   syntax error, unexpected '#', expecting end of file: 11#
   ***                                                          ^-
?

Would be useful for eg. working with primorial primes p#±1:
https://en.wikipedia.org/wiki/Primorial_prime


Regards,

Hermann.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.