PDA

View Full Version : 8 Zettabyte barrier for credits


wooolF[RM]
11-16-2004, 04:32 PM
K, let's say some user have 0 b in credits

SITE CHANGE USER CREDITS +9223372000000000000
Site reports : Credits: 9007199218750000MB

Now reset it to 0 b again

SITE CHANGE USER CREDITS +9223373000000000000
Site reports : Credits: -9007198314169484MB

Not talking about all those scripts that reports credits to IRC...


PS:

9007199218750000 Megabyte
8796092987060.546875 Gigabyte
8589934557.6763153076171875 Terrabyte
8388607.9664807766675949096679688 Pettabyte
8191.9999672663834644481539726257 Exabyte
7.9999999680335776020001503638923 Zettabyte

neoxed
11-16-2004, 04:36 PM
That's probably an integer overflow. The credit/stat sections in the userfile are signed 64bit integers, like all other integer data types there is a limit.

wooolF[RM]
11-16-2004, 04:42 PM
<sarcasm> Better be fixed cause I'm near my 8 Zb in credits! </sarcasm> :D :D :D :p

neoxed
11-16-2004, 05:08 PM
Well it's not really a bug...it's by design. The max size of a signed 64bit integer is from -9223372036854775808 to 9223372036854775807 (0x7FFFFFFFFFFFFFFF). Once you the exceed either the positive or negative limit, the integer overflows.

This can't really be fixed, unless darkone is up to writing some make-shift limitless large integer support (I've seen it done, I just forget what it's called :P). The disadvantage is, that it's much slower and we know how darkone feels about optimization and speed. ;)

wooolF[RM]
11-16-2004, 10:32 PM
Hm, yeh, I see, thnx for the explanation. And yeh, speed is everything, agreed on that. Don't see the reason to fix this "bug" either... Nobody would get 8Zb credits anyway, heh. :p

mr_F_2
11-17-2004, 12:41 PM
if somebody did get over a ZB of credit they should be delusered just for giving so much without taking any, based on the principle of over-generosity. :D