Y
Hacker News
new
|
ask
|
show
|
jobs
by
joe_the_user
1551 days ago
You could use unsigned ints, whose arithmetic wraps, to deal with the overflow.
I'd still be curious about any theories of storage.
1 comments
charcircuit
1551 days ago
Javacript doesn't have an unsigned int datatype. The numbers in the article were doubles.
link
xxs
1551 days ago
you cant swap doubles like that though... b/c if any of them is a NaN or an infinity, it breaks down.
It works for integers (and pointers)
link
charcircuit
1551 days ago
It also breaks due to rounding even if you don't have NaN or Inf.
link