Suppose we want to represent K > 0 to the base e, and suppose that e^r is the largest integer power of e that does not exceed K. Hence K = c (e^r) where 0 <= c < e.
Then we use as highest-order digit d = 0, 1, 2 according as 0 <= c < e/3; e/3 <= c < 2e/3; 2e/3 <= c < e, or in brief, d = [3c/e].
(Of course, the calculation of digits continues by applying the above to the quantity K - d(e^r), now using e^(r-1) in place of e^r, ad infinitum.)
I wonder if anything nifty comes from treating the digits in this symmetrical fashion.
Yes: underflow. When you try to represent 5, the first digit is floor(3*5/e^2) = 2, and the remainder is 5-2e = -0.436... You're stuck. The set of unrepresentable numbers looks pretty dense, except at the start: 5 10 12 14 20 21 22 27 30 34 37 38 39 40 42 47 54 60 61 67 68 69 72 73 74 80 82 83 84 87 89 91 92 93 94 99 100 101 102 103 104 105 106 107 108 109 116 122 123 128 129 132 133 134 136 142 143 144 145 146 147 148 151 153 161 162 163 167 168 171 181 182 183 185 186 187 188 194 195 198 199 200... Of the first 10000 positive integers, 6099 are unrepresentable. -- Don Reble djr@nk.ca