Function: gcharlocal
Section: number_fields
C-Name: gcharlocal
Prototype: GGGpD&
Help: gcharlocal(gc,chi,v,{&BID}): if v is a place, return the local character
 chi_v. If v is a prime dividing the modulus and the optional argument 'BID'
 is present, set BID to the corresponding idealstar structure.
Doc: \kbd{gc} being a gchar structure initialised by \kbd{gcharinit}, returns
 the local component $\chi_{v}$, where $v$ is either an integer between~$1$
 and~$r_{1}+r_{2}$ encoding an infinite place, or a prime ideal structure
 encoding a finite place.

 \item if~$v$ is a real place, $\chi_{v}(x) = \text{sign}(x)^{k}
 |x|^{i \varphi}$ is encoded as~$[k,\varphi]$;

 \item if~$v$ is a complex place, $\chi_{v}(z) = (z/|z|)^{k} |z|^{2i \varphi}$
 is encoded as~$[k,\varphi]$;

 \item if~$v = \goth{p}$ is a finite place not dividing~\var{gc}\kbd{.mod},
 $\chi_{v}(\pi_{v}) = \exp(2i\pi \theta)$ is encoded as~$[\theta]$;

 \item if~$v = \goth{p}$ is a finite place dividing~\var{gc}\kbd{.mod},
 we can define a \var{bid} structure attached to the multiplicative group
 $G = (\Z_{K}/\goth{p}^{k})^{*}$, where $\goth{p}^{k}$ divides exactly
 \var{gc}\kbd{.mod} (see \kbd{idealstar}).
 Then~$\chi_{v}$ is encoded as~$[c_{1},\dots,c_{n},\theta]$
 where~$[c_{1},\dots,c_{n}]$ defines a character on $G$
 (see \kbd{gchareval}) and~$\chi_{v}(\pi_{v}) = \exp(2i\pi \theta)$.
 This \var{bid} structure only depends on \kbd{gc} and $v$
 (and not on the character $\chi$);
 it can be recovered through the optional argument \var{BID}.
 \bprog
 ? bnf = bnfinit(x^3-x-1);
 ? gc = gcharinit(bnf,1);
 ? gc.cyc
 % = [0, 0, 0.E-57]
 ? chi = [0,1,1/3]~;
 ? pr = idealprimedec(bnf,5)[1];
 ? gcharlocal(gc,chi,1)
 % = [0, -4.8839310048284836274074581373242545693 - 1/3*I]
 ? gcharlocal(gc,chi,2)
 % = [6, 2.4419655024142418137037290686621272847 - 1/3*I]
 ? gcharlocal(gc,chi,pr)
 % = [0.115465135184293124024408915 + 0.0853833331211293579127218326*I]
 ? bnf = bnfinit(x^2+1,1);
 ? pr3 = idealprimedec(bnf,3)[1];
 ? pr5 = idealprimedec(bnf,5)[1];
 ? gc = gcharinit(bnf,[pr3,2;pr5,3]);
 ? gc.cyc
 % = [600, 3, 0, 0.E-57]
 ? chi = [1,1,1]~;
 ? gcharlocal(gc,chi,pr3,&bid)
 % = [1, 1, -21/50]
 ? bid.cyc
 % = [24, 3]
 ? gcharlocal(gc,chi,pr5,&bid)
 % = [98, -0.30120819117478336291229946188762973702]
 ? bid.cyc
 % = [100]
 @eprog
