On actually thinking rather than just typing, my comment most
certainly is absurd (A lot of embarrassment here). I noticed that if
the condition >= were used rather than just >, the correct answer was
(almost) obtained. I read your post on variable typing. I rarely
declare variables, (more embarrassment) so I incorrectly assumed that
Long was the same as Double, at least in that the fractional parts
were not discarded. I should've realized this just based on the output
(I'm beet red by now). The incorrect typing would also explain why the
algorithm was not convergent (and sensitive to initial conditions).