Berlekamp's root finding algorithm