Created attachment 47792 [details] KAlgebra script with the summation Version: unspecified (using KDE 4.4.3) OS: Linux There are some problems with summations: - Sometimes I can't define them (see Steps to reproduce) - The results from summations are not correct Thanks in advance Reproducible: Always Steps to Reproduce: Type this into KAlgebra console: comb:=(n, i)->factorial(n)/(factorial(i)*factorial(n-i)) p:=10^-2 pu:=n->sum(comb(n,i)*p^(n-i)*(1-p)^i:i=(floor((n-1)/2))..n) -> Can't define pu:=n->sum(comb(n,i)*p^(n-i)*(1-p)^i:i=0..(floor((n-1)/2))) -> OK Actual Results: If I type: pu(5) I get: 25.1510550449 Expected Results: The expected result is: pu5:=comb(5,0)*p^5*(1-p)*0 + comb(5,1)*p^4*(1-p)*1 + comb(5,2)*p^3*(1-p)*3 2.97495e-05 OS: Linux (x86_64) release 2.6.33-ARCH Compiler: gcc
SVN commit 1206274 by apol: Remove some wrong stack depth calculation. Fixes the following bug, together with the last commit. (at last!) BUG: 241047 M +7 -9 analyzer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1206274