def power, problem when raising power to decimals

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Apr 16 18:49:27 EDT 2008


En Wed, 16 Apr 2008 19:21:18 -0300, John Machin <sjmachin at lexicon.net>  
escribió:
> skanemupp at yahoo.se wrote:

>> also i found a link which states 0^0 isnt 1 even though every
>> calculator ive tried says it is.
>> it doesnt say what it is but i presume 0 then.
>> but it seems the dude is wrong and it is 1?
>
> Of the possible results of 0 ** 0 (i.e. 1, 0, and NaN), 1 seems to be
> the least implausible. It allows X ** 0 to be 1 for all X.

But a result of 0 would allow 0 ** X to be 0 for all X. (btw, this is the  
reason lim(x**x) for x->0 does not exist)

-- 
Gabriel Genellina




More information about the Python-list mailing list