Skip to content

Add angle function for stdlib_math: Return the angle of the complex argument. #489

Closed
@zoziha

Description

@zoziha

Description

angle computes the phase angle of complex scalar in the interval [-π,π]. The angles in theta are such that z = abs(z)*exp((0.0, theta)).

theta = [[stdlib_math(module):angle(interface) (z)  !! z: `complex` type

Inspired by forlab/angle(MIT license), has been implemented in this branch (add_angle and add_arg) (PR will be made later.)

Prior Art

  1. forlab/angle
  2. matlab/angle
  3. numpy/angle

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaProposition of an idea and opening an issue to discuss ittopic: mathematicslinear algebra, sparse matrices, special functions, FFT, random numbers, statistics, ...

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions