Avoid M_NAN + M_NAN in complex functions.