don't use equals in sign and abs because it can be very slow

Thanks to Mario Pernici for finding good examples of when the
method used in equals is going to take a long time to solve.
The discussion that I had with him is on the PR page.