[sage-support] Re: Evaluation of sum function in callable expression

2017-12-26 Thread slelievre
Tue 2017-12-26 08:04:59 UTC, BDesco: > Sorry for my late reply. Thanks for your help. > unhold works fine but I could not find any documentation on it. You can get the documentation of .unhold by using ".unhold?": sage: k, n = SR.var('k n') sage: s = sum(n^5, n, 0, k, hold=True) sa

[sage-support] Re: Evaluation of sum function in callable expression

2017-12-26 Thread slelievre
Tue 2017-12-26 08:03:44 UTC, BDesco: > > for n=3. I get binomial(-1,0) = 1 > I don't know why. You can look at the documentation of binomial: sage: binomial? You will see it indicates that the definition is extended: We extend this definition to include cases when [...] and as a resu

[sage-support] Re: Evaluation of sum function in callable expression

2017-12-26 Thread BDesco
Sorry for my late reply. Thanks for your help. > unhold works fine but I could not find any documentation on it. > Bart -- 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 a

[sage-support] Re: Evaluation of sum function in callable expression

2017-12-26 Thread BDesco
> > for n=3. I get binomial(-1,0) = 1 > I don't know why. Secondly the sum stays 20. But when I calculate the terms I get 5+5+5+7. At least both results should be the same. Both 20 or both 22. Thanks. -- You received this message because you are subscribed to the Google Groups "sage-support"

[sage-support] Re: Evaluation of sum function in callable expression

2017-12-18 Thread Ralf Stephan
Also I think that results other than 20 are wrong for both formulae because the binomial part always amounts to binomial(2-n,3-n), i.e. zero, and you're just adding 5 four times. But I'm not 100 per cent on that. -- You received this message because you are subscribed to the Google Groups "sag

[sage-support] Re: Evaluation of sum function in callable expression

2017-12-17 Thread Ralf Stephan
BTW instead of unhold() you can also use n() to get the value of an unevaluated definite sum. -- 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 sage-support+unsub

[sage-support] Re: Evaluation of sum function in callable expression

2017-12-17 Thread Ralf Stephan
This looks like a bug, you get the sum unevaluated. You can as a workaround evaluate it manually. I get: print(h3(3,h3n=5).unhold()) 20 Thanks for the report. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and