Function: gcharidentify
Section: number_fields
C-Name: gchar_identify
Prototype: GGGp
Help: gcharidentify(gc,Lv,Lchiv): returns a Grossencharacter chi belonging to gc
  that approximately satisfies the constraints that chi_v is Lchiv[i] at the
  place v=Lv[i].
Doc: \var{gc} being a Grossencharacter group as output by \kbd{gcharinit}, $Lv$
 being \typ{VEC} of places~$v$ encoded by a \typ{INT} (infinite place) or a prime
 ideal structure representing a prime not dividing the modulus of~$gc$ (finite
 place), and $Lchiv$ being a \typ{VEC} of local characters~$\chi_v$ encoded
 by~$[k,\varphi]$ with~$k$ a \typ{INT} and $\varphi$ a \typ{REAL} or
 \typ{COMPLEX} representing~$x\mapsto \text{sign}(x)^k|x|^{i\varphi}$ (real
 place) or~$z\mapsto (z/|z|)^k|z|^{2i\varphi}$(complex place) or by a \typ{REAL}
 or \typ{COMPLEX}~$\theta$ representing~$\goth{p} \mapsto \exp(2i\pi \theta)$
 (finite place), returns a Grossencharacter~$\psi$ belonging to~$g$ such
 that~$\psi_v \approx \chi_v$ for all~$v$.
 At finite places, in place of a scalar one can provide a \typ{VEC} whose
 last component is $\theta$, as output by \kbd{gcharlocal}.
 To ensure proper identification, it is recommended to provide all infinite
 places together with a set of primes that generate the ray class group of
 modulus \var{gc}\kbd{.mod}.

 \bprog
 ? bnf = bnfinit(x^2-5,1);
 ? gc = gcharinit(bnf,1);
 ? chi = gcharidentify(gc,[2],[[0,13.]]);
 ? gcharlocal(gc,chi,2)
 % = [0, 13.057005210545987626926134713745179631]
 ? pr = idealprimedec(bnf,11)[1];
 ? chi = gcharidentify(gc,[pr],[0.3]);
 ? gchareval(gc,chi,pr,0)
 % = 0.30000006229129706787363344444425752636
 @eprog

 If you know only few digits, it may be a good idea to reduce the current
 precision to obtain a meaningful result.

 \bprog
 ? bnf = bnfinit(x^2-5,1);
 ? gc = gcharinit(bnf,1);
 ? pr = idealprimedec(bnf,11)[1];
 ? chi = gcharidentify(gc,[pr],[0.184760])
 % = [-420226]~ \\ @com unlikely to be meaningful
 ? gchareval(gc,chi,pr,0)
 % = 0.18475998070331376194260927294721168954
 ? \p 10
   realprecision = 19 significant digits (10 digits displayed)
 ? chi = gcharidentify(gc,[pr],[0.184760])
 % = [-7]~ \\ @com probably what we were looking for
 ? gchareval(gc,chi,pr,0)
 % = 0.1847608033
 ? \p 38
   realprecision = 38 significant digits
 ? gchareval(gc,chi,pr,0)
 % = 0.18476080328172203337331245154966763237
 @eprog

 The output may be a quasi-character.

 \bprog
 ? bnf = bnfinit(x^2-2,1);
 ? gc = gcharinit(bnf,1); gc.cyc
 % = [0]
 ? gcharidentify(gc,[1,2],[[0,3.5+1/3*I],[0,-3.5+1/3*I]])
 % = [-1, 1/3]~
 @eprog
