# this is inside a 'use integer;' block sub mix4 ($$$) { # per http://www.perlmonks.org/?node_id=1203705 this is a revised 32bit under 'use integer'; $_[A] -= $_[B]; $_[A] -= $_[C]; { no integer; $_[A] ^= ($_[C]>>13); } $_[B] -= $_[C]; $_[B] -= $_[A]; { no integer; $_[B] ^= ($_[A]<< 8); } $_[C] -= $_[A]; $_[C] -= $_[B]; { no integer; $_[C] ^= ($_[B]>>13); } $_[A] -= $_[B]; $_[A] -= $_[C]; { no integer; $_[A] ^= ($_[C]>>12); } $_[B] -= $_[C]; $_[B] -= $_[A]; { no integer; $_[B] ^= ($_[A]<<16); } $_[C] -= $_[A]; $_[C] -= $_[B]; { no integer; $_[C] ^= ($_[B]>> 5); } $_[A] -= $_[B]; $_[A] -= $_[C]; { no integer; $_[A] ^= ($_[C]>> 3); } $_[B] -= $_[C]; $_[B] -= $_[A]; { no integer; $_[B] ^= ($_[A]<<10); } $_[C] -= $_[A]; $_[C] -= $_[B]; { no integer; $_[C] ^= ($_[B]>>15); } } #### # there is no 'use integer;' here; sub mix ($$$) { $_[A] -= $_[B]; $_[A] -= $_[C]; $_[A] ^= ($_[C]>>13); $_[B] -= $_[C]; $_[B] -= $_[A]; $_[B] ^= ($_[A]<< 8); $_[C] -= $_[A]; $_[C] -= $_[B]; $_[C] ^= ($_[B]>>13); $_[A] -= $_[B]; $_[A] -= $_[C]; $_[A] ^= ($_[C]>>12); $_[B] -= $_[C]; $_[B] -= $_[A]; $_[B] ^= ($_[A]<<16); $_[C] -= $_[A]; $_[C] -= $_[B]; $_[C] ^= ($_[B]>> 5); $_[A] -= $_[B]; $_[A] -= $_[C]; $_[A] ^= ($_[C]>> 3); $_[B] -= $_[C]; $_[B] -= $_[A]; $_[B] ^= ($_[A]<<10); $_[C] -= $_[A]; $_[C] -= $_[B]; $_[C] ^= ($_[B]>>15); } #### a1-x c>13 : A : 59743 0000e95f b1-x a< 8 : B : - -1629499560 9edfcf58 c1-a : C : - - -59741 ffff16a3 SV = IV(0xc5f738) at 0xc5f73c REFCNT = 1 FLAGS = (PADMY,IOK,pIOK) IV = -59741 c1-b : C : - - 1629439819 611f474b SV = IV(0xc5f738) at 0xc5f73c REFCNT = 1 FLAGS = (PADMY,IOK,pIOK) IV = 1629439819 c1-x b>13 : orig 1 : 01100001000111110100011101001011 611f474b : orig 2 : 10011110110111111100111101011000 9edfcf58 : >>13 : 00000000000001001111011011111110 0004f6fe : res : 01100001000110111011000110110101 611bb1b5 c1-x b>13 : C : - - 1629204917 611bb1b5 while mixexp shows a1-x c>13 : A : 59743 0000e95f b1-x a< 8 : B : - -1629499560 9edfcf58 c1-a : C : - - -59741 ffff16a3 SV = IV(0xc5f418) at 0xc5f41c REFCNT = 1 FLAGS = (PADMY,IOK,pIOK) IV = -59741 c1-b : C : - - -2147483648 80000000 SV = PVNV(0xc7355c) at 0xc5f41c REFCNT = 1 FLAGS = (PADMY,NOK,pNOK) IV = -59741 NV = -2665527477 PV = 0 c1-x b>13 : orig 1 : 10000000000000000000000000000000 80000000 : orig 2 : 10011110110111111100111101011000 9edfcf58 : >>13 : 00000000000001001111011011111110 0004f6fe : res : 10000000000001001111011011111110 8004f6fe c1-x b>13 : C : - - -2147158274 8004f6fe