Home Online Manual
Top
Back: isInvertibleNcfrac
Forward: testNcfrac
FastBack:
FastForward:
Up: ncfrac_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document
7.5.15.0. invertNcfrac
Procedure from library ncfrac.lib (see ncfrac_lib).

Usage:
invertNcfrac(frac), ncfrac frac

Purpose:
compute the inverse of frac

Return:
ncfrac

Note:
returns the zero fraction if frac is not invertible

Example:
 
LIB "ncfrac.lib";
==> // ** redefining testNcfrac (LIB "ncfrac.lib";) ./examples/invertNcfrac.s\
   ing:1
==> // ** redefining testNcloc (    LIB "ncloc.lib";) ncfrac.lib::mod_init:11\
   3
ring R = 0,(x,y,Dx,Dy),dp;
def S = Weyl();
setring S;
ncloc loc = intvec(2);
ncfrac frac1 = list([y,y+1,0,0], loc);
// frac1 is invertible
ncfrac inv = invertNcfrac(frac1);
inv;
==> left repr.: (y+1,y)
==> right repr.: (0,0)
==> 
ncfrac frac2 = list([y,x+1,0,0], loc);
// frac2 is not invertible
inv = invertNcfrac(frac2);
inv;
==> left repr.: (1,0)
==> right repr.: (0,1)
==>