Skip to content
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 #1951

Closed
p6rt opened this issue Jul 20, 2010 · 4 comments
Closed

numeric types need "conjugate" operator #1951

p6rt opened this issue Jul 20, 2010 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 20, 2010

Migrated from rt.perl.org#76602 (status was 'rejected')

Searchable as RT76602$

@p6rt
Copy link
Author

p6rt commented Jul 20, 2010

From dave.whipp@gmail.com

(this is really a perl6 spec (S32) bug, not specifically rakudo ...
but rakudo is what I'm playing with)

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

@p6rt
Copy link
Author

p6rt commented Mar 28, 2013

From @coke

Since this is a spec ticket, I've rejected it here, and opened it in the spec queue as​:

Raku/old-design-docs#33

On Tue Jul 20 10​:26​:57 2010, dave.whipp@​gmail.com wrote​:

(this is really a perl6 spec (S32) bug, not specifically rakudo ...
but rakudo is what I'm playing with)

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

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Mar 28, 2013

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Mar 28, 2013

@coke - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Mar 28, 2013
@p6rt p6rt added the spec label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant