def comp_max_value(qvec, signed=0):
    """
        Computes maximum real value given the fixed point representation, qvec.
    """
    word_width = qvec[0]
    frac_width = qvec[1]
    max_val = 2.**(word_width - signed) / (2.**frac_width)
    max_val -= 2.**(-frac_width)

    return max_val