This page links to six demonstrations of the Tonelli-Shanks modular square root algorithm applied to prime factorizations over Z[i], Z[w], and Z[2i].

First, this is an excerpt from Henri Cohen's A Course in Computational Algebraic Number Theory, Springer-Verlag, 1993, that explains the Tonelli-Shanks algorithm and the Algorithm of Cornacchia:

pp. 30-31

pp. 32-33

pp. 34-35

pp. 36-37

 

Tonelli-Shanks 7+15i

 

Tonelli-Shanks 9+14i

Tonelli-Shanks 6+15w

Tonelli-Shanks 17+12w

Tonelli-Shanks 7+12[2i]

Tonelli-Shanks 11+16[2i]