Re: PolynomialMod
- To: mathgroup at smc.vnet.net
- Subject: [mg121370] Re: PolynomialMod
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Mon, 12 Sep 2011 04:23:36 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201109111128.HAA12187@smc.vnet.net>
There seems to be something wrong with your question, since your first polynomial is exactly divisible by the second, hence PolynomalMod must be 0. You can convince yourself by straight forward multiplication: f = 1 + 3 x + 5 x^2 + 5 x^3 + 5 x^4 + 3 x^5 + x^6; p = -1 + (-(3/2) - (I Sqrt[23])/2) x + (3/2 - (I Sqrt[23])/2) x^2 + x^3; q=PolynomialQuotient[f,p,x] x^3+(3/2+(I Sqrt[23])/2) x^2+(-(3/2)+(I Sqrt[23])/2) x-1 Now, multiplying back: p*q==f//Simplify True There is no mistake here - you can check it be hand. So there seem to be just two possibilities. One is that your mistyped one or both of your polynomials (I think I copied them correctly and only replaced # by x). Second that you mean by "reduce" something different from "divide". But what? Andrzej Kozlowski On 11 Sep 2011, at 13:28, Artur wrote: > Dear Mathematica Gurus, > > Who is able help me to write Mathematica procedure which will be > improovment of recent PolynomialMod. > > If we do > PolynomialMod[ 1 + 3 #1 + 5 #1^2 + 5 #1^3 + 5 #1^4 + 3 #1^5 + #1^6, -1 + > 2 #1^2 + #1^3] > result is OK > 1 + 6 #1 + 6 #1^2 > > But if we do > PolynomialMod[1 + 3 #1 + 5 #1^2 + 5 #1^3 + 5 #1^4 + 3 #1^5 + #1^6, -1 + > (-(3/2) - (I Sqrt[23])/2) #1 + (3/2 - (I Sqrt[23])/2) #1^2 + #1^3] > Result is wrong > good should be > -2 + (-(1/2) - (I Sqrt[23])/2) x + x^2 > > Who is able to write good one procedure e.g. PolMod to automatic > reduction of any degree polynomials by polynomial smaller degree? > > Best wishes > Artur Jasinskii >
- References:
- PolynomialMod
- From: Artur <grafix@csl.pl>
- PolynomialMod