Esempio n. 1
0
 def mod_signed_bitmap_signed():
     '''-23983 % -5 == -3'''
     mask=2**64-1
     x = (-23983&mask,-64)
     res = bitmap.mod(x, -5)
     if bitmap.signed(res) and bitmap.value(res) == -3:
         raise Success
Esempio n. 2
0
 def mod_unsigned_bitmap_unsigned():
     '''23983 % 5 == 3'''
     mask=2**64-1
     x = (23983&mask,64)
     res = bitmap.mod(x, 5)
     if bitmap.value(res) == 3:
         raise Success
Esempio n. 3
0
 def mod_signed_bitmap_unsigned():
     '''-23983 % -5 == 2'''
     mask=2**64-1
     x = (-23983&mask,64)
     res = bitmap.mod(x, -5)
     if bitmap.value(res) == 0xfffffffffffffffe:
         raise Success
Esempio n. 4
0
 def mod_unsigned_bitmap_signed():
     '''23983 % -5 == -2'''
     mask=2**64-1
     x = (23983&mask,-64)
     res = bitmap.mod(x, -5)
     if bitmap.signed(res) and bitmap.number(res) == -2:
         raise Success