Top
Back: allprint
Forward: pmat
FastBack:
FastForward:
Up: inout_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.5.2 lprint

Procedure from library inout.lib (see inout_lib).

Usage:
lprint(id[,n]); id poly/ideal/vector/module/matrix, n integer

Return:
string of id in a format fitting into lines of size n, such that no monomial gets destroyed, i.e. the new line starts with + or -; (default: n = pagewidth).

Note:
id is printed columnwise, each column separated by a blank line; hence lprint(transpose(id)); displays a matrix id in a format which can be used as input.

Example:
 
LIB "inout.lib";
ring r= 0,(x,y,z),ds;
poly f=((x+y)*(x-y)*(x+z)*(y+z)^2);
lprint(f,40);
==>   x3y2-xy4+2x3yz+x2y2z-2xy3z-y4z+x3z2
==> +2x2yz2-xy2z2-2y3z2+x2z3-y2z3
module m = [f*(x-y)],[0,f*(x-y)];
string s=lprint(m); s;"";
==>   x4y2-x3y3-x2y4+xy5+2x4yz-x3y2z-3x2y3z+xy4z+y5z+x4z2+x3yz2-3x2y2z2-xy3z2
==> +2y4z2+x3z3-x2yz3-xy2z3+y3z3,
==>   0,
==> 
==>   0,
==>   x4y2-x3y3-x2y4+xy5+2x4yz-x3y2z-3x2y3z+xy4z+y5z+x4z2+x3yz2-3x2y2z2-xy3z2
==> +2y4z2+x3z3-x2yz3-xy2z3+y3z3
==> 
execute("matrix M[2][2]="+s+";");      //use the string s as input
module m1 = transpose(M);              //should be the same as m
print(matrix(m)-matrix(m1));
==> 0,0,
==> 0,0 


Top Back: allprint Forward: pmat FastBack: FastForward: Up: inout_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.4.0, 2024, generated by texi2html.