Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Testing latest pari + WASM + node.js... and it works?! Wow.

28493 views
License: GPL3
ubuntu2004
Function: permsign
Section: combinatorics
C-Name: permsign
Prototype: lG
Help: permsign(x): signature of the permutation x.
Doc: given a permutation $x$ on $n$ elements, return its signature.
 \bprog
 ? p = Vecsmall([3,1,4,2,5]);
 ? permsign(p)
 %2 = -1
 ? permsign(p^2)
 %3 = 1
 @eprog