2**2**2**2**2 wrong? Bug?

Wayne Brehaut wbrehaut at mcsnet.ca
Sun Jul 15 17:28:14 EDT 2007


On Fri, 13 Jul 2007 14:32:03 -0700, "mensanator at aol.com"
<mensanator at aol.com> wrote:

>On Jul 13, 2:52 pm, Wayne Brehaut <wbreh... at mcsnet.ca> wrote:
>> On Fri, 13 Jul 2007 11:30:16 -0700, Paul McGuire <pt... at austin.rr.com>
>> wrote:
>>
>>
>>
>>
>>
>> >On Jul 13, 1:20 pm, Wayne Brehaut <wbreh... at mcsnet.ca> wrote:
>> >> On Mon, 09 Jul 2007 23:51:25 -0700, "mensana... at aol.com"
>>
>> >> <mensana... at aol.com> wrote:
>> >> >On Jul 9, 11:42?pm, Paul McGuire <p... at austin.rr.com> wrote:
>> >> >> On Jul 9, 11:21 pm, "Jim Langston" <tazmas... at rocketmail.com> wrote:> In Python 2.5 on intel, the statement
>> >> >> > 2**2**2**2**2
>> >> >> > evaluates to>>> 2**2**2**2**2

=== 8< ===

>> >> >Did you count the 'L'?
>>
>> >> numdigits(n)?
>>
>> >> What?  'L' is a digit in Python?  I'm going back to Fortran!
>>
>> >> wwwayne

=== 8< ===

>> >'L' counts for 50, but only when you use Roman font.
>>
>> WTL?!  Not Times  New Roman I hope?
>>
>> Now I'll have to extend my remarks below to include:
>>
>>         L**L**L
>>         D**D**D
>>         M**M**M
>>         etc. (since I don't recall what comes next)
>>
>> though these (L, D, M, ...)  would seem to be numbers rather than
>> digits: the Romans used a base-1 system
>
>No, "base" refers to a Positional Number system for which
>radix 1 is undefined.
>
>You can call Roman Numerals a Tally System of Radix 1.

I can call it what I want--within reason--so long as those I'm mainly
addressing understand what I mean and the context in which I'm saying
it.  As I note in my other response to your response below, my remark
was intended to be humorous, and everyone else who responded took it
that way.

There's no need to get all formal in such a context, and there's no
harm in defining a  tally system to be 1-based or to be a base-1
system. If I had intended this to be a formal discussion instead of
just having a little fun (and sorry for doing that) I would have
instead said: "Define a base-1 number system as...".

Since you clearly don;t want to accept my terminology and assume
there's just one right one, please see
http://www.psinvention.com/zoetic/basenumb.htm for an independent
opinion of the reasonableness of using this term: "Base Valued Numbers

Any use of numbers implies the use of a base value for the numbers.
The simplest base value to use in a numbering scheme is '1'."

Because we're most familiar with the use of the term "base" in the
context of positional notation in no way implies that's the only
possible context in which it can be used--or has been used--with
perfectly clear meaning.  So the Roman system was based on the number
1 and was, therefore, 1-based or base-1.

Even in the context of positional systems it's perfectly clear what a
base-1 system would be and the fact that it's generally excluded isn;t
because it's not cleaar what it weould be, but only that most assume
it isn't of any uise, so exclude it.  As we all know:

1^0 = 1
1^1 = 1
1^n = 1 for any positive natural number
 [and negative natural numbers don't exist, but extension to negative
integers is left as an exercise for the reader]

In the base 1 positional number system, what is the value of:

1
11
111
1...1 (with n 1s)?

And would the value be any different if I wrote them:

      1
    11
  111
1...1 (with n 1s)?

In pictures:

Pos?   ?
Value  1  
Digit    1  

Pos?   ?  ? 
Value  1  1
Digit    1  1

Pos?   ?  ?   ?
Value  1  1  1
Digit    1  1  1

Pos?   ?  ...   ?
Value  1  ...  1 (n positions)
Digit    1  ...  1 (n 1s)

>Tally sytems ARE defined for radix 1, but operate
>completely different from positional systems.

Clearly, the algorithm to find the value of a base-1 number  is to
multiply the value of each position (1) by the digit in that position
(1) and add the results--just as you would do for any other positional
system. 

One common assumption for excluding base-1 is that this can't be a
proper positional number system because there's no zero digit, so how
can we represent the 0 value of a position? The obvious answer is that
there is no way of knowing what power of 1 each position represents
anyway, since the value of each and every  position is 1, so we just
leave out positions whose value is zero; equivalently, we just admit
that the base-1 tally system is equivalent to the base-1 positional
system so far as counting is concerned, since we don't count things
that aren't there.

I claim this demonstrates that your statement is incorrect: so far as
counting or representing a count is concerned the base-1 tally system
is the base-1 positional system, and is the base-1 system I claim
Roman numerals represent using various shorthand symbols and rules
(like subtracting the value of lesser-valued symbols when immediately
to the left of a higher-valued one--and this is a loose description,
so please don't look for counter-examples to prove me wrong here too).

Of course, by "operate completely different from positional systems"
you may have meant that when you go beyond counting to operations on
and between such numbers the usual rules and algorithms of positional
systems don't apply--but what has that to do with counting the number
of digits in a number respresented in this base-1 system? An
arithmetic on numbers (whether written using a positional system or
not) is a completely different animal than the base set of objects
themselves, and doesn't alter the fact of whether the numbers are or
aren't written in a positional notation!

And the p-adic numbers (http://en.wikipedia.org/wiki/P-adic_number)
also use a positional notation, but don't follow what you would
probably regard as "the only true rules and algorithms" of a
positional notation; so there's no such thing as "_the_ positional
notation".

But I digress (but only because provoked!)...

>> [for purposes of this argument, at least]

This statement is the informal equivalent to  saying  "Define a base-1
number system as...", as I noted above. If you'd noted this, and
understood it, or were willing to accept it whether or not you
understood it, you'd have saved us both some bother--but me more than
you I guess, so maybe you were just trolling?

wwwayne


>> so  I is the only Roman digit* and the others are
>> just shorthand for:
>>
>>    I = 1
>>    V = IIIII
>>    X = I*10
>>    L = I*50
>>    D = I*500
>>    M = I*1000
>>    etc.
>>
>> ---
>> For those who don't know which Roman digit I represents:
>>
>>    |
>> _\|/__
>>
>> wwwayne
>>
>>
>>
>>
>>
>> >-- Paul



More information about the Python-list mailing list