increase isprime() efficiency for negatives