question: public static cuComplex cuCdiv ( cuComplex x , cuComplex y ) { cuComplex quot ; float s = ( ( float ) Math . abs ( cuCreal ( y ) ) ) + ( ( float ) Math . abs ( cuCimag ( y ) ) ) ; float oos = 1.0f / s ; float ars = cuCreal ( x ) * oos ; float ais = cuCimag ( x ) * oos ; float brs = cuCreal ( y ) * oos ; float bis = cuCimag ( y ) * oos ; s = ( brs * brs ) + ( bis * bis ) ; oos = 1.0f / s ; quot = cuCmplx ( ( ( ars * brs ) + ( ais * bis ) ) * oos , ( ( ais * brs ) - ( ars * bis ) ) * oos ) ; return quot ; }
target:  Returns the quotient of the given complex numbers.<br /> <br /> Original comment:<br /> <br /> This implementation guards against intermediate underflow and overflow by scaling. Such guarded implementations are usually the default for complex library implementations, with some also offering an unguarded, faster version.