Package sage :: Package rings :: Module integer_mod :: Class IntegerMod
[show private | hide private]
[frames | no frames]

Type IntegerMod

object --+    
         |    
   Element --+
             |
            IntegerMod


Method Summary
  __init__(self, parent, value)
  __abs__(self)
  __add__(self, right)
  __cmp__(self, other)
  __div__(self, right)
  __float__(self)
  __int__(self)
  __invert__(self)
  __long__(self)
  __mod__(self, right)
Returns the int got by reducing a lift of this modulo right.
  __mul__(self, right)
  __neg__(self)
  __pos__(self)
  __pow__(self, right)
  __radd__(self, left)
  __rdiv__(self, left)
  __repr__(self)
  __rmul__(self, left)
  __rsub__(self, left)
  __sub__(self, right)
  copy(self)
  crt(self, other)
Use the Chinese Remainder Theorem to find an element of the integers modulo the product of the moduli that reduces to self and to other.
  is_square(self)
  lift(self)
  modulus(self)
  order(self)
Returns the order of self.
  rational_reconstruction(self)
EXAMPLES:
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__mod__(self, right)

Returns the int got by reducing a lift of this modulo right.

crt(self, other)

Use the Chinese Remainder Theorem to find an element of the integers modulo the product of the moduli that reduces to self and to other. The modulus of other must be coprime to the modulus of self.

order(self)

Returns the order of self.
Overrides:
sage.ext._element.Element.order

rational_reconstruction(self)

EXAMPLES:
>>> from integer_mod_ring import *
>>> R = IntegerModRing(97)
>>> a = R(2) / R(3)
>>> a
33

>>> a.rational_reconstruction()
2/3

Generated by Epydoc 2.1 on Mon May 9 17:57:02 2005 http://epydoc.sf.net