Oracle.connect(new TestRationalP().getClass(),
"connect.properties");
RationalP p = new RationalP();
NUMBER n = new NUMBER(5);
NUMBER d = new NUMBER(10);
Rational r = new Rational();
r.setNumerator(n);
r.setDenominator(d);
NUMBER f = p.toreal(r);
System.out.println("real value: " + f.stringValue());
NUMBER g = p.gcd(n, d);
System.out.println("gcd: " + g.stringValue());
Rational s = p.plus(r, r);
System.out.println("sum: " + s.getNumerator().stringValue() +
"/" + s.getDenominator().stringValue());
Rational[] sa = {s};
p.normalize(sa);
s = sa[0];
System.out.println("sum: " + s.getNumerator().stringValue() +
"/" + s.getDenominator().stringValue());