hi
i have a problem.
i want to store the largest numbers which is beyound the limit of all primitive data types.
how can i store it?
hi
i have a problem.
i want to store the largest numbers which is beyound the limit of all primitive data types.
how can i store it?
Use a library - The GNU MP Bignum Library
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
i dont want to use the library.
i want to do it not from library.
i had listen that it can be possible through Xor operator or through string or may be from modulus operator.
if any other way you know then kindly help me.
thanks
Last edited by maifs; 08-08-2009 at 03:27 AM.
Like
char thisIsAlargeNumber[] = "12334567879809644532341346578669";
Now write your own class which wraps around this idea, and overloads +,-,*,/
Job's as good as done.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
hi agian
sory may be i didnt make you understand.
actually its in the form like this.
2 power of long limit.
now have to save it .
Store it as
and when you need to display itCode:double dNumberSqrt; dNumberSqrt = sqrt(12334567879809644532341346578669);
Is that what you mean? Your English is kind of choppy.Code:std::cout << dNumberSqrt * dNumberSqrt