mrtn_spl wrote: > how can I perform standard computing operations (*,/,MOD, ...) with > numbers of sizes like 30 bytes, with the ULONG_MAX (the long long > type) being just 8 bytes? How is this done in those various > "multibyte" calculators where the operands' sizes are virtually > unrestricted? >
Thomas posted a link that should get you started. I read through that Wikipedia article and noticed it lacks any concrete examples, although it does have links to other resources that may have what you need. I looked for something more concrete where you could look at some actual code that works, and my first instinct was to look through Boost. I am not a Boost expert so I do not know off the top of my head if that library includes a class to handle this, and I did not find one in the documentation: perhaps someone more familiar with the library could confirm? If you have a JDK, look through the source code for the BigInteger class. While not a C++ implementation the syntax is very similar and the general algorithm is going to be pretty much the same as a C++ implementation (excluding mutability and memory management, of course). -- John Gaughan
