#include <iostream>
#include <cmath>

using namespace std;

double arctg(double x, double eps = 1e-10, int n = 0)
{
    double t = pow(x,2*n+1)/(2*n+1)*(1-2*(n%2));
    if (abs(t) > eps) return arctg(x,eps,n+1) + t;
    else return t;
}

int main(int argc, char * argv[])
{
    for(double x = 0; x < 0.7; x += 0.1)
        cout << x << "   " << atan(x) << "  " << arctg(x) << endl;
}
