Home Online Manual
Top
Back: isZeroFraction
Forward: normalizeMonoidal
FastBack:
FastForward:
Up: olga_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document
7.5.23.0. isOneFraction
Procedure from library olga.lib (see olga_lib).

Usage:
isOneFraction(frac), vector frac

Purpose:
determine if the vector frac represents one

Assume:
frac is a valid fraction

Return:
int

Note:
1, if frac == 1; 0 otherwise

Example:
 
LIB "olga.lib";
ring R = 0,(x,y,Dx,Dy),dp;
def S = Weyl();
setring S; S;
==> // coefficients: QQ
==> // number of vars : 4
==> //        block   1 : ordering dp
==> //                  : names    x y Dx Dy
==> //        block   2 : ordering C
==> // noncommutative relations:
==> //    Dxx=x*Dx+1
==> //    Dyy=y*Dy+1
isOneFraction([42,42,0,0]);
==> 1
isOneFraction([0,0,Dx,3]);
==> 0
isOneFraction([1,0,0,1]);
==> 0