Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Problem with Expand and Modulus in Mathematica 9?
Replies: 3   Last Post: Dec 29, 2012 3:09 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hanlon

Posts: 892
Registered: 10/29/11
Re: Problem with Expand and Modulus in Mathematica 9?
Posted: Dec 29, 2012 3:08 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Same difference on my MBA running OS X (10.8.2)

$Version

"9.0 for Mac OS X x86 (64-bit) (November 20, 2012)"

r1 = Expand[q1*p1*p2, Modulus -> m]

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


$Version

"8.0 for Mac OS X x86 (64-bit) (October 5, 2011)"

r1 = Expand[q1*p1*p2, Modulus -> m]

1808010833 + 1914426603 n + 640234431 n^2 + 1087084730 n^3


Bob Hanlon


On Fri, Dec 28, 2012 at 5:37 AM, Ralf Hemmecke <hemmecke@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.
>
> Ralf
>





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.