Zero to the zero power: Difference between revisions

→‎{{header|J}}: expand on the concept
(→‎{{header|jq}}: jq, gojq, fq)
(→‎{{header|J}}: expand on the concept)
Line 707:
<syntaxhighlight lang="j"> 0 ^ 0
1</syntaxhighlight>
 
Note also that this is the multiplicative identity (which means that it's consistent with <code>1*0</code> representing <code>0^1</code> and with <code>1*0*0</code> representing <code>0^2</code> and <code>1*0*0*0</code> representing <code>0^3</code> and so on. Also, this is the result of finding the product of an empty list:
 
<syntaxhighlight lang="J"> */''
1</syntaxhighlight>
 
(In <code>*/''</code> we're finding the product of a list which contains no characters. This is, of course, the same as the product of a list which contains no numbers. That said, characters are outside the domain of multiplication in J, so if the list had contained any characters the product would have been an error rather than a result.)
 
=={{header|Java}}==
6,951

edits