2,147,483,647 Explained

Number:2147483647
Cardinal:two billion one hundred forty-seven million four hundred eighty-three thousand six hundred forty-seven
Factorization:prime
Prime:105,097,565th

The number 2,147,483,647 is the eighth Mersenne prime, equal to 231 − 1. It is one of only four known double Mersenne primes.[1]

The primality of this number was proven by Leonhard Euler, who reported the proof in a letter to Daniel Bernoulli written in 1772.[2] Euler used trial division, improving on Pietro Cataldi's method, so that at most 372 divisions were needed.[3] It thus improved upon the previous record-holding prime, 6,700,417, also discovered by Euler, forty years earlier. The number 2,147,483,647 remained the largest known prime until 1867.[4]

In computing, this number is the largest value that a signed 32-bit integer field can hold.

Barlow's prediction

At the time of its discovery, 2,147,483,647 was the largest known prime number. In 1811, Peter Barlow, not anticipating future interest in perfect numbers, wrote (in An Elementary Investigation of the Theory of Numbers):

Euler ascertained that 231 − 1 = 2147483647 is a prime number; and this is the greatest at present known to be such, and, consequently, the last of the above perfect numbers [i.e., 2<sup>30</sup>(2<sup>31</sup>&nbsp;−&nbsp;1)], which depends upon this, is the greatest perfect number known at present, and probably the greatest that ever will be discovered; for as they are merely curious, without being useful, it is not likely that any person will attempt to find one beyond it.[5]

He repeated this prediction in his work from 1814, A New Mathematical and Philosophical Dictionary.[6] [7]

In fact, a larger prime was discovered in 1855 by Thomas Clausen (67,280,421,310,721), though a proof was not provided. Furthermore, 3,203,431,780,337 was proven to be prime in 1867.[4]

In computing

The number 2,147,483,647 (or hexadecimal 7FFFFFFF16) is the maximum positive value for a 32-bit signed binary integer in computing. It is therefore the maximum value for variables declared as integers (e.g., as int) in many programming languages.

The data type time_t, used on operating systems such as Unix, is a signed integer counting the number of seconds since the start of the Unix epoch (midnight UTC of 1 January 1970), and is often implemented as a 32-bit integer.[8] The latest time that can be represented in this form is 03:14:07 UTC on Tuesday, 19 January 2038 (corresponding to 2,147,483,647 seconds since the start of the epoch). This means that systems using a 32-bit time_t type are susceptible to the Year 2038 problem.[9]

On 1 January 2022, a bug was reported for Microsoft Exchange systems where email delivery would fail. An internal malware scanner (enabled by default since 2013) used the date and time as a signed 32-bit integer. The integer would change during the new year to 2,201,010,001 (with the first two digits representing the year), surpassing the maximum value for this data type.[10]

In video games

The number 2,147,483,647 often becomes a hard limit for various statistics in video games, such as points or money, if they are represented by signed 32-bit integers (rather than floating-point, double-precision or arbitrary-precision).[11] [12] Going over this limit by legitimate means, or by modding or hacking the game, results in many different outcomes caused by integer overflow.[13] The most common outcome is the number "wrapping" into the negatives. Another potential outcome is game crashing, thus meaning there was no failsafe implemented in the event the value exceeds the signed 32-bit limit—generally if the underlying engine has undefined behavior, instead of a wraparound behavior, for integer overflow. A well-known example in video games is that of Old School RuneScape and Grand Theft Auto V, where the number is used as the maximum amount of coins (or any other item) that a player can hold at once with normal methods, known as a "max cash stack".[14] [15] In similar cases, where an unsigned instead of signed 32-bit integer is used, the limit might be extended to 4,294,967,295. Another well known example is Minecraft's hard limit for travel. The game crashes when trying to travel beyond this point and the game renderer stops ~147 blocks past that point.[16]

External links

Notes and References

  1. Web site: Weisstein . Eric W. . Double Mersenne Number . MathWorld . Wolfram Research . 29 January 2018.
  2. Book: Dunham, William . Euler: The Master of Us All . registration . Washington, DC . Mathematical Association of America . 1999 . 4 . 978-0-88385-328-3.
  3. Book: Gautschi, Walter . Mathematics of Computation, 1943–1993: A Half-Century of Computational Mathematics . Providence, Rhode Island . . Proceedings of Symposia in Applied Mathematics . 48 . 1994 . 486 . 978-0-8218-0291-5.
  4. Web site: Caldwell . Chris . 8 December 2009 . The Largest Known Prime by Year: A Brief History . The Prime Pages . University of Tennessee at Martin . 29 January 2018.
  5. Book: Barlow, Peter . Peter Barlow (mathematician) . An Elementary Investigation of the Theory of Numbers. London . J. Johnson & Co. . 1811. 43 . greatest. .
  6. Book: Barlow, Peter . Peter Barlow (mathematician) . A New Mathematical and Philosophical Dictionary: Comprising an Explanation of Terms and Principles of Pure and Mixed Mathematics, and Such Branches of Natural Philosophy as Are Susceptible of Mathematical Investigation . London . G. and S. Robinson . 1814 .
  7. Book: Shanks, Daniel . Solved and Unsolved Problems in Number Theory . Providence, Rhode Island . American Mathematical Society . 2001 . 4th . 495 . 978-0-8218-2824-3.
  8. Web site: The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition (definition of epoch) . . . 2004 . 7 March 2008 . https://web.archive.org/web/20081219153936/http://www.opengroup.org/onlinepubs/000095399/ . 19 December 2008 . dead .
  9. Web site: The Year-2038 Bug . 9 April 2009 . https://web.archive.org/web/20090318084855/http://www.2038bug.com/. 18 March 2009 . live.
  10. Web site: Abrams . Lawrence . Microsoft Exchange year 2022 bug in FIP-FS breaks email delivery . Bleeping Computer . 2 January 2022.
  11. Book: Lever, Nik . Director MX 2004 Games: Game Development with Director . 2012-08-06 . Taylor & Francis . 978-1-136-14525-4 . en.
  12. Web site: By . 2018-09-19 . Final Fantasy Exploit Teaches 32-bit Integer Math . 2022-09-25 . Hackaday . en-US.
  13. Web site: 32-Bit Integers and Why Old Computers Matter . 2022-09-25 . www.vice.com . 12 April 2015 . en.
  14. Web site: Coins . Runescape Official Wiki.
  15. News: Wood . Austin . 2018-07-12 . Old School Runescape pulled offline as billions of gold appear out of nowhere . en . PC Gamer . 2022-09-25 . it's appropriate to check that the calculation doesn't overflow the max integer limit of the game's language (2.1 billion). Unfortunately, the logic used for this calculation was incorrect, and when executed on stacks of other items (not the pouch itself) the result was to convert the stack to 2.1b coins..
  16. Web site: Java Edition hard limits . August 6, 2024 . Minecraft Wiki.