source: git/Tst/Manual/smith.tst @ 6fb723

spielwiese
Last change on this file since 6fb723 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: 314 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "jacobson.lib";
3ring r = 0,x,Dp;
4matrix m[3][2]=x, x^4+x^2+21, x^4+x^2+x, x^3+x, 4*x^2+x, x;
5list s=smith(m,1);
6print(s[2]);  // non-normalized Smith form of m
7print(s[1]*m*s[3] - s[2]); // check U*M*V = D
8list t = divideUnits(s);
9print(t[2]); // the Smith form of m
10tst_status(1);$
Note: See TracBrowser for help on using the repository browser.