473,503 Members | 13,285 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

binaryGCD

281 Contributor
I have questions about binaryGCD from MutableBigInteger java core class and wish to confirm you guys. I have copied MutableBigInteger class into my folder. I need to write a MYPROGRAM to call bynaryGCD but I confuse about their modifiers...please advise. thanks a bunch
1.
Expand|Select|Wrap|Line Numbers
  1. class MutableBigInteger {  
  2. //I ONLY can access this class from my main() when I put both 
  3. classes (Mutable & MYPROGRAM) in a same package
  4.  (because it's not public)? 
2.
Expand|Select|Wrap|Line Numbers
  1. MutableBigInteger hybridGCD(MutableBigInteger b) {
  2. // This method calls binaryGCD below ...
  3.  
3.
Expand|Select|Wrap|Line Numbers
  1. private MutableBigInteger binaryGCD(MutableBigInteger v) {
  2. // Can I directly call this method without first call 
  3. binaryGCD from MYPROGRAM?
  4.  
4.
Expand|Select|Wrap|Line Numbers
  1. static int binaryGcd(int a, int b) {
  2. // How about this one?can directly call this method too?
  3.  
Mar 24 '07 #1
1 1131
shana07
281 Contributor
Expand|Select|Wrap|Line Numbers
  1. int a;
  2. int y = BigInteger.trailingZeroTable[x];
  3. 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
Mar 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
3663
by: damian birchler | last post by:
I can't find functions lcm and gcd in anywhere in the standard library. Do they exist? If not, is there a place where I can get a good implementation? Thanks in advance
19
6429
by: shana07 | last post by:
I don't understand about this program is doing. Could someone please tell me what it is about. Because I have gcd function in one program that calls this function. Thanks a lot switch (opcode) {...
8
1314
by: shana07 | last post by:
I can't understand this code...I need somebody to help me to understand this code.please. This is from MutableBigInteger java core class.. What is this mean? >> // Special case one word numbers...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.