In a script, I need to define $0^0=1$ to simplify the writing of my functions. I read this question : Could I define 0^0 to be 1?

I don't understand the codes (I could copy/paste but I won't learn).

In the second answer he does this :

Power[0|0., 0|0.] = 1

I understand than Unprotect allows us to modify the definition of the function.

But what I don't understand is the vertical bar | : what does it mean ?

In fact I need to understand precisely the meaning of Power[0|0., 0|0.] = 1.

I know it defines $0^0=1$ but I don't understand the line.

Also, in the other answer, they use the symbol /;. What does it mean ??

  • 2
    $\begingroup$ See a section: What the @#%^&*?! do all those funny signs mean?. Also, you can always hit F1 if you face something new. $\endgroup$ – Kuba Jun 18 '17 at 14:55
  • 1
    $\begingroup$ @StarBucK | stands for Alternative which is kind of like an Or operation for definining Patterns $\endgroup$ – Ali Hashmi Jun 18 '17 at 14:59

Browse other questions tagged or ask your own question.