#include <stdio.h>
#include <math.h>
#define PI 3.14159265358979323846
#define POINTS 42
int main() {
double x;
double step = (2.0 * PI) / (POINTS - 1);
for (int i = 0; i < POINTS; i++) {
x = -PI + i * step;
// Столбец 1: значение x
printf("%.7f | ", x);
// Столбец 2: Верзьера Аньези (y = 1/(1 + x^2))
double versiera = 1.0 / (1.0 + x * x);
printf("%.7f | ", versiera);
// Столбец 3: Лемниската Бернулли
double lemniscate = -1.0;
if (fabs(x) <= 1.0) {
double under_sqrt = 1.0 + 4.0 * x * x * x * x;
if (under_sqrt >= 0) {
double temp = (sqrt(under_sqrt) - 1.0 - 2.0 * x * x) / 2.0;
if (temp >= 0) {
lemniscate = sqrt(temp);
}
}
}
if (lemniscate >= 0) {
printf("%.7f | ", lemniscate);
} else {
printf("- | ");
}
// Столбец 4: Квадратичная гипербола (y = 1/x^2)
if (fabs(x) > 1e-12) {
double hyperbola = 1.0 / (x * x);
printf("%.7f\n", hyperbola);
} else {
printf("-\n");
}
}
return 0;
}