Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
Function: bitneg
Section: conversions
C-Name: gbitneg
Prototype: GD-1,L,
Help: bitneg(x,{n=-1}): bitwise negation of an integers x truncated to n
bits. n=-1 means represent infinite sequences of bit 1 as negative numbers.
Negative numbers behave as if modulo big power of 2.
Doc:
\idx{bitwise negation} of an integer $x$,
truncated to $n$ bits, $n\geq 0$, that is the integer
$$\sum_{i=0}^{n-1} \kbd{not}(x_i) 2^i.$$
The special case $n=-1$ means no truncation: an infinite sequence of
leading $1$ is then represented as a negative number.
See \secref{se:bitand} for the behavior for negative arguments.