Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
Function: algisinv
Section: algebras
C-Name: algisinv
Prototype: iGGD&
Help: algisinv(al,x,{&ix}): tests whether x is invertible and sets ix to the
inverse of x.
Doc: Given an element $x$ in \var{al}, tests whether $x$ is invertible, and sets
$ix$ to the inverse of $x$.
\bprog
? A = alginit(nfinit(y), [-1,1]);
? algisinv(A,[-1,1]~)
%2 = 0
? algisinv(A,[1,2]~,&ix)
%3 = 1
? ix
%4 = [Mod(Mod(-1/3, y), x^2 + 1), Mod(Mod(2/3, y), x^2 + 1)]~
@eprog
Also accepts matrices with coefficients in \var{al}.