"A.Cicak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
If you are going to work with strings as you mentioned thats actualy much slower than simply loop through array and multiply by 3 each element (of course store extra number which is carried over in the same loop). In your case it would require at least two passes and in this case only one.

(I'm not doing this, by the way, it's just theoretical, although now I kind of want to...)

I wouldn't work with strings, I'd do it with an array of integers as I said - the binary integers in the example were just to show what I meant. Multiplying each element by 3 is fine, but it was just an example: the point of the method is to be able to deal with arbitrarily large numbers, even those larger than 32 bits in size. In any case, the key point is that 'long multiplication' is a much cleaner operation in binary than it is in decimal.



Danny
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to