I'd just use a constant.Quote:

I don't care - would just do 4 * arctan(1.0) anyway.

Soma

Printable View

- 08-08-2012phantomotapQuote:

I don't care - would just do 4 * arctan(1.0) anyway.

Soma - 08-08-2012std10093
- 08-08-2012stahta01
- 08-08-2012Elkvis
I might do the loop more like this:

Code:`double numerator = -1.0`

double taylor = 1.0;

for (int i = 3; i < terms; i+=2, numerator *= -1)

{

taylor += numerator/i;

}