What type of variable would you use if the variable may be a sixty digit number.

Printable View

- 03-09-2008ThinkerReally large numbers
What type of variable would you use if the variable may be a sixty digit number.

- 03-09-2008tabstop
Depends: do you need all sixty digits accurately, or is 1.45697e59 good enough? If the latter, there's always double; if the former, well, today we learn how to write a new data type. (Or learn how to use a library that already has done so.)

- 03-09-2008iMalc
- 03-09-2008CornedBee
- 03-09-2008Thinker
It's the first tabstop. I;m doing a project euler problem where you have to add 100 50 digit numbers and i do not know what type of variable i need and i have gmp but reading the manual i do not know how to use it. Can some one help me out here. Thanks for any help provided.

- 03-09-2008tabstop
- 03-09-2008NeonBlack
Thinker: When I did that one, I just used char arrays.