Fast algorithm for modular department (deposit)

I'm seeking a rapid algorithm to execute department of lots (by hand). Typical lengthy department simply isn't quickly adequate for my demands.

In a lot of these instances, I'm just seeking the modulus/remainder of the department, so if there is a rapid algorithm especially for this objective, it would certainly be adequate. (But, if there is a means to get the ratio too, it would certainly additionally aid).

Edit : Now that I think of it, the algorithm for artificial division/synthetic replacement entails no department (and also addition/multiplication is commonly less complicated and also faster than department). Exists probably a brilliant means to adjust this algorithm for rapid mathematical department?

0
2019-05-18 23:12:54
Source Share
Answers: 1

The key suggestion is to make an excellent price quote of the ratio based upon one of the most substantial figures of the reward and also divisor. This is defined carefully in the department algorithm offered in area 4.3.1 of Knuth, The art of computer system shows, Volume 2, Seminumerical algorithms - the typical reference. Comparable suggestions (Lehmer at al.) are made use of in maximizing the calculation of the rest series in the Euclidean algorithm for the GCD, which is additionally defined in Knuth is publication, viz. p. 345, area 4.5.2.

0
2019-05-21 08:17:14
Source