MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with Expand and Modulus in Mathematica 9?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129293] Re: Problem with Expand and Modulus in Mathematica 9?
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sat, 29 Dec 2012 15:12:46 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20121228103703.883C66873@smc.vnet.net>

On Dec 28, 2012, at 5:37 AM, Ralf Hemmecke <hemmecke at gmail.com> wrote:

> Can someone confirm that the following code gives different results for r1 for different versions of Mathematica and different operating systems. Or is this just an issue of my installation?
>
> ---BEGIN CODE---
> m = 2147483629
> q = -285170499
> q1 = 1/q
> q2 = PowerMod[q,-1,m]
> Mod[q*q2, m]
> p1 = 527660967 + 978421595*n
> p2 = 1999783961 + 1587123368*n + 1965760814*n^2
> r1 = Expand[q1*p1*p2,Modulus->m]
> r2 = Expand[q2*p1*p2,Modulus->m]
> s1 = Expand[Expand[q1*p1*p2],Modulus->m]
> s2 = Expand[Expand[q2*p1*p2],Modulus->m]
> ---END CODE
>
> Value of r1
> Mathematica 8
>    1808010833 + 1914426603*n + 640234431*n^2 + 1087084730*n^3
>
> Mathematica 9 (64bit Debian 6.0)
>    1651432217 + 309632549*n + 188919829*n^2 + 1597920481*n^3
>
> Mathematica 9 (32bit Debian 6.0, 64bit CPU)
>    1823075307 + 33175446*n + 2081129601*n^2 + 580053941*n^3
>
> The values of r2, s1, s2 agree with that of r1 as computed in Mathematica 8.
>

Mathematica 9.0.9 under 64-bit Mac OS X 10.8.2:

  r1
1651432217+309632549 n+188919829 n^2+1597920481 n^3

---
Murray Eisenberg                                    
murray at math.umass.edu
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower            phone 413 549-1020 (H)
University of Massachusetts                               413 545-2838 (W)
710 North Pleasant Street                         fax   413 545-1801
Amherst, MA 01003-9305








  • Prev by Date: Re: Modeling of NFL game results
  • Next by Date: Re: format legend?
  • Previous by thread: Re: Problem with Expand and Modulus in Mathematica 9?
  • Next by thread: Re: Problem with Expand and Modulus in Mathematica 9?