void
testNI(int start, int N, int M)
{
    typedef std::deque<int> C;
    typedef C::iterator I;
    typedef C::const_iterator CI;
    for (int i = 0; i <= 3; ++i)
    {
        if (0 <= i && i <= N)
        {
            C c1 = make(N, start);
            C c2 = make(M);
            testI(i, c1, c2);
        }
    }
    for (int i = M-1; i <= M+1; ++i)
    {
        if (0 <= i && i <= N)
        {
            C c1 = make(N, start);
            C c2 = make(M);
            testI(i, c1, c2);
        }
    }
    for (int i = N/2-1; i <= N/2+1; ++i)
    {
        if (0 <= i && i <= N)
        {
            C c1 = make(N, start);
            C c2 = make(M);
            testI(i, c1, c2);
        }
    }
    for (int i = N - M - 1; i <= N - M + 1; ++i)
    {
        if (0 <= i && i <= N)
        {
            C c1 = make(N, start);
            C c2 = make(M);
            testI(i, c1, c2);
        }
    }
    for (int i = N - 3; i <= N; ++i)
    {
        if (0 <= i && i <= N)
        {
            C c1 = make(N, start);
            C c2 = make(M);
            testI(i, c1, c2);
        }
    }
}
void
testNI(int start, int N, int M)
{
    C c1 = make<C>(N, start);
    C c2 = make<C>(M);
    testI(c1, c2);
}
int CommonBigNum(int argc, char *const *argv) {

    
	plan_tests(kTestTestCount);

    for(int i=0; i<10; i++) {
        testCreateFree();
        testHexString();
        testData();
        testI();
        testCompare();
        testBitCount();
        testAddSub();
        testAddSubI();
        testShift();
        testMod();
        testModI();
        testModExp();
        testMul();
        testMulI();
        testPrime();
        testDiv();
        testMulMod();
    }

    return 0;
}
Example #4
0
int
main (void)
{
  testA ();
  testB ();
  testC ();
  testD ();
  testE ();
  testF ();
  testG ();
  testH ();
  testI ();
  testJ ();
  testK ();
  testL ();
  testM ();
  testN ();
  testO ();
  testP ();
  testQ ();
  testR ();
  testS ();
  testT ();
  testU ();
  testV ();
  /*
  testW ();
  testX ();
  testY ();
  testZ ();
  */
  exit (0);
}
Example #5
0
void
testNI(int start, int N, int M)
{
    typedef typename C::iterator I;
    typedef typename C::const_iterator CI;
    C c1 = make<C>(N, start);
    C c2 = make<C>(M);
    testI(c1, c2);
}
Example #6
0
void tst_qe_arith() {
    test_project();
    return;
    check_random_ineqs();
    return;
//    enable_trace("qe");
    testI(example8);    
    testR(example7);
    test_ineqs();
    return;
    testR(example1);
    testR(example2);
    testR(example3);
    testR(example4);
    testR(example5);
    return;
    test2(example6);
    return;
}
Example #7
0
	int main()
    {
    	Vector2d testA(100, 500);
		Vector2d testI(400, 20);

		(testA + testI).print(); puts("");
		(testA - testI).print(); puts("");
		printf("dot product = %f\n", testA * testI);
		(testA * 2.000).print(); puts("");
		(testI / 2.000).print(); puts("");

		testA.normalize ().print(); puts("");
		testA.normalized().print(); puts("");

		printf("length = %f\n", testA.length());

		WAIT

		return 0;
    }