Real sum gives complex result -> Bug in Mathematica?

*To*: mathgroup at smc.vnet.net*Subject*: [mg44493] Real sum gives complex result -> Bug in Mathematica?*From*: nsng0203 at web.de (Norbert Schuch)*Date*: Wed, 12 Nov 2003 08:01:41 -0500 (EST)*Organization*: GWDG, Goettingen*Sender*: owner-wri-mathgroup at wolfram.com

Hi, the following problems appears with Mathematica 4,0, 4.1, 4.2: | In[1]:= Sum[Sin[Pi*k/n]*Sin[Pi*(k-d)/n],{k,d,n}]/.{d->10,n->100}//N | | Out[1]= 39.4497 - 25.4353 I | | In[2]:= Sum[Sin[Pi*k/n]*Sin[Pi*(k-d)/n],{k,d+1,n}]/.{d->10,n->100}//N | | -14 | Out[2]= 47.7141 - 6.11986 10 I | | In[3]:= Sum[Sin[Pi*k/n]*Sin[Pi*(k-d)/n],{k,10,100}]/.{d->10,n->100}//N | | Out[3]= 47.7141 Output 2 and 3 are correct, while output 1 is complex although the sum is over real contributions! (The difference between 1 and 2 is zero, as the second sine vanishes.) What is the problem? Thanks, Norbert

**Follow-Ups**:**Re: Real sum gives complex result -> Bug in Mathematica?***From:*"Bruce W. Colletti" <bcolletti@compuserve.com>