binaryGCD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shana07
    Contributor
    • Jan 2007
    • 280

    binaryGCD

    I have questions about binaryGCD from MutableBigInteg er java core class and wish to confirm you guys. I have copied MutableBigInteg er class into my folder. I need to write a MYPROGRAM to call bynaryGCD but I confuse about their modifiers...ple ase advise. thanks a bunch
    1.
    Code:
    class MutableBigInteger {  
    //I ONLY can access this class from my main() when I put both 
    classes (Mutable & MYPROGRAM) in a same package
     (because it's not public)?
    2.
    Code:
    MutableBigInteger hybridGCD(MutableBigInteger b) {
    // This method calls binaryGCD below ...
    3.
    Code:
    private MutableBigInteger binaryGCD(MutableBigInteger v) {
    // Can I directly call this method without first call 
    binaryGCD from MYPROGRAM?
    4.
    Code:
    static int binaryGcd(int a, int b) {
    // How about this one?can directly call this method too?
  • shana07
    Contributor
    • Jan 2007
    • 280

    #2
    Code:
    int a;
    int y = BigInteger.trailingZeroTable[x];
    a >>>= y;
    Am I right by interpreting the 3rd line as shift 3 bit of int a to the right ..but what is y for? kindly share with me about this shift operation pls

    Comment

    Working...