Skip to content

un complex returns real and imaginary parts in opposite orders in array #872

@aoanla

Description

@aoanla

In uiua 0.17.2, trying to "un complex" an array of complex values returns two arrays with opposite ordering - the real parts are ordered correctly as in the source array, but the imaginary parts are in reverse order.
This means that "complex un complex" is not an identity operation!

Example:

°ℂ[¯0.5+0.8660254037844387i ¯0.5-0.8660254037844387i 1]

output:
[¯0.5 ¯0.5 1]
[0 0.8660254037844387 ¯0.8660254037844387]

and thus doing

ℂ°ℂ[¯0.5+0.8660254037844387i ¯0.5-0.8660254037844387i 1]

results in
[¯0.5 ¯0.5+0.8660254037844387i 1-0.8660254037844387i]

Metadata

Metadata

Assignees

No one assigned

    Labels

    not a bugSomething that seems like a bug is not

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions