iv'e tried using a for loop to filter out the null and nan values but still the nan value is added to the listview. this is just a part where the calculation is done.
double rs1 = (qz1 * c11) + (asg1 * c22) + (sw1 * c33) + (prj1 * c44) + (pxm1 * c55) + (atti1 * c66);
if(rs1 != double.NaN || rs1 != null)
{
lst.SubItems.Add(Math.Round(rs1, 2).ToString());
}
else
{
lst.SubItems.Add("0");
}