answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What is the best algorithm for b multiplying integers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is an algorithm for multiplying rational numbers?

The algorithm is A/B * C/D = AB/CD.


What is the algorithm for dividing integers?

Procedure: 1. Divide the integers like you always do. 2. Follow these rules: (Note:+ is a positive integer, - is a negative integer and * is the multiplication symbol) a.+*+=+ b.+*-=- c.-*+=- d.-*-=+ Follow these rules and you will have your answer in no time.


If a and b integers and a b then a b?

If a and b are integers, then a times b is an integer.


What does radical conjugates mean?

if you have the expression a + b*sqrt(c), the radical conjugate is a - b*sqrt(c). this is important because multiplying those two expressions together gives you an integer if a, b, and c are integers.


How do you write a algorithm that gives the GCD of two given numbers?

algorithm GCD (a, b) is:while (a b) doif a > b then a := a - b else b := b - aend whilereturn a


Why does multiplying negative integers by negative integers result in positive integers?

Any negative integer can be factored to -1 times its positive value. Because negative one times itself is positive one, when multiplied by each other they cancel out. So if you're multiplying a negative integer A by a negative integer B. Replace A and B with -1*|A| and -1*|B| (You can do this because you know A and B are negative), and use the distributive property to rearrange them. Now you can see the -1*-1 term and equate it to 1, leaving only the |A| and |B| behind. Because two positive numbers multiplied together are always positive, the result will always be positive. Represented algebraically, as long as A and B are negative integers, the following is true: AB = -1|A|*-1|B| = -1*-1|AB| = |AB|.


What is an algorithm for subtracting integers?

One way to do it might be like this:Get / store the integer to be subtracted from, and the integer to subtract-we'll call them A and B.Decrement A and B by 1 each.If B = 0, stop. A now contains the result.If B ≠ 0, decrement A and B by one again.Repeat from step 3.


Why is the sum and product of two rational numbers is rational?

A rational number can be stated in the form a/b where and b are integers. Adding or multiplying such numbers always gives another number that can be expressed in this form also. So it is also rational.


How do you create an algorithm that will read the values of A and B and will determine which has the higher value?

The algorithm can be easily stated as follows: if A is greater than B then return A, otherwise return B.


Are all negative rational numbers integers?

No, they are not because fractions can be negative also. fractions aren't integers


Write an algorithm for addition of two integer?

1.Declare three variables asint a,b,c;2.Get the Input of two numbers of Integers from the user:scanf("%d",&a);scanf("%d",&b);3.add a and b and store the result in c4. print c


What is greedy algorithm and its sample programs?

A greedy algorithm will return as many results as possible. It depends on the algorithm what that means.An example would be in regular expressions. The regexp "/(a.+b)/" searches for a string that starts with "a" and ends with "b". So in the string "There's a bunny in the basket" a greedy algorithm would find "a bunny in the b", while a non-greedy search would find "a b".