<commit_before>var POSITIVE_INFINITY = Number.POSITIVE_INFINITY || Infinity;
var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY || -Infinity;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 0x1FFFFFFFFFFFFF;
var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -0x1FFFFFFFFFFFFF;

export default function compute31BitNumberHash(val) {
    var _hash = 0;

    // integer number
    if (val <= MAX_SAFE_INTEGER && val >= MIN_SAFE_INTEGER && val % 1 === 0) {
        return val >> 32;
    }

    // non-integer numbers
    switch (val) {
        case POSITIVE_INFINITY: _hash = 0x7F800000; break;
        case NEGATIVE_INFINITY: _hash = 0xFF800000; break;
        default:
            // NaN
            if (val !== val) {
                _hash = 0;
                break;
            }

            if (val <= -0.0) {<commit_msg>include isNaN in hash-number function<commit_after>var POSITIVE_INFINITY = Number.POSITIVE_INFINITY || Infinity;
var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY || -Infinity;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 0x1FFFFFFFFFFFFF;
var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -0x1FFFFFFFFFFFFF;

export default function compute31BitNumberHash(val) {
    var _hash = 0;

    // integer number
    if (val <= MAX_SAFE_INTEGER && val >= MIN_SAFE_INTEGER && val % 1 === 0) {
        return val >> 32;
    }

    // non-integer numbers
    switch (val) {
        case POSITIVE_INFINITY: _hash = 0x7F800000; break;
        case NEGATIVE_INFINITY: _hash = 0xFF800000; break;
        default:
            // NaN
            if (isNaN(val)) {
                _hash = 0;
                break;
            }

            if (val <= -0.0) {
{'fraction_non_alphanumeric': 0.10173548773189707, 'fraction_numerical': 0.034709754637941355, 'mean_word_length': 2.370967741935484, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '7034371', 'n_tokens_mistral': 627, 'n_tokens_neox': 564, 'n_words': 125}