Skip to content

MAX2

Description

Returns the larger of two values x and y.

Parameters

Name Direction Description
x in First value for comparison.
y in Second value for comparison.

Success

Returns the larger of x and y.

Failure

Function cannot fail - always returns a value.

Usage example (Cross-references)

Usage examples (Cross-references)
        ValidateBitVec(b);
    
        u64 max_len = MAX2(a->length, b->length);
        if (!BitVecResize(result, max_len)) {
            return;
        ValidateBitVec(b);
    
        u64 max_len = MAX2(a->length, b->length);
        if (!BitVecResize(result, max_len)) {
            return;
        // differing bit decides the ordering and bits past the shorter
        // operand's length read as zero.
        u64 max_len = MAX2(bv1->length, bv2->length);
    
        for (u64 i = max_len; i > 0;) {
        // range positions read as 0, so positions past bv2's length where
        // bv1 has a 1 disqualify the subset relation.
        u64 max_len = MAX2(bv1->length, bv2->length);
    
        for (u64 i = 0; i < max_len; i++) {
    
        u64 min_length = MIN2(bv1->length, bv2->length);
        u64 max_length = MAX2(bv1->length, bv2->length);
        u64 distance   = 0;
        u64 intersection = BitVecDotProduct(bv1, bv2);
    
        u64 max_length  = MAX2(bv1->length, bv2->length);
        u64 union_count = 0;
        ValidateBitVec(bv2);
    
        u64 max_length = MAX2(bv1->length, bv2->length);
        if (max_length == 0)
            return 1.0;
        u64  a_bits   = IntBitLength(a);
        u64  b_bits   = IntBitLength(b);
        u64  max_bits = MAX2(a_bits, b_bits);
        Int  temp;
        bool carry = false;
    ///
    /// TAGS: Math, Utility, Range
    #define CLAMP(x, lo, hi) MIN2(MAX2(lo, x), hi)
    
    ///
Last updated on