Function: gcharisalgebraic
Section: number_fields
C-Name: gcharisalgebraic
Prototype: iGGD&
Help: gcharisalgebraic(gc,chi,{&typ}): returns 1 if chi is an algebraic (type A0)
 character. If typ is present, it is set to the infinity type [p,q] of chi.
Doc: \var{gc} being the structure returned by \kbd{gcharinit} and \var{chi}
 a character on \var{gc}, returns 1 if and only if \var{chi} is an algebraic
 (Weil type A0) character, so that its infinity type at every complex
 embedding~$\tau$ can be written
 $$ z \mapsto z^{-p_{\tau}}\bar{z}^{-q_{\tau}} $$
 for some pair of integers $(p_{\tau},q_{\tau})$.

 If \var{typ} is given, it is set to the \typ{VEC} of exponents
 $[p_{\tau},q_{\tau}]$.

 \bprog
 ? bnf = bnfinit(x^4+1,1);
 ? gc = gcharinit(bnf,1);
 ? gc.cyc
 % = [0, 0, 0, 0.E-57]
 ? chi1 = [0,0,1]~;
 ? gcharisalgebraic(gc,chi1)
 % = 0
 ? gcharlocal(gc,chi1,1)
 % = [-3, -0.89110698909568455588720672648627467040]
 ? chi2 = [1,0,0,-3]~;
 ? gcharisalgebraic(gc,chi2,&typ)
 % = 1
 ? typ
 % = [[6, 0], [2, 4]]
 ? gcharlocal(gc,chi2,1)
 % = [-6, 3*I]
 @eprog
