Thanks to visit codestin.com Credit goes to dlmf.nist.gov
where k,k′ and the square roots are real and positive when the lattice is rectangular; otherwise they are determined by continuity from the rectangular case.