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!
Put the protect/unprotect into the table:
ParallelTable[Unprotect[Power]; Power[0 | 0., 0 | 0.] = 1; Protect[Power]; 0^0, {i, 5}]
I'm not sure how to do it globally, but you can make it a bit less painful if ParallelTable has to be called many times:
setPow := (Unprotect[Power]; Power[0 | 0., 0 | 0.] = 1; Protect[Power];);
ParallelTable[setPow; 0^0, {i,5}]
Block
Power
as some other function with the required behavior. $\endgroup$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. $\endgroup$Power
. $\endgroup$Block Power
method. I dont want anything unexpected to happen. $\endgroup$