Yes, except instead of precomputing, you can generate power_table each
time by doing successive multiplications with the power. You only need
to generate as many entries as digits in the current value. The
multiplications are trivial if it's a constant power.
Of course 10 is the only significant non-power-of-two base anyway.
I've never tried that algorithm but I would guess it's faster than long
division.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/