check overflow and negative for hash_number