处理大数字的语言

时间:2021-01-26 16:53:03

I am working on a task that consists different operations on very big numbers. Example : Multiplying two 50 digit numbers. That big-sized numbers cannot be handled using C.

我正在开展一项任务,包括对非常大数字的不同操作。示例:将两个50位数字相乘。使用C无法处理那些大号的数字。

Can someone suggest me some programming language that can handle operations on such types of big numbers without using any special type of libraries, so that I can learn that language to implement my algorithm.

有人可以建议我一些编程语言,可以处理这类大数字的操作而不使用任何特殊类型的库,这样我就可以学习该语言来实现我的算法。

2 个解决方案

#1


Python3 can work on very large numbers (you can say it has almost no limit) and that's automatic.

Python3可以处理非常大的数字(你可以说它几乎没有限制)并且这是自动的。

https://*.com/a/7604998/3156085

You can try it yourself by entering very large numbers in python shell.

您可以通过在python shell中输入非常大的数字来自己尝试。

#2


BigDecimal class from Java can work with large numbers as you need, without using any extra library.

Java中的BigDecimal类可以根据需要使用大量数字,而无需使用任何额外的库。

#1


Python3 can work on very large numbers (you can say it has almost no limit) and that's automatic.

Python3可以处理非常大的数字(你可以说它几乎没有限制)并且这是自动的。

https://*.com/a/7604998/3156085

You can try it yourself by entering very large numbers in python shell.

您可以通过在python shell中输入非常大的数字来自己尝试。

#2


BigDecimal class from Java can work with large numbers as you need, without using any extra library.

Java中的BigDecimal类可以根据需要使用大量数字,而无需使用任何额外的库。