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

ac_complex::sign_conj return value #24

Open
ajaykumarkannan opened this issue Dec 11, 2023 · 0 comments
Open

ac_complex::sign_conj return value #24

ajaykumarkannan opened this issue Dec 11, 2023 · 0 comments

Comments

@ajaykumarkannan
Copy link

I'm slightly confused about the definition of the sign_conj function in ac_complex. According to the PDF docs, it does the following:

sign_conj() returns (sign(real), sign(imag))) as an ac_complex<ac_int<2,true> >

However, the definition returns the following:

  ac_complex< ac_int<2,true> > sign_conj() const {
    return ac_complex< ac_int<2,true> >(
      _r ? (_r < 0 ? -1 : 1) : 0,
      _i ? (_i < 0 ? 1 : -1) : 0
    );
  }

ac_complex< ac_int<2,true> > sign_conj() const {

Based on the code and name, it returns the sign of the conjugate. Can someone please confirm if this is correct, and if so, perhaps update the docs, or let me know so I can send a PR to update the wording, something along the lines of:

returns (sign(real(conj())), sign(imag(conj())))) as an ac_complex<ac_int<2,true>

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

No branches or pull requests

1 participant