Redirected polarity() to sgn()

TODO: remove all implementations of POLARITY() and replace with sgn()