New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isNaN for compexes. #930

balagge opened this Issue Aug 21, 2017 · 3 comments


None yet
3 participants

balagge commented Aug 21, 2017

I do not know if this is a bug or some intended behavior, but I guess it is a bug.
The utility function isNaN() works for Complexes:

'Complex': function (x) {
      return Number.isNaN( && Number.isNaN(;

Here, the && should be ||.

Better still, complex.js offers an isNaN() method (which returns isNaN(this['re']) || isNaN(this['im'])) btw.

So it could also be:

'Complex': function (x) {return x.isNaN();}

This comment has been minimized.


harrysarson commented Aug 21, 2017

That looks like a bug to me


This comment has been minimized.


josdejong commented Aug 21, 2017

Thanks for reporting, this is indeed a bug. It's fixed now in the develop branch.

@josdejong josdejong added the bug label Aug 21, 2017

@josdejong josdejong closed this in 83e3591 Aug 28, 2017


This comment has been minimized.


josdejong commented Aug 28, 2017

Should be fixed now in v3.16.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment