#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
double xb, xe, dx, e;
cout << "Хнач? "; cin >> xb;
cout << "Хкон? "; cin >> xe;
cout << "Шаг? "; cin >> dx;
cout << "Точность? "; cin >> e;
cout << "\n x | fx | n | ln((1+x)/(1-x)\n"
"------+----------+-----+----------------\n";
for (double x = xb; x < xe + dx / 2; x += dx) {
double fx = 2*x, px = x, fxi = 2*x;
int n = 0;
while (fxi > e) {
++n;
px = px*x*x;
fxi = 2*px / (2*n + 1);
fx += fxi;
}
cout << fixed << setprecision(2) << setw(5) << x << " | "
<< setprecision(6) << fx << " | " << setw(3) << n << " | "
<< setprecision(6) << log((1 + x) / (1 - x)) << endl;
}
}