MathGroup Archive 1999

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

Search the Archive

Re: HELP : Mathematica v4 producing erroneous results ! Mathematica3 worked fine...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19039] Re: [mg18954] HELP : Mathematica v4 producing erroneous results ! Mathematica3 worked fine...
  • From: "Tomas Garza" <tgarza at mail.internet.com.mx>
  • Date: Tue, 3 Aug 1999 13:45:07 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Chris Slinger [slinger at signal.dra.hmg.gb] wrote:

> We recently upgraded to Mathematica v4 on NT and Solaris from
> Mathematica v3.
> To my horror, I discovered that notebooks which produced good
> results under 3 produced
> errroneous ones under v4.
>
> I have traced the fault, and the code below is distilled down to
> illustrate the
> problem.  Basically, I'm simply assigning complex numbers to an
> array using a
> Do[] (but note the Fourier[], which seems to be necessary to
> cause the bug, for
> some reason).  Unfortunately, the imaginary parts of the result
> are not correct
> - their values should be as in the array "ideal" but are simply
> equal to the
> real parts !!
>
> Can people reproduce it ?  What is going on ?  No comments please
> on style or
> content - remember this is a cut down version of a far larger
> notebook just to
> illustrate the point:
>
> In[1]:= $Version
> Out[1]= "4.0 for Microsoft Windows (April 21, 1999)"
>
> In[2]:= SeedRandom[1];
>         ideal=Table[Random[Complex,{-1-I,+1+I}],{2},{2}]
>
> Out[2]= {{0.337385+0.6624 I], 0.563615-0.750732
> I},{0.869075+0.200504 I,
> 0.516709+0.938178 I}}
>
> In[3]:= output=Fourier[ideal];
>         Do[output[[i,j]]=ideal[[i,j]],{i,1,2},{j,1,2}];
>         output
>
> Out[3]= {{0.337385+0.337385 I, 0.563615+0.563615 I},{0.869075+0.869075 I,
>         0.516709+0.516709 I}}
>
> Why does Out[3] not equal Out[2] ?  In Mathematica v3, there is
> no problem.
>
> The upshot of this is that we have "downgraded" back to
> Mathematica v3 until this is
> sorted out (the fragment of code above is distilled from our
> computer generated
> holography design algorithms).
>
> I've asked Wolfram Support to help out, but am awaiting their comments.

Chris,

Indeed, t'is strange! I checked your results both in Versions 3 and 4 (under
Windows 98), and I obtain the same as you. The funny thing is, Trace[] gives
identical output in both cases. This looks as if it's a real bug. I hope
Wolfram Support will take a close look at it.

Tomas Garza
Mexico City



  • Prev by Date: Re: Help on GroupOpenCloseIcon
  • Next by Date: Re: Packed Arrays in version 4
  • Previous by thread: Re: Help on GroupOpenCloseIcon
  • Next by thread: Re: HELP : Mathematica v4 producing erroneous results ! Mathematica3 worked fine...