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
numeric types need "conjugate" operator #33
Comments
Seems reasonable to me. I have to admit I thought complex conjugate was already in there. I will take a stab at it after rehearsal tonight if no one beats me to it. |
Yes, I added it to Rakudo a couple of years back ... not sure if it made it On Thu, Mar 28, 2013 at 5:14 PM, colomon notifications@github.com wrote:
|
+1 |
Complex conjugate is already in there, as conj. It was also as conjugate in one place, I have corrected that. I'm working on updating Math:: Vector, and may add a few additional tests to roast as well. |
Originally entered by Dave Whipp as https://rt.perl.org/rt3/Ticket/Display.html?id=76602
I was looking at colomon's Vector.pm in github, and noticed that
Vector::length is defined as { sqrt( self dot self ) }. This is
obviously incorrect for complex numbers: it should be { sqrt( self dot
conjugate self ) } (for some syntax of "conjugate")
I can't just add the method to the Complex class, because then the
Vector code would fail ("method not found") for all non-complex
numeric types (for which conjugation is an identity operation).
The text was updated successfully, but these errors were encountered: