# How to set a shared variable Power (a modified one)?

Unprotect[Power];
Power[0|0., 0|0.] = 1 ;
Protect[Power];

Table[0^0, {i, 5}]


No problem at all.

 ParallelTable[0^0, {i, 5}]


becomes a problem.

How can I set this for all kernels?

Thanks!

• May very seriously break built-in functions or alternatively the rule could magically disappear at any time without warning. I would not recommend this approach. Instead Block Power as some other function with the required behavior. Feb 7, 2015 at 0:43
• @OleksandrR. Is MMA using this Power of 0^0 somewhere as a trick? Why would it seriously break built-in functions? I am a bit curious. As Maple define 0^0 to be 1. So no adjustment is need. I dont want to argue about why this definition is need sometimes. But I can't think of any harm if we simply define 0^0=1. Feb 7, 2015 at 0:48
• I think this definition is fine as long as everyone agrees on it. But in reply to your opening question: we simply can't know. So, by all means do this, but preferably not by directly re-defining the built-in Power. Feb 7, 2015 at 1:20
• Have you tried the method I proposed here?: (60575). I didn't write that with parallel computation in mind but I think it would work, though I have no time to properly test this now. Feb 7, 2015 at 12:45
• @OleksandrR. For the moment, I think I will stick to your Block Power method. I dont want anything unexpected to happen. Feb 7, 2015 at 14:20

ParallelTable[Unprotect[Power]; Power[0 | 0., 0 | 0.] = 1; Protect[Power]; 0^0, {i, 5}]

setPow := (Unprotect[Power]; Power[0 | 0., 0 | 0.] = 1; Protect[Power];);