Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Source[kth].ref() += (1 - kth)/(kth + 1)* pow(a[n], kth + 2)*g*w[n];
上面要改为
Source[kth].ref() += (1.0 - kth)/(kth + 1.0)* pow(a[n], kth + 2)*g*w[n];
否则 (1 - kth)/(kth + 1)在kth大于1的时候为0
(1 - kth)/(kth + 1)
kth