Calculating challenge for large numbers

Nov 21, 2012 at 3:49am
Hi folks. I have problem with multiplication and division when it comes to arbitrary large numbers.

Last edited on Nov 23, 2012 at 1:18am
Nov 21, 2012 at 4:13am
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 Nov 21, 2012 at 4:20am
Nov 21, 2012 at 4:43am
closed account (D80DSL3A)
See http://www.cplusplus.com/forum/lounge/32041/
Nov 21, 2012 at 4:49am

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 Nov 23, 2012 at 1:18am
Topic archived. No new replies allowed.