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.
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 givesNaNwhich is inconsistant with the behaviour ofMath.pow(-0.5, Infinity)which (correctly) gives0.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 gives0.new Complex(Infinity).equals(Infinity)currently returnsfalse.