I want to optimize some division algorithm for large numbers, but this is dependent on how fast i can multiply the divisor with powers of ten: divisor * power(10, n)
where n is a positive integer. i know about some optimized multiplication algorithms such as the use of FFT, but that still goes though O(nlog(n))
, but am looking for something optimized for this case only, otherwise my algorithm performance will have performance greater than O(nlog(n))
. Any idea if there is an optimization for this special case?
Note that i intend to implement this in C++.