Changeset 0d1984 in git
- Timestamp:
- May 11, 2012, 3:51:24 PM (11 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- d7eac3b10f1d0681478bd033cc259409eeab9132
- Parents:
- 860d71cc6a362dccf8aea3a8620a4e147d6ab72c
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-05-11 15:51:24+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-05-11 15:51:35+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/test.cc
r860d71 r0d1984 24 24 int test2 (int p) 25 25 { 26 int ret = 1; 26 27 setCharacteristic (p); 28 printf ("p: %d, i: %d", p, 0); 27 29 CanonicalForm d1= Variable (1) + Variable (2) + 1; 28 30 CanonicalForm f1= Variable (1) - Variable (2) - 2; … … 33 35 CanonicalForm h= gcd (f,g); 34 36 h /= Lc (h); 37 printf (", h==d? %d\n", (h == d)); 35 38 if (h != d) 36 return -1; 37 printf ("h==d? %d\n", (h == d)); 39 ret = -1; 38 40 for (int i= 3; i <= 11; i++) 39 41 { 42 printf ("p: %d, i: %d", p, i); 40 43 d1 += power (Variable (i), i); 41 44 f1 -= power (Variable (i), i); … … 46 49 h= gcd (f,g); 47 50 h /= Lc (h); 51 printf (", h==d? %d\n", (h == d)); 48 52 if (h != d) 49 return -1; 50 printf ("h==d? %d\n", (h == d)); 53 ret = -1; 51 54 } 52 return 1;55 return ret; 53 56 } 54 57 … … 97 100 int main( int, char *argv[] ) 98 101 { 102 int ret = 0; 103 99 104 feInitResources(argv[0]); 100 105 106 // On (SW_USE_EZGCD); On (SW_USE_EZGCD_P); // TODO&NOTE: these switches lead to failed tests (with nonzero p)! 107 101 108 int t= test2 (0); 102 109 if (t < 0) 103 ret urnt;110 ret = t; 104 111 /*t= test5 (0); 105 112 if (t < 0) … … 116 123 t= test2 (3); 117 124 if (t < 0) 118 return t; 125 ret += t; 126 119 127 t= test2 (101); 120 128 if (t < 0) 121 return t; 129 ret += t; 130 122 131 t= test2 (43051); 123 132 if (t < 0) 124 return t; 125 return 0; 133 ret += t; 134 135 return ret; 126 136 }
Note: See TracChangeset
for help on using the changeset viewer.