Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

can't round directly a sum

Hi

I'm reporting this, but I'm not sure if there is a problem or not !

var('n,N',domain='integer')
var('beta,theta',domain='real')


tbNum=[theta==pi/6,beta==pi/8,N==2]
rd=7
S=sum((-1)^n*(beta + theta)^(2*n)/factorial(2*n), n, 0, N)
show(S,"\t numerical with n():\t",S.subs(tbNum).n())
show("\t numerical first n() then round : \t",round(S.subs(tbNum).n(),rd))
show("round directly : ",round(S.subs(tbNum),rd))