Загрузка данных


#include <math.h>
#include <stdio.h>

int main(void) {
    const double pi = 3.14159265358979323846;
    double shag = 2.0 * pi / 41.0;

    for (int i = 0; i < 42; i++) {
        double x = -pi + shag * i;
        double x2 = x * x;
        double y1 = 1.0 / (1.0 + x2);
        double pod_kornem = sqrt(1.0 + 4.0 * x2) - x2 - 1.0;

        printf("%.7f | %.7f | ", x, y1);

        if (pod_kornem > 0.0) {
            printf("%.7f | ", sqrt(pod_kornem));
        } else {
            printf("- | ");
        }

        if (x != 0.0) {
            printf("%.7f\n", 1.0 / x2);
        } else {
            printf("-\n");
        }
    }

    return 0;
}