Open
Conversation
Currently question and answer gets rid of insignificant 0's. This should not happen, as it is technically part of the answer. This representation is how it is taught in school for exams, and is also clearer for seeing that the sign bit flips.
As pointed out in Issue lukew3#423, the `complex_to_polar` function did not make sense. Now it gives a complex number in component form, for a student to convert into polar form. This is not a perfect function, but at least it is usable now. In future, we may want to have the theta be chosen from amongst a set of multiples/fractions of pi, that tend to make for nicer questions and answers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes applied to 2s complement, and complex_to_polar functions so that they make more sense and look more like questions students may encounter and will need to deal with in class.