Question

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?

Was it helpful?

Solution

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).

OTHER TIPS

You could use Perl. Put

use bigint;

at the beginning of your program.

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top