RE: HELP : Mathematica v4 producing erroneous results ! Mathematica3 worked fine...
- To: mathgroup at smc.vnet.net
- Subject: [mg18989] RE: [mg18954] HELP : Mathematica v4 producing erroneous results ! Mathematica3 worked fine...
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Tue, 3 Aug 1999 13:44:35 -0400
- Sender: owner-wri-mathgroup at wolfram.com
slinger at signal.dera.gov.uk 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 !! ----------------------------- I deleted the original code and provide simpler code that causes the problem. I agree that it only comes out wrong when using Fourier. I can't imagine what Fourier would have to do with it! In[1]:= $Version Out[1]= 4.0 for Microsoft Windows (April 21,1999) In[2]:= ideal={0.337385 + 0.6624I, 0.563615 - 0.750732I, 0.869075 + 0.200504I, 0.516709 + 0.938178I}; output=Fourier[ideal] Out[3]= {1.14339 + 0.525175 I, 0.57861 + 0.254401 I, 0.063068 + 0.337729 I, -1.1103 + 0.207495 I} In[4]:= output[[1]]=ideal[[1]]; output Out[5]= {0.337385 + 0.337385 I, 0.57861 + 0.254401 I, 0.063068 + 0.337729 I, -1.1103 + 0.207495 I} ------------------------ Part[output,1] above should be (0.337385 + 0.6624 I). How Bizarre! Ted Ersek