Skip to content

Behaviour of non-finite complex numbers. #5

@harrysarson

Description

@harrysarson

I was looking into issue josdejong/mathjs#804 regarding the behaviour of negative numbers raised to infinite powers.

Support for non-finite complex numbers seems to be incomplete in complex.js and I was wondering if it was something that you are planning to support more comprehensively. For example:

  • new Complex(-0.5).pow(Infinity) currently gives NaN which is inconsistant with the behaviour of Math.pow(-0.5, Infinity) which (correctly) gives 0.

Additionally I found a couple of bug which need fixing regardless of whether the library is extended to add proper support for complex numbers.

  • new Complex(0).inverse() currently gives 0.
  • new Complex(Infinity).equals(Infinity) currently returns false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions