Hi!

We know that (1-x)^n = Sum_{k=0}^n C_k^n (-x)^k.

Now, suppose we do not know that the sum on the right can be evaluated using the simple formula on the left, and would like to compute it directly.

Then, for x=0.998173 the code produces a negative answer for value of n as low as n=7

Is there any solution to this?

The reason I am asking is that I have to compute a sum of the finite alternatig series which looks similar to the above exept that ther is no closed form solution as in the above case, and it doesn't seem to be possible to recast a problem so that we do not have alternating series

Thanks!