source: git/Tst/Manual/primitive.tst @ 951db29

spielwiese
Last change on this file since 951db29 was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 557 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "primitiv.lib";
3ring exring=0,(x,y),dp;
4ideal i=x2+1,y2-x;                  // compute Q(i,i^(1/2))=:L
5ideal j=primitive(i);
6j[1];                               // L=Q(a) with a=(-1)^(1/4)
7j[2];                               // i=a^2
8j[3];                               // i^(1/2)=a
9// the 2nd element was already primitive!
10j=primitive(ideal(x2-2,y2-3));      // compute Q(sqrt(2),sqrt(3))
11j[1];
12j[2];
13j[3];
14// no element was primitive -- the calculation of primitive elements
15// is based on a random choice.
16tst_status(1);$
Note: See TracBrowser for help on using the repository browser.