bridge/class-master/depend/pari/src/basemath/mftrace.c
/* mf is either already split or output by mfinit. Splitting is done only for
 * newspace except in weight 1. If flag = 0 (default) split completely.
 * If flag = d > 0, only give the Galois polynomials in degree > d
 * Flag is ignored if dimlim = 1. */
mf is either already split or output by mfinit. Splitting is done only for
newspace except in weight 1. If flag = 0 (default) split completely.
If flag = d > 0, only give the Galois polynomials in degree > d
Flag is ignored if dimlim = 1.
mf is either already split or output by mfinit . Splitting is done only for newspace except in weight 1 . If flag = 0 ( default ) split completely . If flag = d > 0 only give the Galois polynomials in degree > d Flag is ignored if dimlim = 1 .
GEN
mfsplit(GEN mf0, long dimlim, long flag)
{
  pari_sp av = avma;
  GEN v, mf = checkMF_i(mf0);
  if (!mf) pari_err_TYPE("mfsplit", mf0);
  if ((v = obj_check(mf, MF_SPLIT)))
  { if (dimlim) v = dim_filter(v, dimlim); }
  else if (dimlim && (v = obj_check(mf, MF_SPLITN)))
  { v = (itos(gel(v,1)) >= dimlim)? dim_filter(gel(v,2), dimlim): NULL; }
  if (!v)
  {
    long newd;
    v = split_ii(mf, dimlim, flag, &newd);
    if (lg(v) == 1) obj_insert(mf, MF_SPLITN, mkvec2(utoi(dimlim), v));
    else if (!flag)
    {
      if (dim_sum(v) == newd) obj_insert(mf, MF_SPLIT,v);
      else obj_insert(mf, MF_SPLITN, mkvec2(utoi(dimlim), v));
    }
  }
  return gerepilecopy(av, v);
}
GEN mfsplit ( GEN mf0 , long dimlim , long flag ) { pari_sp av = avma ; GEN v , mf = checkMF_i ( mf0 ) ; if ( ! mf ) pari_err_TYPE ( " " , mf0 ) ; if ( ( v = obj_check ( mf , MF_SPLIT ) ) ) { if ( dimlim ) v = dim_filter ( v , dimlim ) ; } else if ( dimlim && ( v = obj_check ( mf , MF_SPLITN ) ) ) { v = ( itos ( gel ( v , 1 ) ) >= dimlim ) ? dim_filter ( gel ( v , 2 ) , dimlim ) : NULL ; } if ( ! v ) { long newd ; v = split_ii ( mf , dimlim , flag , & newd ) ; if ( lg ( v ) == 1 ) obj_insert ( mf , MF_SPLITN , mkvec2 ( utoi ( dimlim ) , v ) ) ; else if ( ! flag ) { if ( dim_sum ( v ) == newd ) obj_insert ( mf , MF_SPLIT , v ) ; else obj_insert ( mf , MF_SPLITN , mkvec2 ( utoi ( dimlim ) , v ) ) ; } } return gerepilecopy ( av , v ) ; }
mf is either already split or output by mfinit.
mf is either already split or output by mfinit .