Changes to TPowerAlgorithm. Now it works in the same way as the Matlab one. Initialisation of the x vector was to blame.