Numeric literals in other than base 10 - was Annoying octal notation
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Thu Aug 27 05:27:05 CEST 2009
On Wed, 26 Aug 2009 18:53:04 -0700, Erik Max Francis wrote:
>> In any case, unary is the standard term for what I'm discussing:
>>
>> http://en.wikipedia.org/wiki/Unary_numeral_system
>>
>> although Mathworld doesn't seem to know it.
>
> Psst. That's a hint.
>
> Googling for "unary number system" ("unary numeral system" just comes up
> with endless mirrors of Wikipedia) gives Wikipedia as hit #1. Hit #2 is
> from the Institute of Druidic Technology, another hint. The remaining
> hits are pretty much people pontificating in discussion groups just as
> they are in this one.
Perhaps you should FOLLOW THE REFERENCES from the Wikipedia article,
instead of relying on Google.
http://www.research.att.com/~njas/sequences/A000042
which in turn points to primary references:
K. G. Kroeber, Mathematik der Palindrome; p. 348; 2003; ISBN 3 499
615762; Rowohlt Verlag; Germany
D. Olivastro, Ancient Puzzles. Bantam Books, NY, 1993, p. 276.
Amarnath Murthy, On the divisors of the unary sequence, Smarandache
Notions Journal Vol. - 11, 2000.
Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some
New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA
2005. See Section 2.12.
> Yes, you can define something that works. But it's not the usual
> mathematical definition of radix,
It's not a radix. I never said it is a radix. Only you and Mensator are
confusing it with a radix system, which is *your* problem, not mine.
> so if you want to talk about it you
> have to disclaim that it's not a proper base and that's you're making up
> as you go. But you can't pretend like it's the "obvious" mathematical
> meaning just because the usual mathematical meaning doesn't apply, which
> is what you seem to be doing.
I explicitly gave an example, showing what I meant by unary, because I
knew it would be unfamiliar terminology for most people. When my example
was ignored completely, I explained further, and showed that it's fairly
standard terminology. It is *uncommon* terminology, since most
mathematicians don't concern themselves with non-positional number
representations, which is why Goggle doesn't find many references to it
apart from Wikipedia and copies of Wikipedia.
David Wheeler also discusses "base 1", and describes it as "cheating a
bit". It's only cheating if you assume you're working with a positional
radix system, which tallies aren't.
Here's another example, from American Scientist:
https://www.americanscientist.org/issues/pub/third-base/2
although that site seems to be having problems now and you're best off
with the Google cache:
http://74.125.153.132/search?q=cache:7hlZ33y4uCAJ:https://
www.americanscientist.org/issues/pub/third-base/2+%22base+1%22
+numbers&cd=18&hl=en&ct=clnk&gl=uk&ie=UTF-8
[quote]
How do you measure the cost of a numeric representation? If you simply
count digits, then the biggest base will always win; for example, base
1,000,000 can represent any number between 0 and decimal 999,999 in a
single digit. The trouble is, that single digit can be any of a million
different symbols, all of which you must somehow recognize. At the
opposite pole are unary, or base-1, numbers. The unary representation of
decimal 1,000,000 needs only one type of symbol, but that symbol is
repeated a million times. (Unary notation is in a category apart from
other bases—it's not really a positional number system—but in the present
context it serves as a useful limiting case.)
[end quote]
This really isn't anywhere near as controversial as you guys are making
it. Words sometimes have meanings different from what you expect from
reasoning by analogy. Get over it.
--
Steven
More information about the Python-list
mailing list