|
Re: Could 0^0=0? Maybe!
Posted:
Sep 26, 2013 5:10 AM
|
|
In article <b63a9e66-57b3-45f7-a1b6-5adcd9700978@googlegroups.com>, Dan Christensen <Dan_Christensen@sympatico.ca> wrote:
>Many designers of programming languages assume that 0^0=1.
Do you have any evidence that they "assume" this, rather than investigating it and making a reasoned decision?
Designers of current programming languages may follow IEEE 754, which defines three power functions. pown(x,y) is defined for integral exponents only, and has pown(0,0) = 1, which avoids many special cases. powr(x,y) is defined as exp(y log(x)) so naturally has powr(0,0) raise an exception. The generic pow(x,y) has pow(0,0) = 1.
-- Richard
|
|