MathGroup Archive 2009

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

Search the Archive

Re: Help with a possible bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98941] Re: Help with a possible bug
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Wed, 22 Apr 2009 05:12:32 -0400 (EDT)
  • References: <gsivea$9bt$1@smc.vnet.net>

And the results for my wife's mac:

"7.0 for Mac OS X x86 (64-bit) (February 19, 2009)":

Out[8]= {51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, \

Out[9]= {143167313, 143167313, 143167313, 143167313, 143167313,
143167313, 143167313, \

Out[10]= {319157559, 319157559, 319157559, 319157559, 319157559,
319157559, 319157559, \

It goes wrong even on a fresh kernel.

Cheers --Sjoerd

On Apr 21, 1:11 am, M8R-lj1... at mailinator.com wrote:
> At work we seem to have stumbled on a strange bug between Table and
> Part.  We can reproduce the bug on differently configured Mac and
> Linux boxes.  I tried Wolfram support, but they claim they cannot
> reproduce the bug.  So I was hoping someone could try it out and
> report their results.    Thanks in advance to all volunteers.
>
> For us, the bug is new in 7.0.1. It does not show up in version 6.
> To reproduce it, fill up a 17 x 267 matrix with 3s.  Compute the sum
> of some of the columns and you get the result 51 (17 x 3).  But if one
> computes the sum for the last few columns, the result is completely
> off.  The bug seems to arise from the interaction of optimizations  i=
n
> Table and the use of All inside of Part.
>
> ------------  code
>
>   mat = Table[3, {i, 1, 17}, {j, 1, 267}];
>
>   sum = Table[Total[mat[[All, j]]], {j, 1, 249}]
>
>   sum1 = Table[Total[mat[[All, j]]], {j, 1, 252}];
>   sum2 = Table[Total[mat[[All, j]]], {j, 1, 252}]
>
> ------------  end code
>
> If you look at sum1, it will be correct on a fresh copy of the
> Kernel.  The problem only arise from the second time on.
>
> Thanks,
>
> Papin
>
> Email: ImportString["cGFwaW5AY294Lm5ldA==", "Base64"]



  • Prev by Date: Re: Mathematica for gifted elementary school children
  • Next by Date: Re: Help with Speeding up a For loop
  • Previous by thread: Re: Help with a possible bug
  • Next by thread: Re: Help with a possible bug