What is a good language to work with arbitrary length integers?

147 views Asked by At

I want to factorise integers, for example

41748850938502584251

I want to factorise this using brute-force. Given the short length of this number this should be possible.

What's a suitable programming language which supports an integer data type that has arbitrary length?

4

There are 4 answers

1
Asumu Takikawa On BEST ANSWER

Scheme has a featureful numeric tower that provides, among other things, arbitrary precision integers (see sec. 3.4 of R6RS which requires this of conforming implementations).

0
AudioBubble On

Java's BigInteger class handles very large numbers: http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html

0
Kyle Jones On

You could use Perl. Put

use bigint;

at the beginning of your program.

0
Ingo On

Haskell has the Integer data type for unlimited integers. Likewise Frege (it uses Javas big integers).