Message Boards Message Boards

0
|
4036 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

0^0 is undefined, but sometimes defined as 1?

Posted 8 years ago

When typing a calculation to Wolfram Alpha it always takes 0^0 as undefined, but for some calculations I need to preform, I specifically need it to be equal 1.

Is there a way to make it understand 0^0 as 1, or is there at least a workaround for this? (cases of 0^n where n>0 should still be 0)

POSTED BY: Matta Wes
2 Replies

Hi,

you can always define your own function:

myPower[x_, y_] := If[y == 0, 1, Power[x^y]]

or,alternatively, not recommended, redefine the existing function:

Unprotect[Power];
Power[x_, y_] := If[y == 0, 1, Power[x^y]]
Protect[Power];

Cheers,

M.

POSTED BY: Marco Thiel

You have to regard it as a limit, where it depends on the "path" towards that limit:

enter image description here

POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract