bridge/class-master/depend/pari/src/basemath/gen2.c
/*******************************************************************/
/*                                                                 */
/*                    CREATION OF A P-ADIC GEN                     */
/*                                                                 */
/*******************************************************************/
CREATION OF A P-ADIC GEN
CREATION OF A P - ADIC GEN
GEN
cgetp(GEN x)
{
  GEN y = cgetg(5,t_PADIC);
  y[1] = (x[1]&PRECPBITS) | _evalvalp(0);
  gel(y,2) = icopy(gel(x,2));
  gel(y,3) = icopy(gel(x,3));
  gel(y,4) = cgeti(lgefint(gel(x,3))); return y;
}
GEN cgetp ( GEN x ) { GEN y = cgetg ( 5 , t_PADIC ) ; y [ 1 ] = ( x [ 1 ] & PRECPBITS ) | _evalvalp ( 0 ) ; gel ( y , 2 ) = icopy ( gel ( x , 2 ) ) ; gel ( y , 3 ) = icopy ( gel ( x , 3 ) ) ; gel ( y , 4 ) = cgeti ( lgefint ( gel ( x , 3 ) ) ) ; return y ; }
CREATION OF A P-ADIC GEN
CREATION OF A P - ADIC GEN