source: git/Tst/Manual/rMacaulay.tst @ 0d6b7fc

spielwiese Release-4-3-2p2
Last change on this file since 0d6b7fc 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: 848 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "inout.lib";
3// Assume there exists a file 'Macid' with the following ideal in
4// Macaulay format:"
5// x[0]3-101/74x[0]2x[1]+7371x[0]x[1]2-13/83x[1]3-x[0]2x[2] \
6//     -4/71x[0]x[1]x[2]
7// Read this file into Singular and assign it to the string s1 by:
8// string s1 = read("Macid");
9// This is equivalent to";
10string s1 =
11"x[0]3-101/74x[0]2x[1]+7371x[0]x[1]2-13/83x[1]3-x[0]2x[2]-4/71x[0]x[1]x[2]";
12rMacaulay(s1);
13// You may wish to assign s1 to a Singular ideal id:
14string sid = "ideal id =",rMacaulay(s1),";";
15ring r = 0,x(0..3),dp;
16execute(sid);
17id; "";
18// Now treat a matrix in Macaulay format. Using the execute
19// command, this could be assinged to a Singular matrix as above.
20string s2 = "
210  0  0  0  0
22a3 0  0  0  0
230  b3 0  0  0
240  0  c3 0  0
250  0  0  d3 0
260  0  0  0  e3 ";
27rMacaulay(s2);
28tst_status(1);$
Note: See TracBrowser for help on using the repository browser.