int main(void) {
double a, b, h, n2, r, u, v;
int k, k2, m, n;

printf();

n = 400;

h = 1;
for (k = 2; k <= n; k++) {
   h += 1.0 / k;
}

a = log(n +.5 + 1.0 / (24*n));

printf(, h);
printf(, h - a, n);


printf();

n = 21;

double s[] = {0, n};
r = n;
k = 1;
do {
   k += 1;
   r *= (double) n / k;
   s[k & 1] += r / k;
} while (r > eps);

printf(, s[1] - s[0] - log(n), k);


printf();

n = 5;

a = 1;
h = 1;
n2 = pow(2,n);
r = 1;
k = 1;
do {
   k += 1;
   r *= n2 / k;
   h += 1.0 / k;
   b = a; a += r * h;
} while (fabs(b - a) > eps);
a *= n2 / exp(n2);

printf(, a - n * log(2), k);


printf();

n = 13;

a = -log(n);
b = 1;
u = a;
v = b;
n2 = n * n;
k2 = 0;
k = 0;
do {
   k2 += 2*k + 1;
   k += 1;
   a *= n2 / k;
   b *= n2 / k2;
   a = (a + b) / k;
   u += a;
   v += b;
} while (fabs(a) > eps);

printf(, u / v, k);


printf();

double B2[] = {1.0,1.0/6,-1.0/30,1.0/42,-1.0/30,\
 5.0/66,-691.0/2730,7.0/6,-3617.0/510,43867.0/798};
m = 7;
if (m > 9) return(0);

n = 10;


h = 1;
for (k = 2; k <= n; k++) {
   h += 1.0 / k;
}
printf(, h);

h -= log(n);
printf(, h);


a = -1.0 / (2*n);
n2 = n * n;
r = 1;
for (k = 1; k <= m; k++) {
   r *= n2;
   a += B2[k] / (2*k * r);
}

printf(, a, h + a, n + m);

printf();
}