<commit_before>function is_big_number ( a ) {
    return ( a instanceof BigNumber );
}

///////////////////////////////////////////////////////////////////////////////

var _bigint_heap = new Uint32Array(0x100000),
    _bigint_asm = bigint_asm( global, null, _bigint_heap.buffer );

///////////////////////////////////////////////////////////////////////////////

var _BigNumber_ZERO_limbs = new Uint32Array(0);

function BigNumber ( num, radix ) {
    var limbs = _BigNumber_ZERO_limbs,
        bitLength = 0,
        sign = 0;

    if ( num === undefined ) {
        // do nothing
    }
    else if ( is_number(num) ) {
        return _BigNumber_fromNumber.call( this, num );
    }
    else if ( is_string(num) ) {
        switch ( radix || 16 ) {
            case 16:
                return _BigNumber_fromHexString.call( this, num );

            default:
                throw new IllegalArgumentError("bad radix");
        }
    }
    else if ( is_buffer(num) ) {
        return _BigNumber_fromByteArray.call( this, new Uint8Array(num) );
    }
    else if ( is_bytes(num) ) {
        return _BigNumber_fromByteArray.call( this, num );
    }
    else if ( typeof num === 'object' && num !== null ) {
        limbs = new Uint32Array( num.limbs );
        bitLength = num.bitLength;
        sign = num.sign;
    }
    else {
        throw new TypeError("number is of unexpected type");
    }

    this.limbs = limbs;
    this.bitLength = bitLength;
    this.sign = sign;
}

function _BigNumber_fromNumber ( num ) {
    var absnum = Math.abs(num),
        limbs, bitlen;

    if ( absnum > 0xffffffff ) {
        limbs = new Uint32Array(2);
        limbs[0] = absnum|0;
        limbs[1] = (absnum/0x100000000)|0;
        bitlen = 52;
    }
    else if ( absnum > 0 ) {
        limbs = new Uint32Array(1);
        limbs[0] = absnum;
        bitlen = 32;
    }
    else {
        limbs = _BigNumber_ZERO_limbs;
        bitlen = 0;
    }

    this.limbs = limbs;
    this.bitLength = bitlen;
    this.sign = ( num <= 0 ? num < 0 ? -1 : 0 : 1 );

    return this;
}

function _BigNumber_fromHexString ( str ) {
    var bitlen = 0, sign = 0, limbs = null;

    str = str.toUpperCase().replace( /[^0-9A-F]/g, '' ).replace( /^0+/, '' );

    bitlen = str.length * 4;

    if ( bitlen > 0 ) {
        if ( str.length % 8 ) {
            str = ( '00000000'.substr( str.length % 8 ) ) + str;
        }

        limbs = new Uint32Array( (bitlen + 31) >> 5 );
        for ( var i = 0; i < str.length; i += 8 ) {
            var l = parseInt( str.substr(i, 8), 16 );
            limbs[(str.length-i-8)>>3] = l;
        }

        sign = 1;
    }
    else {
        return BigNumber_ZERO;
    }

    this.limbs = limbs;
    this.bitLength = bitlen;
    this.sign = sign;

    return this;
}

function _BigNumber_fromByteArray ( buff ) {
    var bitlen = 0, sign = 0, limbs = null;

    bitlen = buff.length * 8;

    if ( bitlen > 0 ) {
        limbs = new Uint32Array( (bitlen + 31) >> 5 );
        for ( var i = buff.length-4; i >= 0 ; i -= 4 ) {
            limbs[(buff.length-4-i)>>2] = (buff[i] << 24) | (buff[i+1] << 16) | (buff[i+2] << 8) | buff[i+3];
        }
        if ( i === -3 ) {
            limbs[limbs.length-1] = (buff[0] << 16) | (buff[1] << 8) | buff[2];
        }
        else if ( i === -2 ) {
            limbs[limbs.length-1] = (buff[0] << 8) | buff[1];
        }
        else if ( i === -1 ) {
            limbs[limbs.length-1] = buff[0];
        }

        sign = 1;
    }
    else {
        return BigNumber_ZERO;
    }

    this.limbs = limbs;
    this.bitLength = bitlen;
    this.sign = sign;

    return this;
}

function BigNumber_toString ( radix ) {
    radix = radix || 16;

    var limbs = this.limbs,
        bitlen = this.bitLength,
        str = '';
<commit_msg>BigNumber fix<commit_after>function is_big_number ( a ) {
    return ( a instanceof BigNumber );
}

///////////////////////////////////////////////////////////////////////////////

var _bigint_heap = new Uint32Array(0x100000),
    _bigint_asm = bigint_asm( global, null, _bigint_heap.buffer );

///////////////////////////////////////////////////////////////////////////////

var _BigNumber_ZERO_limbs = new Uint32Array(0);

function BigNumber ( num, radix ) {
    var limbs = _BigNumber_ZERO_limbs,
        bitLength = 0,
        sign = 0;

    if ( num === undefined ) {
        // do nothing
    }
    else if ( is_number(num) ) {
        return _BigNumber_fromNumber.call( this, num );
    }
    else if ( is_string(num) ) {
        switch ( radix || 16 ) {
            case 16:
                return _BigNumber_fromHexString.call( this, num );

            default:
                throw new IllegalArgumentError("bad radix");
        }
    }
    else if ( is_buffer(num) ) {
        return _BigNumber_fromByteArray.call( this, new Uint8Array(num) );
    }
    else if ( is_bytes(num) ) {
        return _BigNumber_fromByteArray.call( this, num );
    }
    else if ( typeof num === 'object' && num !== null ) {
        limbs = new Uint32Array( num.limbs );
        bitLength = num.bitLength;
        sign = num.sign;
    }
    else {
        throw new TypeError("number is of unexpected type");
    }

    this.limbs = limbs;
    this.bitLength = bitLength;
    this.sign = sign;
}

function _BigNumber_fromNumber ( num ) {
    var absnum = Math.abs(num),
        limbs, bitlen;

    if ( absnum > 0xffffffff ) {
        limbs = new Uint32Array(2);
        limbs[0] = absnum|0;
        limbs[1] = (absnum/0x100000000)|0;
        bitlen = 52;
    }
    else if ( absnum > 0 ) {
        limbs = new Uint32Array(1);
        limbs[0] = absnum;
        bitlen = 32;
    }
    else {
        limbs = _BigNumber_ZERO_limbs;
        bitlen = 0;
    }

    this.limbs = limbs;
    this.bitLength = bitlen;
    this.sign = ( num <= 0 ? num < 0 ? -1 : 0 : 1 );

    return this;
}

function _BigNumber_fromHexString ( str ) {
    var bitlen = 0, sign = 0, limbs = null;

    str = str.toUpperCase().replace( /[^0-9A-F]/g, '' ).replace( /^0+/, '' );

    bitlen = str.length * 4;

    if ( bitlen > 0 ) {
        if ( str.length % 8 ) {
            str = ( '00000000'.substr( str.length % 8 ) ) + str;
        }

        limbs = new Uint32Array( (bitlen + 31) >> 5 );
        for ( var i = 0; i < str.length; i += 8 ) {
            var l = parseInt( str.substr(i, 8), 16 );
            limbs[(str.length-i-8)>>3] = l;
        }

        sign = 1;
    }
    else {
        return BigNumber_ZERO;
    }

    this.limbs = limbs;
    this.bitLength = bitlen;
    this.sign = sign;

    return this;
}

function _BigNumber_fromByteArray ( buff ) {
    var bitlen = 0, sign = 0, limbs = null;

    bitlen = buff.length * 8;

    if ( bitlen > 0 ) {
        limbs = new Uint32Array( (bitlen + 31) >> 5 );
        for ( var i = buff.length-4; i >= 0 ; i -= 4 ) {
            limbs[(buff.length-4-i)>>2] = (buff[i] << 24) | (buff[i+1] << 16) | (buff[i+2] << 8) | buff[i+3];
        }
        if ( i === -3 ) {
            limbs[limbs.length-1] = buff[0];
        }
        else if ( i === -2 ) {
            limbs[limbs.length-1] = (buff[0] << 8) | buff[1];
        }
        else if ( i === -1 ) {
            limbs[limbs.length-1] = (buff[0] << 16) | (buff[1] << 8) | buff[2];
        }

        sign = 1;
    }
    else {
        return BigNumber_ZERO;
    }

    this.limbs = limbs;
    this.bitLength = bitlen;
    this.sign = sign;

    return this;
}

function BigNumber_toString ( radix ) {
    radix = radix || 16;

    var limbs = this.limbs,
        bitlen = this.bitLength,
        str = '';

{'fraction_non_alphanumeric': 0.17889182058047493, 'fraction_numerical': 0.032981530343007916, 'mean_word_length': 1.58208446866485, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, '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': '7208401', 'n_tokens_mistral': 2785, 'n_tokens_neox': 2576, 'n_words': 609}