Skip to content

ac_complex::sign_conj return value #24

@ajaykumarkannan

Description

@ajaykumarkannan

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions