<-- back

The special case of 00


Some computer programming languages are not exactly consistent (with other computer programming languages) when raising zero to the zero power: 00, due to differences in definitions by implementation.

Some return 1, 0 or even undefined.

Examples:

In Go, a complex (0+0i)0 = 1+0i  (and 1+0i == 1 //true)
In C++, (0+0i)0 = nan
In Wolfram, (0+0i)0 = (undefined)

(These examples are relevant because 0+0i == 0 //true)

The OEIS (Online Encyclopedia of Integer Sequences) explains the subject very well. (article)

We can try to explain this case with an ensemblistic approach:

In set theory, we notice that if two sets M and N have respectively a cardinal equal to n and m, then the number of applications from N to M is equal to mn. Thus, 00 represents, in this precise context, the number of applications from the empty set {Ø} to the empty set {Ø}, i.e. : 00 = 1.

(As an empty set have 0 element)