View Single Post
Old 2020-08-11, 17:01   #16
Batalov's Avatar
Mar 2008

223228 Posts
I am always keen to learn some crowd psychology.
The question that I had is - why do folks get compelled to download a code that does something wrongly? We already know that it does its own job wrongly. What does it matter how it does it? One wants to marvel the coding style or the number of lines or something?
Very curious.

The algorithm starts with N, P and Q, then...
Originally Posted by SarK0Y View Post
At some point, it seemed utterly impossible. But here we go..

Actually, algo consists of three stages..

it picks initial (probable) Z’s (pZ_L and pZ_R) up (Z = P + Q, N = P*Q)
Full stop, don't need to read further.
The algorithm now computed P*Q and if it equals N: stop, all done.
Else: stop because there is no point in going further :-)

Arguing that it is better because "it doesn't use division and (untrue) doesn't use modular arithmetic" is false because it competes with the Algorithm 2: "Compute P*Q. If equal N, stop. Done" and loses.
Batalov is offline