<commit_before>#include <math.h>

int cor(int r, double* x, int n) {
    int result = 0;
    int i, j;
    double dx;
    i = n;
    while (i --> 0) {
        j = i;
        while (j --> 0) {
            dx = x[i] - x[j];
            if (r > fabs(dx)) {
                result ++;
            }
        }
    }
    return result * 2;
}

int cor2(int r, double* x, double* y, int n) {
    int result = 0;
    int i, j;
    double dx, dy;
    i = n;
    while (i --> 0) {
        j = i;
        while (j --> 0) {
            dx = (x[i] - x[j]);
            dy = (y[i] - y[j]);
            if (r > sqrt(dx*dx + dy*dy)) {
                result ++;
            }
        }
    }
    return result * 2;
}

int cor3(int r, double* x, double* y, double* z, int n) {
    int result = 0;
    int i, j;
    double dx, dy, dz;
    i = n;
    while (i --> 0) {
        j = i;
        while (j --> 0) {
            dx = (x[i] - x[j]);
            dy = (y[i] - y[j]);
            if (r > sqrt(dx*dx + dy*dy + dz*dz)) {
                result ++;
            }
        }
    }
    return result * 2;
}<commit_msg>Fix correlation calculation in Lab3<commit_after>#include <math.h>

int cor(int r, double* x, int n) {
    int result = 0;
    int i, j;
    double dx;
    i = n;
    while (i --> 0) {
        j = i;
        while (j --> 0) {
            dx = x[i] - x[j];
            if (r > fabs(dx)) {
                result ++;
            }
        }
    }
    return result;
}

int cor2(int r, double* x, double* y, int n) {
    int result = 0;
    int i, j;
    double dx, dy;
    i = n;
    while (i --> 0) {
        j = i;
        while (j --> 0) {
            dx = (x[i] - x[j]);
            dy = (y[i] - y[j]);
            if (r > sqrt(dx*dx + dy*dy)) {
                result ++;
            }
        }
    }
    return result;
}

int cor3(int r, double* x, double* y, double* z, int n) {
    int result = 0;
    int i, j;
    double dx, dy, dz;
    i = n;
    while (i --> 0) {
        j = i;
        while (j --> 0) {
            dx = (x[i] - x[j]);
            dy = (y[i] - y[j]);
            dz = (z[i] - z[j]);
            if (r > sqrt(dx*dx + dy*dy + dz*dz)) {
                result ++;
            }
        }
    }
    return result;
}
{'fraction_non_alphanumeric': 0.17515638963360142, 'fraction_numerical': 0.01161751563896336, 'mean_word_length': 1.033605812897366, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5640078', 'n_tokens_mistral': 881, 'n_tokens_neox': 848, 'n_words': 254}