public Rational add ( Rational val ) { BigInteger num = a . multiply ( val . b ) . add ( b . multiply ( val . a ) ) ; BigInteger deno = b . multiply ( val . b ) ; return ( new Rational ( num , deno ) ) ; }
Add another fraction .