spielwiese
Last change
on this file since 33a041 was
2cfffe,
checked in by Hans Schönemann <hannes@…>, 21 years ago
|
This commit was generated by cvs2svn to compensate for changes in r6316,
which included commits to RCS files with non-trunk default branches.
git-svn-id: file:///usr/local/Singular/svn/trunk@6317 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
832 bytes
|
Line | |
---|
1 | |
---|
2 | #include <NTL/ZZ_pXFactoring.h> |
---|
3 | #include <NTL/ZZ_pEXFactoring.h> |
---|
4 | |
---|
5 | NTL_CLIENT |
---|
6 | |
---|
7 | int main() |
---|
8 | { |
---|
9 | ZZ_p::init(to_ZZ(17)); |
---|
10 | |
---|
11 | ZZ_pX P; |
---|
12 | BuildIrred(P, 10); |
---|
13 | |
---|
14 | ZZ_pE::init(P); |
---|
15 | |
---|
16 | ZZ_pEX f, g, h; |
---|
17 | |
---|
18 | random(f, 20); |
---|
19 | SetCoeff(f, 20); |
---|
20 | |
---|
21 | random(h, 20); |
---|
22 | |
---|
23 | g = MinPolyMod(h, f); |
---|
24 | |
---|
25 | if (deg(g) < 0) Error("bad ZZ_pEXTest (1)"); |
---|
26 | if (CompMod(g, h, f) != 0) |
---|
27 | Error("bad ZZ_pEXTest (2)"); |
---|
28 | |
---|
29 | |
---|
30 | |
---|
31 | vec_pair_ZZ_pEX_long v; |
---|
32 | |
---|
33 | long i; |
---|
34 | for (i = 0; i < 5; i++) { |
---|
35 | long n = RandomBnd(20)+1; |
---|
36 | cerr << n << " "; |
---|
37 | |
---|
38 | random(f, n); |
---|
39 | SetCoeff(f, n); |
---|
40 | |
---|
41 | v = CanZass(f); |
---|
42 | |
---|
43 | g = mul(v); |
---|
44 | if (f != g) cerr << "oops1\n"; |
---|
45 | |
---|
46 | long i; |
---|
47 | for (i = 0; i < v.length(); i++) |
---|
48 | if (!DetIrredTest(v[i].a)) |
---|
49 | Error("bad ZZ_pEXTest (3)"); |
---|
50 | |
---|
51 | |
---|
52 | } |
---|
53 | |
---|
54 | cerr << "\n"; |
---|
55 | |
---|
56 | cerr << "ZZ_pEXTest OK\n"; |
---|
57 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.