Skip to content

Conversation

MaciejWdev
Copy link

@MaciejWdev MaciejWdev commented Aug 3, 2023

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.

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.
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.

1 participant