>>>With all the complex numbers, exps, logs, sins, coss in the code I wonder if this is the formula? (Not that I understand a word of the link, but I know you are a matematician)
http://vision.stanford.edu/~birch/projective/node14.html>>
>>This isn't related to the function at all, except by the author. Although this text was sort of difficult to follow because of some weird notation (weird being in the eye of beholder and in the lack of the relevant pages of the book where they'd introduce the syntax :). This is still happening in the complex plane, from what I can see, but while the function requires iterative computation, this formula would be quite straightforward.
>
>Yes, it was a long shot, I thought the iteration was for the first parameter is an array of complex, isn't it?
The first parameter (array) contains the coefficients of the polynomial, its order, x and a return parameter which tells how many iterations were performed. I still don't see how does it return a value - probably looks for a zero, which is why the x is also a return parameter. The calculation which adjusts the value of x is quite interesting, it seems to jump all over the place. I'd really have to redo this code to know what it actually does, and it looks like a whole day of work.