@staticmethod<EOL><INDENT>def _wrapped_signed_mul(a, b):<DEDENT>
<EOL>if a.bits != b.bits:<EOL><INDENT>logger.warning("<STR_LIT>")<EOL><DEDENT>bits = max(a.bits, b.bits)<EOL>a_lb_positive = StridedInterval._is_msb_zero(a.lower_bound, bits)<EOL>a_ub_positive = StridedInterval._is_msb_zero(a.upper_bound, bits)<EOL>b_lb_positive = StridedInterval._is_msb_zero(b.lower_bound, bits)<EOL>b_ub_positive = StridedInterval._is_msb_zero(b.upper_bound, bits)<EOL>uninit_flag = a.uninitialized | b.uninitialized<EOL>if b.is_integer:<EOL><INDENT>if b_lb_positive:<EOL><INDENT>stride = abs(a.stride * b.lower_bound)<EOL><DEDENT>else:<EOL><INDENT>stride = abs(a.stride * StridedInterval._unsigned_to_signed(b.lower_bound, bits))<EOL><DEDENT><DEDENT>elif a.is_integer:<EOL><INDENT>if a_lb_positive:<EOL><INDENT>stride = abs(b.stride * a.lower_bound)<EOL><DEDENT>else:<EOL><INDENT>stride = abs(b.stride * StridedInterval._unsigned_to_signed(a.lower_bound, bits))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>stride = fractions.gcd(a.stride, b.stride)<EOL><DEDENT>if a_lb_positive and a_ub_positive and b_lb_positive and b_ub_positive:<EOL><INDENT>lb = a.lower_bound * b.lower_bound<EOL>ub = a.upper_bound * b.upper_bound<EOL>if ub - lb < (<NUM_LIT:2> ** bits):<EOL><INDENT>return StridedInterval(bits=bits, stride=stride, lower_bound=lb, upper_bound=ub, uninitialized=uninit_flag)<EOL><DEDENT>else:<EOL><INDENT>return StridedInterval.top(bits, uninitialized=uninit_flag)<EOL><DEDENT><DEDENT>elif not a_lb_positive and not a_ub_positive and not b_lb_positive and not b_ub_positive:<EOL><INDENT>lb = (<EOL>StridedInterval._unsigned_to_signed(a.upper_bound, bits) *<EOL>StridedInterval._unsigned_to_signed(b.upper_bound, bits)<EOL>)<EOL>ub = (<EOL>StridedInterval._unsigned_to_signed(a.lower_bound, bits) *<EOL>StridedInterval._unsigned_to_signed(b.lower_bound, bits)<EOL>)<EOL>if ub - lb < (<NUM_LIT:2> ** bits):<EOL><INDENT>return StridedInterval(bits=bits, stride=stride, lower_bound=lb, upper_bound=ub, uninitialized=uninit_flag)<EOL><DEDENT>else:<EOL><INDENT>return StridedInterval.top(bits, uninitialized=uninit_flag)<EOL><DEDENT><DEDENT>elif not a_lb_positive and not a_ub_positive and b_lb_positive and b_ub_positive:<EOL><INDENT>lb = StridedInterval._unsigned_to_signed(a.lower_bound, bits) * b.upper_bound<EOL>ub = StridedInterval._unsigned_to_signed(a.upper_bound, bits) * b.lower_bound<EOL>if ub - lb < (<NUM_LIT:2> ** bits):<EOL><INDENT>lb &= (<NUM_LIT:2> ** bits - <NUM_LIT:1>)<EOL>ub &= (<NUM_LIT:2> ** bits - <NUM_LIT:1>)<EOL>return StridedInterval(bits=bits, stride=stride, lower_bound=lb, upper_bound=ub, uninitialized=uninit_flag)<EOL><DEDENT>else:<EOL><INDENT>return StridedInterval.top(bits, uninitialized=uninit_flag)<EOL><DEDENT><DEDENT>elif a_lb_positive and a_ub_positive and not b_lb_positive and not b_ub_positive:<EOL><INDENT>lb = a.upper_bound * StridedInterval._unsigned_to_signed(b.lower_bound, bits)<EOL>ub = a.lower_bound * StridedInterval._unsigned_to_signed(b.upper_bound, bits)<EOL>if ub - lb < (<NUM_LIT:2> ** bits):<EOL><INDENT>lb &= (<NUM_LIT:2> ** bits - <NUM_LIT:1>)<EOL>ub &= (<NUM_LIT:2> ** bits - <NUM_LIT:1>)<EOL>return StridedInterval(bits=bits, stride=stride, lower_bound=lb, upper_bound=ub, uninitialized=uninit_flag)<EOL><DEDENT>else:<EOL><INDENT>return StridedInterval.top(bits, uninitialized=uninit_flag)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>' % (a, b))<EOL><DEDENT>
Perform wrapped signed multiplication on two StridedIntervals.

:param a: The first operand (StridedInterval)
:param b: The second operand (StridedInterval)
:return: The product