bridge/class-master/depend/pari/src/basemath/mftrace.c
/* *pCHI1 and *pCHI2 are mfchar, induce to common modulus */
pCHI1 and *pCHI2 are mfchar, induce to common modulus
pCHI1 and * pCHI2 are mfchar induce to common modulus
static void
char2(GEN *pCHI1, GEN *pCHI2)
{
  GEN CHI1 = *pCHI1, G1 = gel(CHI1,1), N1 = znstar_get_N(G1);
  GEN CHI2 = *pCHI2, G2 = gel(CHI2,1), N2 = znstar_get_N(G2);
  if (!equalii(N1,N2))
  {
    GEN G, d = gcdii(N1,N2);
    if      (equalii(N2,d)) *pCHI2 = induce(G1, CHI2);
    else if (equalii(N1,d)) *pCHI1 = induce(G2, CHI1);
    else
    {
      if (!equali1(d)) N2 = diviiexact(N2,d);
      G = znstar0(mulii(N1,N2), 1);
      *pCHI1 = induce(G, CHI1);
      *pCHI2 = induce(G, CHI2);
    }
  }
}
static void char2 ( GEN * pCHI1 , GEN * pCHI2 ) { GEN CHI1 = * pCHI1 , G1 = gel ( CHI1 , 1 ) , N1 = znstar_get_N ( G1 ) ; GEN CHI2 = * pCHI2 , G2 = gel ( CHI2 , 1 ) , N2 = znstar_get_N ( G2 ) ; if ( ! equalii ( N1 , N2 ) ) { GEN G , d = gcdii ( N1 , N2 ) ; if ( equalii ( N2 , d ) ) * pCHI2 = induce ( G1 , CHI2 ) ; else if ( equalii ( N1 , d ) ) * pCHI1 = induce ( G2 , CHI1 ) ; else { if ( ! equali1 ( d ) ) N2 = diviiexact ( N2 , d ) ; G = znstar0 ( mulii ( N1 , N2 ) , 1 ) ; * pCHI1 = induce ( G , CHI1 ) ; * pCHI2 = induce ( G , CHI2 ) ; } } }
pCHI1 and *pCHI2 are mfchar, induce to common modulus
pCHI1 and * pCHI2 are mfchar induce to common modulus