Skip to content

Incorrect result when computing 0^{complex number} #18378

@anjali411

Description

@anjali411
>>> (0)**np.array([1-1j])
array([nan+nanj])
>>> (0)**torch.tensor([1-1j])
tensor([0.+0.j])

The correct answer here can be worked out by using limits and comes out to be 0 in the case Re(z)> 0, where z is the complex exponent. Please check out this stack exchange answer: https://math.stackexchange.com/questions/2087100/is-zero-to-the-power-of-an-imaginary-number-still-zero which explains this in detail.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions