Strange rounding problem

Steven Taschuk staschuk at telusplanet.net
Sun Mar 16 21:56:07 CET 2003


Quoth Dan Bishop:
> Steven Taschuk <staschuk at telusplanet.net> wrote in message news:<mailman.1047756866.24097.python-list at python.org>...
  [...]
> > 6 and 14 seem just as good as 10 and 15 to me, by this criterion.
> 
> Imho, 6 would be better than either 10 or 14, because for any
> sufficiently large finite range of integers, there are more multiples
> of 3 than multiples of 5 and 7.
> 
> If we define the utility of a number base as proportional to the
> number of its factors (excluding itself), and inversely proportional
> to the magnitude of those factors (and use the Python script at the
> end of this message to calculate those factors), we find that the best
> bases are 12 (1.562), 6 (1.500), and 24 (1.361), and that bases 14,
> 21, 22, 25-28, and 32-35 are worse than the prime bases.

The thing is that we are not concerned with all factors, only the
prime ones.  For example, the fractions exactly representable in
base 12 are the same as those exactly representable in base 6;
that 4 divides 12 gains us nothing.  (I assume that the length of
the terminating expression is not of interest; only *that* it
terminates is.)

-- 
Steven Taschuk                                                 o- @
staschuk at telusplanet.net                                      7O   )
                                                               "  (





More information about the Python-list mailing list