Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best coding language for dealing with large numbers (50000+ digits)

Can you recommend good languages to do math with large numbers in?

So far I've used Actionscript 2 and Objective-c and with Objective-c even using NSDecimalNumbers I was limited to 32 digits in my calculations... I would need at a minimum to be able to calculate with numbers fifty-thousand digits long.

like image 228
Albert Renshaw Avatar asked Feb 06 '13 07:02

Albert Renshaw


People also ask

How do you handle large numbers in C++?

Handling large numbers in C++? In C++, we can use large numbers by using the boost library. This C++ boost library is widely used library. This is used for different sections. It has large domain of applications.

What is the max number in coding?

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.

What is the most powerful code language?

Java is one of the most powerful programming languages that is currently used in more than 3 billion devices. Java is currently one of the most trending technology. It is used in desktop applications, mobile applications, web development, Artificial intelligence, cloud applications, and many more.


1 Answers

Python has arbitrary-length integers and uses them transparently, so you don't need any special code or classes for this.

>>> len(str(math.factorial(123456)))
574965
like image 178
Tim Pietzcker Avatar answered Sep 26 '22 00:09

Tim Pietzcker