On Apr 16, 11:03 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> | decimal.InvalidOperation: 0 ** 0
>
> I would think of this as a bug unless the standard Decimal follows demands
> this.
It does. From http://www2.hursley.ibm.com/decimal/daops.html#refpower
:
"If both operands are zero, or if the
On 17 avr, 00:49, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Wed, 16 Apr 2008 19:21:18 -0300, John Machin <[EMAIL PROTECTED]>
> escribió:
>
> > [EMAIL PROTECTED] wrote:
> >> also i found a link which states 0^0 isnt 1 even though every
> >> calculator ive tried says it is.
> >> it doesnt s
actually that 0**0 statement was wrong. 0**0 = 1 and should be.
--
http://mail.python.org/mailman/listinfo/python-list
"Mark Dickinson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On Apr 16, 4:19 pm, [EMAIL PROTECTED] wrote:
> how do i solve power(5,1.3)?
>
[...]
>
> 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 pr
On Apr 16, 5:49 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Wed, 16 Apr 2008 19:21:18 -0300, John Machin <[EMAIL PROTECTED]>
> escribió:
>
> > [EMAIL PROTECTED] wrote:
> >> also i found a link which states 0^0 isnt 1 even though every
> >> calculator ive tried says it is.
> >> it does
En Wed, 16 Apr 2008 19:21:18 -0300, John Machin <[EMAIL PROTECTED]>
escribió:
> [EMAIL PROTECTED] 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
[EMAIL PROTECTED] wrote:
> how do i solve power(5,1.3)?
Is this a trick question? OK, I'll bite:
>>> 5 ** 1.3
8.1032829834638136
>>>
>
> def power(nbr, po):
> if po==0:
> return 1
> if po>0:
> return nbr*power(nbr, po-1)
> if po<0:
> return 1/power(nbr, -1*
On Apr 16, 4:19 pm, [EMAIL PROTECTED] wrote:
> how do i solve power(5,1.3)?
>
[...]
>
> 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?
>>> 5**1.3
8.10328
how do i solve power(5,1.3)?
def power(nbr, po):
if po==0:
return 1
if po>0:
return nbr*power(nbr, po-1)
if po<0:
return 1/power(nbr, -1*po)
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