On Jul 14, 3:23 am, Mel <chemmyg...@gmail.com> wrote:
> Hi,
>
> I've been having an issue with a program I've written in sage. I need
> to calculate a polynomial mod 7. When I do this using the command
> line, I don't have any trouble.  Example:
>
> sage: x = var('x')
> sage: y = var('y')
> sage: IntegerPolyRing.<x,y> = ZZ[]
> sage: ideal = -6*x - y
> sage: ideal = IntegerPolyRing(ideal)
> sage: print type(ideal)
> <type
> 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'>
> sage: print ideal%7
> x + 6*y
>
> However, when my program calculates an ideal which is equal to -6*x -
> y and has the type
> 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular',
> it always gets 0 for ideal%7. This happens for every ideal that the
> program calculates. I'm flummoxed. Any ideas as to what might be
> causing this?

We need more information. My guess is that at some point you are
jumping to an ideal with rational coefficients, maybe clearing the
content of a polynomial. In that case 7 is a unit of QQ, so f % 7 will
be zero

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to