Re: is there an efficient algorithm for switching representation base?
- From: "apc" <andres.paniagua@xxxxxx>
- Date: 29 Jun 2006 05:54:37 -0700
Robert Israel wrote:
In article <1151301282.057399.220090@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
apc <andres.paniagua@xxxxxx> wrote:
Hi Chip, at this point I'm not taking into account the computing
platform. What I'm looking for is an algorithm to transform the
representation of a whole positive number N in some base a into some
other base b. ie. N=4, a=2, b=3 Na=100 Nb=11. N, b, a will all be
integers. I already know the one you mention, but is there anything
better? By good I mean that it take as few simple steps as possible.
Thanks a lot
apc.
IIRC Knuth "The Art of Computer Programming" volume II sec. 4.4
has a good discussion of this. The key phrase to look up is "radix
conversion".
Robert Israel israel@xxxxxxxxxxx
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
Thank you very much for the pointer, I should've thought of it myself.
I dug it up and am looking into it.
.
- Prev by Date: functions in set theory
- Next by Date: Eigen vector calculation
- Previous by thread: functions in set theory
- Next by thread: Eigen vector calculation
- Index(es):
Relevant Pages
|