RexxLA / NetRexx

Other
6 stars 0 forks source link

HashCode() math using char[] with length > 14 all cells = max char? (was NETREXX-145) #22

Open rvjansen opened 2 years ago

rvjansen commented 2 years ago
if using max char if using max char
Pass hash * 7 (((int) (chars [i])) * 2)) ((int) (chars [(chars.length - i) - 1] )) hash exception 0 0 131072 65536 196608
1 1376256 131072 65536 1572864
2 11010048 131072 65536 11206656
3 78446592 131072 65536 78643200
4 550502400 131072 65536 550699008
5 3854893056 131072 65536 3855089664 Overflow
6 26985627648 131072 65536 26985824256 Overflow
int.max 2147483647

Jason Martin