Գրեք սա: Stable and efficient computation of generalized polar decompositions