Check out my first novel, midnight's simulacra!

Tonelli-Shanks Algorithm