# Where does paypal's 92233720368547800 number come from? [closed]

There has been a story in the news about a man whose Paypal account was accidentally credited with \$92,233,720,368,547,800.

Where does this number come from? What sort of programming bug is likely to give rise to this number?

• I'm voting to close this question as off-topic because it is not a conceptual programming problem within the scope defined in the help center. – user22815 Jul 13 '15 at 15:22

It's the maximum value of a long (64 bit signed integral type).

The value of this constant is 9,223,372,036,854,775,807; that is, hexadecimal 0x7FFFFFFFFFFFFFFF.

This would be the maximum value for a 64-bit signed integral type in any language, I'm not assuming paypal uses .NET, the link to MSDN above is just illustrative.

The error is likely just a poor conversion error (like from decimal or float or etc to long that didn't work correctly) resulting in some overflowing of a value, or bad defaulting code for some strange scenario, or it could have been a test in production by their engineering/QA team gone hay-wire. Memory leak/pointer error, the list of ways to cause this are really countless. Could have been a parsing error deserializing some information that came to them across the wire, tremendously numerous ways to accidentally end up with an unexpected or misaligned integral value.

• even more odd is that the number was apparently rounded up to the nearest \$100 dollars. – KutuluMike Jul 19 '13 at 20:16
• Why are the numbers in the question and answer not the same? – thursdaysgeek Jul 19 '13 at 22:46
• Because the integer value is a count of pennies. So you divide 2^63-1 by 100 to get dollars. And then something rounded to the nearest \$100 for some reason. – Mark Adler Jul 20 '13 at 0:06
• @thursdaysgeek some math went wrong enough to cause an integral overflow, chances are in the process of the code getting math wrong it continued calculating some operations after the overflow occurred causing the amount to change even more. As if the equation was 2+3*4*8/22+400^2 and on the second step an overflow occurs, the folowing operations will continue applying to that incorrect number. – Jimmy Hoffa Jul 20 '13 at 0:26