It seems to work well as far as I can verify it, with one exception. Like one of my other attempts, if N is prime, it produces N as the nearest factor rather than 1.
However, being recursive, it suffers in performance one you really start making it work.
Try 8585937356. I get a nearest factor of 4 with my dumb crunch code. I gave up waiting for your's :)
In reply to Re^7: OT: Finding Factor Closest To Square Root
by BrowserUk
in thread OT: Finding Factor Closest To Square Root
by QM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |