Home Online Manual
Top
Back: isZeroNcfrac
Forward: zeroNcfrac
FastBack:
FastForward:
Up: ncfrac_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document
7.5.15.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";) ./examples/isOneNcfrac.si\
   ng:1
==> // ** redefining testNcloc (    LIB "ncloc.lib";) ncfrac.lib::mod_init:11\
   3
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