class WarrenMethods: (source)
Methods as suggested in book. Hackers Delight.
Static Method | max |
Upper bound of result of ANDing 2-intervals. |
Static Method | max |
Upper bound of result of ORing 2-intervals. |
Static Method | max |
Upper bound of result of XORing 2-intervals. |
Static Method | min |
Lower bound of result of ANDing 2-intervals. |
Static Method | min |
Lower bound of result of ORing 2-intervals. |
Static Method | min |
Lower bound of result of XORing 2-intervals. |
Upper bound of result of ANDing 2-intervals. :param a: Lower bound of first interval :param b: Upper bound of first interval :param c: Lower bound of second interval :param d: Upper bound of second interval :param w: bit width :return: Upper bound of ANDing 2-intervals
Upper bound of result of ORing 2-intervals. :param a: Lower bound of first interval :param b: Upper bound of first interval :param c: Lower bound of second interval :param d: Upper bound of second interval :param w: bit width :return: Upper bound of ORing 2-intervals
Upper bound of result of XORing 2-intervals. :param a: Lower bound of first interval :param b: Upper bound of first interval :param c: Lower bound of second interval :param d: Upper bound of second interval :param w: bit width :return: Upper bound of XORing 2-intervals
Lower bound of result of ANDing 2-intervals. :param a: Lower bound of first interval :param b: Upper bound of first interval :param c: Lower bound of second interval :param d: Upper bound of second interval :param w: bit width :return: Lower bound of ANDing 2-intervals
Lower bound of result of ORing 2-intervals. :param a: Lower bound of first interval :param b: Upper bound of first interval :param c: Lower bound of second interval :param d: Upper bound of second interval :param w: bit width :return: Lower bound of ORing 2-intervals