2,147,483,647

From HandWiki

Short description: Natural number
2147483647
Cardinaltwo billion one hundred forty-seven million four hundred eighty-three thousand six hundred forty-seven
Ordinal2147483647th
(two billion one hundred forty-seven million four hundred eighty-three thousand six hundred forty-seventh)
Factorizationprime
Prime105,097,565th
Greek numeral[math]\displaystyle{ \stackrel{\kappa\alpha\delta\psi\mu\eta}{\Mu} }[/math]͵γχμζ´
Roman numeralN/A
Binary11111111111111111111111111111112
Ternary121121222121102021013
Quaternary13333333333333334
Quinary133442234340425
Senary5530320055316
Octal177777777778
Duodecimal4BB2308A712
Hexadecimal7FFFFFFF16
Vigesimal1DB1F92720
Base 36ZIK0ZJ36
By 1772, Leonhard Euler had proven that 2,147,483,647 is a prime.

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., 230(231 − 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 appearance of the number often reflects an error, overflow condition, or missing value.[8]

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.[9] 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.[10]

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.[11]

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).[12][13] Going over this limit by legitimate means, or by modding or hacking the game, results in many different outcomes caused by integer overflow.[14] 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".[15][16] In similar cases, where an unsigned instead of signed 32-bit integer is used, the limit might be extended to 4,294,967,295.[12]

References

  1. Weisstein, Eric W.. "Double Mersenne Number". MathWorld. Wolfram Research. http://mathworld.wolfram.com/DoubleMersenneNumber.html. 
  2. Dunham, William (1999). Euler: The Master of Us All. Washington, DC: Mathematical Association of America. p. 4. ISBN 978-0-88385-328-3. https://archive.org/details/eulermasterofusa0000dunh. 
  3. Gautschi, Walter (1994). Mathematics of Computation, 1943–1993: A Half-Century of Computational Mathematics. Proceedings of Symposia in Applied Mathematics. 48. Providence, Rhode Island: American Mathematical Society. p. 486. ISBN 978-0-8218-0291-5. 
  4. 4.0 4.1 Caldwell, Chris (8 December 2009). "The Largest Known Prime by Year: A Brief History". University of Tennessee at Martin. http://primes.utm.edu/notes/by_year.html. 
  5. Barlow, Peter (1811). An Elementary Investigation of the Theory of Numbers. London: J. Johnson & Co.. p. 43. https://archive.org/details/anelementaryinv00barlgoog. "greatest." 
  6. Barlow, Peter (1814). 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. https://books.google.com/books?id=Y-csAAAAYAAJ&q=2147483647&pg=PT544. 
  7. Shanks, Daniel (2001). Solved and Unsolved Problems in Number Theory (4th ed.). Providence, Rhode Island: American Mathematical Society. p. 495. ISBN 978-0-8218-2824-3. 
  8. See, for example: [1][yes|permanent dead link|dead link}}]. A search for images on Google will find many with metadata values of 2147483647. This image, for example, claims to have been taken with a camera aperture of 2147483647.
  9. "The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition (definition of epoch)". IEEE and The Open Group. The Open Group. 2004. http://www.opengroup.org/onlinepubs/000095399/. 
  10. "The Year-2038 Bug". http://www.2038bug.com/. 
  11. Abrams, Lawrence. "Microsoft Exchange year 2022 bug in FIP-FS breaks email delivery". https://www.bleepingcomputer.com/news/microsoft/microsoft-exchange-year-2022-bug-in-fip-fs-breaks-email-delivery/. 
  12. 12.0 12.1 Lever, Nik (2012-08-06) (in en). Director MX 2004 Games: Game Development with Director. Taylor & Francis. ISBN 978-1-136-14525-4. https://books.google.com/books?id=eV0My6PR9xIC&pg=PA149. 
  13. By (2018-09-19). "Final Fantasy Exploit Teaches 32-bit Integer Math" (in en-US). https://hackaday.com/2018/09/19/final-fantasy-exploit-teaches-32-bit-integer-math/. 
  14. "32-Bit Integers and Why Old Computers Matter" (in en). 12 April 2015. https://www.vice.com/en/article/ae39e4/32-bit-integers-and-why-old-computers-matter. 
  15. "Coins". https://runescape.wiki/w/Coins. 
  16. Wood, Austin (2018-07-12). "Old School Runescape pulled offline as billions of gold appear out of nowhere" (in en). PC Gamer. https://www.pcgamer.com/old-school-runescape-pulled-offline-as-billions-of-gold-appear-out-of-nowhere/. "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." 

External links