Skip to content

Fix reciprocal of a complex number with zero imaginary part #1

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

Merged
merged 1 commit into from
Jun 13, 2015

Conversation

gagern
Copy link

@gagern gagern commented Jun 13, 2015

The reciprocal function is broken when applied to a complex number with zero imaginary part. The code path forgot to use a namespace for the result, and also forgot to include the imaginary part of the result. I added a suitable test case to the documentation to check for this. The missing namespace was found by jshint, the missing imaginary part then exposed by the unit test I had added.

I filed this as sloisel#59 but apparently that repository is largely unmaintained. Yours appears to be in a much better shape.

orangeduck added a commit that referenced this pull request Jun 13, 2015
Fix reciprocal of a complex number with zero imaginary part
@orangeduck orangeduck merged commit 537bd70 into orangeduck:master Jun 13, 2015
@orangeduck
Copy link
Owner

Thanks. I've merged this in. Hopefully there will be a merge into sloisel's repo at some point so it can be included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants