PayPal, the $92 quadrillion glitch, rice and a chessboard

PayPal, the $92 quadrillion glitch, rice and a chessboard

Imagine waking up to find your PayPal account had been accidentally credited with over $92 quadrillion dollars – a figure that is 1300 times greater than the GDP of the entire world!

This is what happened to Chris Reynolds, USA when he opened his monthly statement. Unfortunately for him PayPal quickly noticed the error and returned his account balanced back to zero by the time he had logged in.

How did this happen and what has it got to do with rice?

9223372036854775808 seems a bit of a strange number so I did some research into how this might have happened.

There is a mythical tale that coincidentally contains the same number:

A medieval king, grateful for wise counsel, asked his top adviser to name an appropriate reward. The adviser, wishing not to appear greedy but knowing that the king was maths impaired, asked for a chessboard (8 x 8) on which, on the first square would be one grain of rice, on the second, two grains of rice, on the third, four grains, on the fourth, eight grains, on the fifth, sixteen grains of rice, and so on until you get to the last square on the board.

Now suppose that instead of rice, the adviser had requested cents (with 100 cents = $1), the amount stacked on the board’s 64th square would be $92,233,720,368,547,800 !

Clearly a bug on PayPal’s system flipped out and stopped after doubling a cent 64 times. Perhaps they should stick to rice rather than dollars?