X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Ftests%2Farbrationals.cpp;h=f26314c5177ee0179b44057b75977cf6367e18f7;hp=09e7a7880a6f78417fc9bc0eb8f02c86d7176eb4;hb=a182cbba4fe9e6a36c5063735dbec1c5340da04c;hpb=04e65d814fe15a17040a701d46ae669cc9dcd3d8 diff --git a/src/tests/arbrationals.cpp b/src/tests/arbrationals.cpp index 09e7a78..f26314c 100644 --- a/src/tests/arbrationals.cpp +++ b/src/tests/arbrationals.cpp @@ -15,17 +15,14 @@ using namespace IPDF; int main(int argc, char ** argv) { + + Rational a(1, 2); + Rational b(3, 9); + Rational c(b); - Rect rect(0,0,1,1); + Rational d(c); + c *= a; + Debug("%s * %s = %s", d.Str().c_str(), a.Str().c_str(), c.Str().c_str()); return 0; - for (unsigned i = 0; i < TEST_CASES; ++i) - { - double d = (double)(rand()) / (double)(rand()); - Rational r(d); - Debug("%f -> %s -> %s/%s", d, r.Str().c_str(), r.P.DigitStr().c_str(), r.Q.DigitStr().c_str()); - - - - } - printf("Tests done"); + }