in reply to Re^3: OT: Finding Factor Closest To Square Root
in thread OT: Finding Factor Closest To Square Root

Programming F(n) for benchmarking purposes is interesting. However, the fastest way of all is probably:
F(n)= integer nearest (1/sqrt 5)[(1+sqrt 5)/2]^n
Yes, but I'd like to understand for myself why various approaches are slower. Which means I have to find a number of independent approaches.
If n is extremely large, the exponentiation might become inaccurate, though.
That's why you use arbitrary precision, like one of the Math::Big* modules.

-QM
--
Quantum Mechanics: The dreams stuff is made of