use isnan from CMath