def __truediv__(self, other): """ self / other The result is a rational function. """ return ratfunc.RationalFunction(self, other)
def _get_zero(self): "getter for zero" if self._zero is None: import nzmath.poly.ratfunc as ratfunc poly_one = self.basedomain.one poly_zero = self.basedomain.zero self._zero = ratfunc.RationalFunction(poly_zero, poly_one) return self._zero
def setUp(self): self.f = ratfunc.RationalFunction(uniutil.polynomial({ 3: 1, 0: 1 }, Z), uniutil.polynomial({ 2: 1, 0: -2 }, Z)) self.f2 = self.f self.f3 = ratfunc.RationalFunction( uniutil.polynomial({ 4: 1, 1: 1 }, Z), uniutil.polynomial({ 3: 1, 1: -2 }, Z))
def _get_one(self): """ getter for one """ if self._one is None: import nzmath.poly.ratfunc as ratfunc poly_one = self.basedomain.one self._one = ratfunc.RationalFunction(poly_one, poly_one) return self._one
def createElement(self, *seedarg, **seedkwd): """ Return an element of the field made from seed. """ import nzmath.poly.ratfunc as ratfunc return ratfunc.RationalFunction(*seedarg, **seedkwd)