Urner wrote,
Question: why do both J and Python define 0**0 (or 0^0 in J) to be 1, when mathematicians (and Wolfram's Mathematica) call this undefined? Speaking of Wolfram, I did the simplest cellular automata from NKS in J. Output looks like this: http://www.inetarena.com/~pdx4d/ocn/graphics/Jnks1.png (this is after doing similar stuff in Python -- posted about it to this list in late May of this year).
For what it's worth, often it is convenient to define 0**0 to be 1--if I recall correctly, Maple's 0**0 has a value based on context, where x**0|x=0 is one and 0**x|x=0 is zero. Straight-out 0**0 was undefined. All of this is based on a demo copy on a hard drive that no longer exists, but I seem to remember coming across that and thinking it was cool.
Goodness. See the sci.math FAQ (sorry, you'll have to paste this together again): <http://www.cs.unb.ca/~alopez-o/math-faq/node40.html#SECTION0053000000000000 0000> Knuth is in good company with Euler and Kahan on this one <wink>. practicality-beats-purity-ly y'rs - tim
participants (2)
-
Lloyd Hugh Allen -
Tim Peters