IntegerRing
represents
the ring Integer
, which is defined
in a Pyrex extension module that wraps GMP integers
(the mpz_t
type in GMP).
The class IntegerRing
represents the
ring of integers. This class
is available by default from the SAGE interpreter.
>>> Z = IntegerRing(); Z Integer Ring >>> Z.characteristic() 0 >>> Z.is_field() False
IntegerRing
are the same.
To create an Integer
, coerce either
a Python integer, or a string.
>>> a = Z(1234); b = Z(5678); print a, b 1234 5678 >>> type(a) <type 'integer.Integer'> >>> a + b 6912 >>> Z('94803849083985934859834583945394') 94803849083985934859834583945394