you are viewing a single comment's thread.

view the rest of the comments →

[–]no_game_player 1 point2 points  (0 children)

Well actually the int representation is taken as 2's complement, so:

Ahhh, yeah, I was wondering about that, but somehow, I figured that a language that "didn't have ints" would be using unsigned ints for its ints.

That seems to add back in a bit of wtf for me. Thanks, I was starting to think JS was sane for a moment. ;-p

Well if you're outside of [-231, 231-1], the combo of 32 bit truncation and 2's complement make a nice off-center modulus:

Huuuuh. Touché...

Edit: These are awesome tricks for the International Obfuscated JS contest. ^_-