# Ticket #383: 383-fixes.patch

File 383-fixes.patch, 2.4 KB (added by robertwb, 11 years ago)
• ## sage/rings/fraction_field_element.pyx

`diff -r 77c0a081eb72 -r bbd14bd2b542 sage/rings/fraction_field_element.pyx`
 a TESTS:: sage: R = RR['x']     # Inexact, so no reduction. sage: F = Frac(R) sage: from sage.rings.fraction_field_element import FractionFieldElement sage: z = FractionFieldElement(F, 0, R.gen(), coerce=False) sage: z.numerator() == 0
• ## sage/rings/polynomial/polynomial_integer_dense_flint.pyx

`diff -r 77c0a081eb72 -r bbd14bd2b542 sage/rings/polynomial/polynomial_integer_dense_flint.pyx`
 a sage: parent(f.quo_rem(g)[0]) Univariate Polynomial Ring in x over Rational Field sage: f.quo_rem(3) (0, x + 1) sage: (5*x+7).quo_rem(3) (x + 2, 2*x + 1) """
• ## sage/rings/polynomial/polynomial_zmod_flint.pyx

`diff -r 77c0a081eb72 -r bbd14bd2b542 sage/rings/polynomial/polynomial_zmod_flint.pyx`
 a ValueError: leading coefficient must be invertible """ if self.base_ring().characteristic().gcd(\ self.leading_coefficient()) != 1: self.leading_coefficient().lift()) != 1: raise ValueError, "leading coefficient must be invertible" cdef Polynomial_zmod_flint res = self._new() zmod_poly_make_monic(&res.x, &self.x)
• ## sage/rings/residue_field.pyx

`diff -r 77c0a081eb72 -r bbd14bd2b542 sage/rings/residue_field.pyx`
 a raise ZeroDivisionError, "Cannot reduce rational %s modulo %s: it has negative valuation"%(x,p) dx = x.denominator() if x.is_integral() or dx.gcd(p.absolute_norm()) == 1: if x.is_integral() or dx.gcd(ZZ(p.absolute_norm())) == 1: return self.__F(self.__to_vs(x) * self.__PBinv) # Now we do have to work harder...below this point we handle