Fixed bug in polarity code

float formatting versus int formatting