Algorithmic number theory, Volume I: ecient algorithms (1996)

by E Bach, J Shallit