MathGroup Archive 1999

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

Search the Archive

Re: HELP again


Just one more item of interest to make this problem more curious....if you 
define your own function:

f[x_] := x + Fourier[x]
f[x_] := x Fourier[x]

then by replacing output = Fourier[ideal] by output = f[ideal] you get 
the correct final results. 
On the other hand, functions such as :

f[x_] := Fourier[x] + x
f[x_]:= Fourier[x] x
f[x_] := 2 + Fourier[x]

all continue to give the wrong answer.  But you can define a function:

f[x_] := x Fourier[x] / x

that obviously just gives Fourier[x] as an output, but now you will get 
the right answer!!  Kind of strange results that I haven't been able to 
figure out...good luck.  RF

>>> Chris Slinger <slinger at> 07/29/99 11:33PM >>>
We recently upgraded to Mathematica v4 on NT and Solaris from Mathematica 
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 
- their values should be as in the array "ideal" but are simply equal to 
real parts !!

Can people reproduce it ?  What is going on ?  No comments please on style 
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];

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];

Out[3]= {{0.337385+0.337385 I, 0.563615+0.563615 I},{0.869075+0.869075 
        0.516709+0.516709 I}}

Why does Out[3] not equal Out[2] ?  In Mathematica v3, there is no 

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 
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.

slinger at

  • Prev by Date: equaltity of lists
  • Next by Date: International Mathematica Symposium
  • Previous by thread: Re: Re: Re: equaltity of lists
  • Next by thread: International Mathematica Symposium