0

how can we use very big numbers in a c++ coding ...
eg a number which is some 40 digit long... i just found out tat there is some data type known as biginteger ... but its not working in turbo c even after installin reqiured files...
can anyone help in this problem..
i need a complete explanation on big integers,.....

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Rajesh R Subram
0

how can we use very big numbers in a c++ coding ...
eg a number which is some 40 digit long... i just found out tat there is some data type known as biginteger ... but its not working in turbo c even after installin reqiured files...
can anyone help in this problem..
i need a complete explanation on big integers,.....

Hi,

Existing datatypes are not going to solve this problem of yours. If you need do computation on really big numbers, you'll need to use one of those libraries that support infinite precision arithmetic (or write your own code which can do it). If I were you, I'd do myself a favour and use one of the existing implementations.

For instance, there's the MP BigNum Library.

I've computed the factorial of 9858 here: http://gmplib.org/cgi-bin/gmp_calc.pl?expr=9858!

You may read about infinite precision arithmetic here: http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic

Cheers,
Rajesh R Subramanian
[CodeProject MVP]
[Microsoft MVP]

Edited by Rajesh R Subram: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.