you can use 0 instead, 'cuz 1-1/x = 0/x = 0, if you need to use it, it's also equal to: 0/4/4/8/8... forgot about priority of operators. Will this work:
1 2 3 4 5 6 7
constunsigned x = 9;
double al = 1;
for (unsigned i = 1; i <= x; ++i)
if (i % 2)
al -= 1.0 / (2 * i + 1); // 1.0 is important
else
al += 1.0 / (2 * i + 1); // 1.0 is important