Fast Algorithm for Division w/ Remainder - Division Revision

  • Context: Undergrad 
  • Thread starter Thread starter mtanti
  • Start date Start date
  • Tags Tags
    Division Revision
Click For Summary
SUMMARY

The discussion focuses on efficient algorithms for performing division with a remainder. The proposed method utilizes the formula Int(x/y) for the quotient and y * Frac(x/y) for the remainder, ensuring rapid computation. For manual calculations, the participants suggest disregarding decimals during division and multiplying the fractional part by y to find the remainder. These techniques are aimed at achieving instant results in computational contexts.

PREREQUISITES
  • Understanding of basic arithmetic operations
  • Familiarity with integer and fractional parts of numbers
  • Knowledge of mathematical functions like Int and Frac
  • Experience with algorithmic thinking for optimization
NEXT STEPS
  • Research efficient algorithms for division in programming languages
  • Explore mathematical functions for integer and fractional calculations
  • Learn about performance optimization techniques in numerical computations
  • Investigate historical methods of division for educational purposes
USEFUL FOR

Mathematicians, software developers, and anyone interested in optimizing division algorithms for computational efficiency.

mtanti
Messages
172
Reaction score
0
Guys I need a fast algorithm to perform division with a remainder. It has to be very fast though...
 
Mathematics news on Phys.org
Something like, x/y could be done like: (where x and y are numbers)

[Int(x/y)]

Then the remainder is: [y*Frac(x/y)]

That'll be pretty much instant (if you want to do it on a computer or something)


If you want to do it with a calculator then just do:

x/y but disregard the decimals

Then to work out the remainder just do:

x/y but disregard the integer before the decimals then multiply them by y


If you want to do it without a calculator then just do it the old fasioned way :)
 
Last edited:

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
20K