Re: "number-in-base" ``oneliner''
From: Jeremy Bowers (jerf_at_jerf.org)
Date: 10/30/04
- Next message: Jeremy Bowers: "Re: What is Python's answer to Perl 6?"
- Previous message: Krzysztof Książek: "Re: py2exe and window with info about error"
- In reply to: Andrea Griffini: "Re: "number-in-base" ``oneliner''"
- Next in thread: Brian van den Broek: "[OT] Re: "number-in-base" ``oneliner''"
- Reply: Brian van den Broek: "[OT] Re: "number-in-base" ``oneliner''"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Oct 2004 17:29:24 GMT
On Sat, 30 Oct 2004 12:12:36 +0000, Andrea Griffini wrote:
> You can't count using base 1 with positional systems.
Well, you can, sort of. You end up with the integers, obviously, and the
result has a rather striking resemblance to the modern foundations of
number theory, in which there is only one number, 0, and the "increment"
function which returns a number one larger. If you want three, it is
expressed increment(increment(increment(0))), which is rather similar to
the base-1 number "111".
Zero in this system would probably be a null string, making increment this:
def increment(number):
return "1" + number
(And abracadabra, I'm back on topic for the newsgroup, albeit tenuously :-) )
Some people say base 2 is the most natural base in the universe. But you
can certainly make a claim for base 1, based on its correspondence to
number theory, from which we build the rest of math. (Most people never
dig this deep; it was one of my favorite classes in Comp. Sci., though,
and we're probably the only people other than mathematicians to offer the
course.)
- Next message: Jeremy Bowers: "Re: What is Python's answer to Perl 6?"
- Previous message: Krzysztof Książek: "Re: py2exe and window with info about error"
- In reply to: Andrea Griffini: "Re: "number-in-base" ``oneliner''"
- Next in thread: Brian van den Broek: "[OT] Re: "number-in-base" ``oneliner''"
- Reply: Brian van den Broek: "[OT] Re: "number-in-base" ``oneliner''"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]