Top
Back: ndc
Forward: Weyl
FastBack: ncdecomp_lib
FastForward: qmatrix_lib
Up: nctools_lib
Top: Plural Manual
Contents: Table of Contents
Index: Index
About: About this document

B.7.0.4 RootOfUnity

Procedure from library nctools.lib (see nctools_lib).

Usage:
RootOfUnity(n); n an integer

Return:
number, the n-th primitive root of unity (for use as minpoly)

Note:
works only in field extensions by one element

Example:
 
LIB "nctools.lib";
ring r8 = (0,q),(x,y,z),dp;
minpoly = RootOfUnity(8);
r8;
==> //   characteristic : 0
==> //   1 parameter    : q 
==> //   minpoly        : (q4+1)
==> //   number of vars : 3
==> //        block   1 : ordering dp
==> //                  : names    x y z 
==> //        block   2 : ordering C
ring r7 = (0,q),(x,y,z),dp;
minpoly = RootOfUnity(7);
r7;
==> //   characteristic : 0
==> //   1 parameter    : q 
==> //   minpoly        : (q6+q5+q4+q3+q2+q+1)
==> //   number of vars : 3
==> //        block   1 : ordering dp
==> //                  : names    x y z 
==> //        block   2 : ordering C
ring r6 = (0,q),(x,y,z),dp;
minpoly = RootOfUnity(6);
r6;
==> //   characteristic : 0
==> //   1 parameter    : q 
==> //   minpoly        : (q2-q+1)
==> //   number of vars : 3
==> //        block   1 : ordering dp
==> //                  : names    x y z 
==> //        block   2 : ordering C


Top Back: ndc Forward: Weyl FastBack: ncdecomp_lib FastForward: qmatrix_lib Up: nctools_lib Top: Plural Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 2-1-99, August 2004, generated by texi2html.