Top
Back: is_zero
Forward: maxcoef
FastBack:
FastForward:
Up: polylib_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.8.6 lcm

Procedure from library polylib.lib (see polylib_lib).

Usage:
lcm(p[,q]); p int/intvec q a list of integers or
p poly/ideal q a list of polynomials

Return:
the least common multiple of p and q:
- of type int if p is an int/intvec
- of type poly if p is a poly/ideal

Example:
 
LIB "polylib.lib";
ring  r = 0,(x,y,z),lp;
poly  p = (x+y)*(y+z);
poly  q = (z4+2)*(y+z);
lcm(p,q);
==> xyz4+2xy+xz5+2xz+y2z4+2y2+yz5+2yz
ideal i=p,q,y+z;
lcm(i,p);
==> xyz4+2xy+xz5+2xz+y2z4+2y2+yz5+2yz
lcm(2,3,6);
==> 6
lcm(2..6);
==> 60


Top Back: is_zero Forward: maxcoef FastBack: FastForward: Up: polylib_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.2, 2023, generated by texi2html.