MathGroup Archive 1999

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18954] HELP : Mathematica v4 producing erroneous results ! Mathematica3 worked fine...
  • From: slinger at signal.dra.hmg.gb (Chris Slinger)
  • Date: Fri, 30 Jul 1999 01:33:45 -0400
  • Organization: DERA MAlvern
  • Sender: owner-wri-mathgroup at wolfram.com

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.

Please e-mail me with any replies as well as copying them to the newsgroup.

Ta,
-chris
slinger at signal.dera.gov.uk



  • Prev by Date: Re: saving a list.
  • Next by Date: Re: How to prevent the saving dialog box ...
  • Previous by thread: Clippling of polygons within a defined region