A simple and general prescription for evaluating unambiguously the sign of the grand-canonical trace of quasi-particle statistical density operators (the so-called sign ambiguity in taking the square root of determinants) is given. Sign ambiguities of this kind appear in the evaluation of the grand-canonical partition function projected to good quantum numbers (angular momentum, parity and particle number) in the Hartree-Fock-Bogoliubov approximation at finite temperature, since traces are usually expressed as the square root of determinants. A comparison is made with the numerical continuity method.