Take the 2-minute tour ×

I'm trying to multiply together a set of numbers.

However, the programs I have tried (Excel, R, FreeMat) do not allow numbers above around 300 digits. This limits me to sets of a few hundred numbers at most.

What program can I use that isn't limited by the number of digits? And what size numbers can I realistically manipulate on a (high spec) home PC?

I'm not a programmer, however I can learn if this is the only way around it!

share|improve this question
I think this might be more appropriate for mathstackexchange or csstackexchange? –  Noah S Jun 14 '13 at 0:46
Is there any popular programming language for which there isn't a package for larger integers? I doubt it. It's also an easy programming exercise to write your own if you don't care too much about speed. If you want arbitrary precision floating point arithmetic, that's only a little harder, and again there are many packages available in case you don't want to reinvent the wheel. –  Douglas Zare Jun 14 '13 at 1:41
add comment

closed as off topic by Qiaochu Yuan, Andy Putman, Chris Godsil, Douglas Zare, Henry Cohn Jun 14 '13 at 1:42


1 Answer

up vote 2 down vote accepted
  • Every computer algebra system for symbolic manipulations, for example Sage or Maxima
  • Some programming languages have built-in support, for example Python, Haskell and Ruby
  • GMP is a well-established library for C and C++

The size of numbers is limited by the memory of your PC (few GiB typically, thus a few billion digits are possible). Of course you should think about the question which kind of numbers you want to handle (integers, floating point numbers, fractions?).

share|improve this answer
Thanks for your help! Nick –  Nick Jun 14 '13 at 3:23
add comment
