<commit_before>/*
** Filename: util.c
*/


#include <assert.h>

#include "boolexpr.h"


/* boolexpr.c */
BoolExpr * _op_new(BoolExprType t, size_t n, BoolExpr **xs);


/* Return the ceiling log base two of an integer. */
unsigned int
_clog2(unsigned int num)
{
    unsigned int accum = 0;
    unsigned int shifter = 1;

    assert(num >= 1);

    while (num > shifter) {
        shifter <<= 1;
        accum += 1;
    }

    return accum;
}


/*
** Map negative lits onto evens, and positive lits onto odds.
** ~x : {-1, -2, -3, -4, ...} => {0, 2, 4, 6, ...}
**  x : { 1,  2,  3,  4, ...} => {1, 3, 5, 7, ...}
*/
size_t
_uniqid2index(long uniqid)
{
    assert(uniqid != 0);

    return (size_t) (uniqid < 0 ? -2 * uniqid - 2 : 2 * uniqid - 1);
}

<commit_msg>Get rid of unused clog2 function<commit_after>/*
** Filename: util.c
*/


#include <assert.h>

#include "boolexpr.h"


/* boolexpr.c */
BoolExpr * _op_new(BoolExprType t, size_t n, BoolExpr **xs);


/*
** Map negative lits onto evens, and positive lits onto odds.
** ~x : {-1, -2, -3, -4, ...} => {0, 2, 4, 6, ...}
**  x : { 1,  2,  3,  4, ...} => {1, 3, 5, 7, ...}
*/
size_t
_uniqid2index(long uniqid)
{
    assert(uniqid != 0);

    return (size_t) (uniqid < 0 ? -2 * uniqid - 2 : 2 * uniqid - 1);
}


{'fraction_non_alphanumeric': 0.20364500792393028, 'fraction_numerical': 0.041996830427892234, 'mean_word_length': 2.368, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '6507030', 'n_tokens_mistral': 590, 'n_tokens_neox': 539, 'n_words': 154}