bridge/class-master/depend/pari/src/basemath/gen2.c
/*******************************************************************/
/*                                                                 */
/*                          VALUATION                              */
/*             p is either a t_INT or a t_POL.                     */
/*  returns the largest exponent of p dividing x when this makes   */
/*  sense : error for types real, integermod and polymod if p does */
/*  not divide the modulus, q-adic if q!=p.                        */
/*                                                                 */
/*******************************************************************/
VALUATION
p is either a t_INT or a t_POL.
returns the largest exponent of p dividing x when this makes
sense : error for types real, integermod and polymod if p does
not divide the modulus, q-adic if q!=p.
VALUATION p is either a t_INT or a t_POL . returns the largest exponent of p dividing x when this makes sense : error for types real integermod and polymod if p does not divide the modulus q - adic if q! = p .
static long
minval(GEN x, GEN p)
{
  long i,k, val = LONG_MAX, lx = lg(x);
  for (i=lontyp[typ(x)]; i<lx; i++)
  {
    k = gvaluation(gel(x,i),p);
    if (k < val) val = k;
  }
  return val;
}
static long minval ( GEN x , GEN p ) { long i , k , val = LONG_MAX , lx = lg ( x ) ; for ( i = lontyp [ typ ( x ) ] ; i < lx ; i ++ ) { k = gvaluation ( gel ( x , i ) , p ) ; if ( k < val ) val = k ; } return val ; }
VALUATION
p is either a t_INT or a t_POL.
VALUATION p is either a t_INT or a t_POL .