to solve "algorithm 196" I want a new DataType(C++ Numeric) which can contain minimum 64 byte.

Can it possible?

I think possible, but i don't know How?

Please, Help me.

Printable View

- 12-12-2006jewelbdCan I make a DataType ?
to solve "algorithm 196" I want a new DataType(C++ Numeric) which can contain minimum 64 byte.

Can it possible?

I think possible, but i don't know How?

Please, Help me. - 12-12-2006vart
you create class that internally stores the data, for example as a string, or array of digits, or something else

and you overload all mathimatical operations for your class - 12-13-2006Salem
You mean this algorithm?

http://mathworld.wolfram.com/196-Algorithm.html

If you want big numbers, try

http://www.swox.com/gmp/ - 12-13-2006jafet
64-bit... ha ha ha.

196 has been brought to**>270,000,000 digits**.

You appear to want to**solve**it using 64-bit numbers... fat chance, mate.

Salem: the 196 problem only involves addition and (decimal) digit reversal. Addition is simple enough to implement on its own, and it would be cumbersome to constantly convert back-and-forth between binary and decimal if one were to use GMP. The crazy people who work on this apparently favour assembly though (ugh :) ).