How do programming languages handle huge number arithmetic

前端 未结 9 1149
清酒与你
清酒与你 2021-02-05 19:35

For a computer working with a 64 bit processor, the largest number that it can handle would be 264 = 18,446,744,073,709,551,616. How does programming languages, say J

9条回答
  •  一向
    一向 (楼主)
    2021-02-05 20:12

    As a thought experiment, imagine the numbers stored as a string. With functions to add, multiply, etc these arbitrarily long numbers.

    In reality these numbers are probably stored in a more space efficient manner.

提交回复
热议问题