It works fine if you insert * between the parentheses -- no implicit
multiplication:

sage: gamma3(a,b,c,j) =
1/((e^(2*pi*i*(a*j/16))-1)*(e^(2*pi*i*(b*j/16))-1)*(e^(2*pi*i*(c*j/16))-1))
sage: sum(gamma3(1,2,9,j) for j in [1..7]).n()
3.00000000000000 - 0.249999999999999*I


On 31 March 2017 at 19:17, saad khalid <[email protected]> wrote:
> Not what sure the issue is, but I couldn't find any typos in what I was
> doing. I define a function:
>
> gamma3(a,b,c,j) =
> 1/((e^(2*pi*i*(a*j/16))-1)(e^(2*pi*i*(b*j/16))-1)(e^(2*pi*i*(c*j/16))-1))
>
> Then I do the sum:
>
> sum(gamma3(1,2,9,j) for j in [1..7]).n()
>
> and this gives me
> 1.98224774759702 + 4.04301409838109*I
>
> This isn't right. I copy almost exactly the same code into wolframalpha
> sum for j from 1 to 7 of
> 1/((e^(2*pi*i*(1*j/16))-1)(e^(2*pi*i*(2*j/16))-1)(e^(2*pi*i*(9*j/16))-1))
> and get
> 3 - .25i
>
>
> What am I doing wrong here? Thanks!
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to