Merge branch 'master' of git.ucc.asn.au:/ipdf/code
[ipdf/code.git] / src / tests / arbrationals.cpp
index 3af559f..f26314c 100644 (file)
 using namespace std;
 using namespace IPDF;
 
+#include "rect.h"
+
 int main(int argc, char ** argv)
 {
-       for (unsigned i = 0; i < TEST_CASES; ++i)
-       {
-               Debug("Cycle %u",i);
-               Arbint p1 = 1L;//rand();
-               Arbint q1 = 2L;//rand();
-               Arbint p2 = rand();
-               Arbint q2 = rand();
-               Debug("Construct rationals");
-               Rational<Arbint> a(p1, q1);
-               Debug("Constructed a %u\n",i);
-               Rational<Arbint> b(p2, q2);
-               Debug("Constructed b %u\n",i);
-               
-               
-       }
-       printf("Tests done");
+
+       Rational<Arbint> a(1, 2);
+       Rational<Arbint> b(3, 9);
+       Rational<Arbint> c(b);
+       
+       Rational<Arbint> d(c);
+       c *= a;
+       Debug("%s * %s = %s", d.Str().c_str(), a.Str().c_str(), c.Str().c_str());
+       return 0;
+
 }

UCC git Repository :: git.ucc.asn.au