Multiplication of very long integers

后端 未结 7 1028
耶瑟儿~
耶瑟儿~ 2021-02-09 06:04

Is there an algorithm for accurately multiplying two arbitrarily long integers together? The language I am working with is limited to 64-bit unsigned integer length (maximum int

7条回答
  •  忘掉有多难
    2021-02-09 06:48

    Yes, you do it using a datatype that is effectively a string of digits (just like a normal 'string' is a string of characters). How you do this is highly language-dependent. For instance, Java uses BigDecimal. What language are you using?

提交回复
热议问题