For instance, for N=1000, the factorization is 2**3 * 5**3. Your method gives 2**2 * 5**2 = 100, while the closest factor to the square root is 5**2 = 25 (paired with 40). I'd be happy with either 25 or 40.
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re^4: OT: Finding Factor Closest To Square Root
by QM
in thread OT: Finding Factor Closest To Square Root
by QM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |