pie calcualation project, almost done, just need some help

hey whats up cboard, my teacher gave me a project to do. She wants us to write a program that will calculate this equation: pi *4*(1-1/3+1/5+1/7+1/9-1/11+1/13-1/(2*i)+1/(2*100+i))

she said to calculate for i = 100, 1000, and 100000

I have to use a while loop, and when i do it it works for 100, but for 1000 and 100000 it says inf, is there a way to fix this?

this is what i get in cmd:

PI1 = 5.0482e+060

PI2 = 1.#INF

PI3 = 1.#INF

Press any key to continue . . .

any help is appreciated, i can show my code if requested.