Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4871 > unrolled thread

Re: PolynomialMod

Started byDaniel Lichtblau <danl@wolfram.com>
First post2011-09-12 08:20 +0000
Last post2011-09-12 08:20 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: PolynomialMod Daniel Lichtblau <danl@wolfram.com> - 2011-09-12 08:20 +0000

#4871 — Re: PolynomialMod

FromDaniel Lichtblau <danl@wolfram.com>
Date2011-09-12 08:20 +0000
SubjectRe: PolynomialMod
Message-ID<j4kfcl$kar$1@smc.vnet.net>

----- Original Message -----
> From: "Artur" <grafix@csl.pl>
> To: mathgroup@smc.vnet.net
> Sent: Sunday, September 11, 2011 6:28:34 AM
> Subject: PolynomialMod
> 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

Actually a correct result should be zero. PolynomialRemainder, among other functions, can be used for this.

In[256]:= p1 = (1 + 3 #1 + 5 #1^2 + 5 #1^3 + 5 #1^4 + 
     3 #1^5 + #1^6) &[x]

Out[256]= 1 + 3*x + 5*x^2 + 5*x^3 + 5*x^4 + 3*x^5 + x^6

In[257]:= m1 = (-1 + (-(3/2) - (I*Sqrt[23])/2)*#1 + (3/
         2 - (I*Sqrt[23])/2)*#1^2 + #1^3 & )[x]

Out[257]= -1 + (-(3/2) - (I*Sqrt[23])/2)*x + (3/2 - (I*Sqrt[23])/2)*
  x^2 + x^3

In[272]:= PolynomialQuotientRemainder[p1, m1, x]

Out[272]= {-1 + (-(3/2) + (I*Sqrt[23])/2)*x + (3/2 + (I*Sqrt[23])/2)*
   x^2 + x^3, 0}

Daniel Lichtblau
Wolfram Research

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web