Possible error in the addition function

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Possible error in the addition function

Message par compsystems » mar. avr. 18, 2023 6:11 pm

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

parisse
Messages : 5743
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Possible error in the addition function

Message par parisse » mer. avr. 19, 2023 11:50 am

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)

Répondre