Code example for BigInteger

Methods: subtract

0
            return new Fp(q, x.add(b.toBigInteger()).mod(q));
        } 
 
        public ECFieldElement subtract(ECFieldElement b)
        { 
            return new Fp(q, x.subtract(b.toBigInteger()).mod(q));
        } 
 
        public ECFieldElement multiply(ECFieldElement b)
        { 
            return new Fp(q, x.multiply(b.toBigInteger()).mod(q));
        } 
 
        public ECFieldElement divide(ECFieldElement b)
        { 
            return new Fp(q, x.multiply(b.toBigInteger().modInverse(q)).mod(q));
        } 
 
        public ECFieldElement negate() 
        { 
            return new Fp(q, x.negate().mod(q));