use abs() and diff-based comparisons, since it's signed