optimize neg and com operations

A tasty little optimization described in the comments.