regular (positive) Pell equation is x^2 - D*y^2 = +1. negative Pell equation is x^2 - D*y^2 = -1. if you have a solution (x,y) to the neg...