## How can I make Mathematica agree that 0^0 = 1?

0

Occasionally I encounter messages like

Power::indet: Indeterminate expression (0. + 0. I)^0 encountered.

(or just 0^0). I believe I can safely declare these to be 1 for all of my purposes. Is there a way to build this in?

Question was closed 2017-07-18T05:15:43.463

@MichaelE2 Oh I see thanks. Could not find that for some reason, I honestly tried searching for 0^0. Let us mark it as duplicate. Although I already learned from the answer below some additional possibilities, but still... – მამუკა ჯიბლაძე – 2017-07-18T05:14:34.820

1@m_goldberg The way it was before your edit looked nicer with all that color-coding, are there specific reasons why your version is better? – მამუკა ჯიბლაძე – 2017-07-18T05:38:03.620

The formatting I applied to the error message is the formatting we have been using for such on this site for all the years I have been a member. The idea is that messages should be distinct from code. – m_goldberg – 2017-07-18T06:05:53.810

@m_goldberg I see. Pity. I wonder if somebody could be asked to extend color coding to messages too. Besides, it is just a random choice of convention which ones should go with four spaces and which with >!, no? – მამუკა ჯიბლაძე – 2017-07-18T06:18:24.320

Messages issued in Mathematica do not have color coding. Messages are are mixture of text and code. It is probably more trouble that it would be worth to try to get lexical scanner to distinguish what is text and what is code. – m_goldberg – 2017-07-18T07:11:02.387

@m_goldberg Actually my 11.0.1.0 does color them (the head is red and the rest pale grey). Besides, if you paste them here through four spaces, they automatedly get more color coding distinctions than just chunks of code, so I wonder why is that feature there if they should not be entered like that... – მამუკა ჯიბლაძე – 2017-07-18T07:17:25.970

4

Unprotect[Power];

You should add also the cases like Power[0.,0.]. When you want to clear your own definitions, Unprotect, Clear, Protect.