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

Evan Klitzke evan at yelp.com
Thu Jul 12 02:47:55 CEST 2007


On 7/11/07, Gabriel Genellina <gagsl-py2 at yahoo.com.ar> wrote:
> En Wed, 11 Jul 2007 16:39:17 -0300, Paul McGuire <ptmcg at austin.rr.com>
> escribió:
>
> > As was
> > pointed out earlier, left-associativity with exponentiation is of
> > little value, since (2**3)**2 is the same as 2**(3*2) or 2**6=64.
>
> Just for curiosity: This helps to find the answer to the problem "Which is
> the largest number that can be written with only 3 digits?"
> Some people stop at 999, others try 99**9 and 9**99, and the winner is
> 9**9**9, or:
>
> |   9
> |  9
> | 9
>
> Sorry, couldn't resist.

But you can append ! (i.e. factorial) indefinitely without adding any
digits to make the number arbitrarily large ;-)

-- 
Evan Klitzke <evan at yelp.com>


More information about the Python-list mailing list