Calculating challenge for large numbers

Hi folks. I have problem with multiplication and division when it comes to arbitrary large numbers.

Last edited on
12345* 56565656565656 =
6.9830303e+17

I can see where that may take a moment.


If it is working for the smaller values, e.g. 123 * 321 then the assumption that the math is correct - is likely.

Therefore I would "assume" that, with the larger values that you may have set your parameters too small;
storing the result set in an array [1000]
rather than 700,000,000,000,000,000 - (about).

Having said that, I'll say that debugging this code is difficult without the code to debug,
but I'll be happy to take a look at it if you want a second pair of i's .


Last edited on
closed account (D80DSL3A)
See http://www.cplusplus.com/forum/lounge/32041/

12345* 56565656565656 =
6.9830303e+17

I can see where that may take a moment.


If it is working for the smaller values, e.g. 123 * 321 then the assumption that the math is correct - is likely.

Therefore I would "assume" that, with the larger values that you may have set your parameters too small;
storing the result set in an array [1000]
rather than 700,000,000,000,000,000 - (about).

Having said that, I'll say that debugging this code is difficult without the code to debug,
but I'll be happy to take a look at it if you want a second pair of i's .


Last edited on
Topic archived. No new replies allowed.