Page 1 sur 1

Possible error in the addition function

Publié : mar. avr. 18, 2023 6:11 pm
par compsystems
Hello

Σ(x^2,x,1,-3) returns -5

the sequence of evaluations is

(-3)^2 + (-2)^2 + (-1)^2 + 0^2 + 1^2=
9+4+1+0+1
13+2 = 15

1^2 + 0^2 + (-1)^2 + (-2)^2 + (-3)^2 =
1 +0 +1 + 4 +9 =
2+13 = 15

Re: Possible error in the addition function

Publié : mer. avr. 19, 2023 11:50 am
par parisse
if a>b, then sum(expr,x,a,b) is defined in a way such that the Chasles relation is still valid:
sum(expr,x,a,b)+sum(expr,x,b+1,c)=sum(expr,x,a,c)