-
Notifications
You must be signed in to change notification settings - Fork 86
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
Wrong quaternion norm implementation #22
Comments
It's not wrong; it's just the choice I made. I made that choice for consistency with another package I was using at the time. I agree that including the square-root is more common, but some sources do give the norm as simply the sum of the squares. You might also be interested in the |
For the record: I just realized that this choice for the definitions of |
Very confusing indeed. Why call "norm" something that is not a norm? Renaming it to something like |
Well, first of all, that would involve misspelling "Cayley". Second, this is not a seminorm as distinct from a norm because it does not send any nonzero quaternion to zero; referring to it as a seminorm would suggest otherwise.
Well, there are several reasons. First, it actually is a norm — but there are different conventions for what precisely "norm" refers to [see my comments above, or the very wikipedia article that you linked to]. In particular, the wikipedia article you link to defines a norm for a vector space and while quaternions do form a vector space, they also do more than that: they form an algebra. And specifically in the context of algebras, it is more common to use the word "norm" in reference to the squared version. Second, this is the choice consistent with the Boost implementation of quaternions, as well as python/numpy's implementation of complex numbers, plus the C++ standard for complex numbers [see my comments above, again]. Third, because I don't code for the lowest common denominator, tazr; you should probably learn to read, code for yourself, or stop complaining. |
The quaternion norm implementation actually gives the square of the quaternion norm as can be seen from the following simple code:
which results in:
The text was updated successfully, but these errors were encountered: