|
7.5.21.0. isOneNcfrac
Procedure from library ncfrac.lib (see ncfrac_lib).
- Usage:
- isOneNcfrac(frac), ncfrac frac
- Purpose:
- checks if frac is one
- Return:
- int, 1 if frac is one, 0 otherwise
Example:
| LIB "ncfrac.lib";
==> // ** redefining testNcfrac (LIB "ncfrac.lib";)
==> // ** redefining testNcloc ( LIB "ncloc.lib";)
ring Q = (0,q),(x,y,Qx,Qy),dp;
matrix C[4][4] = UpOneMatrix(4);
C[1,3] = q;
C[2,4] = q;
def ncQ = nc_algebra(C,0);
setring ncQ;
ncloc loc = intvec(2);
ncfrac frac = list([y^2+7*y+1,y^2+7*y+1,0,0], loc);
isOneNcfrac(frac);
==> 1
frac.lnum = 42*y*Qy+7*Qx+3*x+7;
isOneNcfrac(frac);
==> 0
|
|