added int type conversion to modp

and fixed elliptic point comparison