Will You expect me to calculate this?!

i = 1 100 ( 1 ) i i ! \large{\sum^{100}_{i=1} \dfrac{(-1)^i}{i!}}

Answer in 5 decimal places


The answer is -0.63212.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Hasmik Garyaka
Sep 21, 2017

P y t h o n Python sum((-1)**x/factorial(x) for x in range(1,100)) Mathematically it is 1/e-1 Taylor sum.

Python is the right boi for this

1
2
3
4
5
6
s = 0
f = 1
for i in range(0, 100):
    f *= (i+1)
    s += ((-1) ** (i+1)) / f
print(s)

Cpp works fine too

Md Zuhair - 3 years, 7 months ago

Log in to reply

Yeah, but python is the right language for handling mini problems, particularly this one. Simple syntax, that is.

Arkajyoti Banerjee - 3 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...