 a is valid for both positive and negative values of a . However , maintaining the validity of this equation means that while the result of a % b is , as expected , in the half @-@ open interval [ 0 , b ) , where b is a positive integer , it has to lie in the interval ( b , 0 ] when b is negative . 
