spielwiese
Last change
on this file since 341696 was
341696,
checked in by Hans Schönemann <hannes@…>, 14 years ago
|
Adding Id property to all files
git-svn-id: file:///usr/local/Singular/svn/trunk@12231 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | // $Id$ |
---|
2 | /////////////////////////////////////////////////////////////////////////////// |
---|
3 | // factory - Includes |
---|
4 | // (x+y+z)*(x+y-z)*(x-y+z)*(x-y-z)*x*y; |
---|
5 | #include <factory.h> |
---|
6 | // Factor - Includes |
---|
7 | #include "tmpl_inst.h" |
---|
8 | #include "Factor.h" |
---|
9 | #include "SqrFree.h" |
---|
10 | |
---|
11 | main() |
---|
12 | { |
---|
13 | CanonicalForm f,g; |
---|
14 | int charac; |
---|
15 | CFFList Factorlist; |
---|
16 | CFFactor copy; |
---|
17 | |
---|
18 | // cout << " Characteristic = "; |
---|
19 | cin >> charac; |
---|
20 | setCharacteristic(charac); |
---|
21 | On(SW_SYMMETRIC_FF); |
---|
22 | g=1; |
---|
23 | // cout << " f = "; |
---|
24 | cin >> f; |
---|
25 | // cout << " f = " << f << endl; |
---|
26 | // cout << " f(SqrFree)= " << endl; |
---|
27 | // cout << SqrFree(f) << endl << endl; |
---|
28 | //cout << "gcd(f,f.deriv())= gcd(" << f << "," << f.deriv() << ")= " << gcd(f,f.deriv()) << endl; |
---|
29 | //cout << "gcd(f,f.deriv())= gcd(" << f << "," << f.deriv() << ")= " << gcd(f,f.deriv()) << endl; |
---|
30 | Factorlist = Factorize( f ); |
---|
31 | cout << Factorlist ;//<< endl; |
---|
32 | // Ueberpruefen: |
---|
33 | for ( CFFListIterator i=Factorlist ; i.hasItem(); i++){ |
---|
34 | copy = i.getItem(); |
---|
35 | if ( getNumVars(copy.factor()) > 0 ) |
---|
36 | for ( int j=1; j<=copy.exp(); j++) |
---|
37 | g *= copy.factor(); |
---|
38 | else g *= copy.factor(); |
---|
39 | } |
---|
40 | if ( (f-g) != f.genZero() ){ |
---|
41 | cerr << "\nList and f differ: f= " << f << " g= " << g << endl; |
---|
42 | cerr << "List= " << Factorlist << endl; |
---|
43 | } |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.