-1

According to Wikipedia:

The number 2^63 − 1= 9,223,372,036,854,775,807, is the maximum value for a 64-bit signed integer in computing.

If I am understanding this correctly, this means that computations like adding numbers over this threshold would not be possible. On the other hand, when running print(2**63+2) or print(2**100) in my machine gives the correct answer. So I don't understand the meaning of 'maximum value for a 64-bit signed integer in computing'.

inquisitor
  • 113
  • 4
  • 4
    Why does that puzzle you? Python doesn't use fix-sized integers – juanpa.arrivillaga May 10 '20 at 20:43
  • Voting to close until you explicitly state the assumptions that led to your confusion. Right now you present a bunch of essentially unrelated facts and claim confusion. – Mad Physicist May 10 '20 at 20:45
  • "If I am understanding this correctly, this means that computations like adding numbers over this threshold would not be possible." Only if you use 64-bit integers. You could use, say, 128 bit integers, or arbitrarily sized integers (like the `int` type in Python). – juanpa.arrivillaga May 10 '20 at 20:52
  • Note, the word-size does put a theoretical limit on the maximum size of an integer, because the array that is used to store the bytes which represent the integer are limited to a maximum size determined by the word size (64 bits on a 64 bit process). Of course, you'd probably practically run out of memory first before you run out of address space – juanpa.arrivillaga May 10 '20 at 20:54

1 Answers1

0

See this article if you are interested on how python do that

Kasper
  • 478
  • 3
  • 13