bridge/class-master/depend/pari/src/basemath/alglin2.c
/* Maximal pivot strategy: x is a suitable pivot if it is non zero and either
 * - an exact type, or
 * - it is maximal among remaining non-zero (t_REAL) pivots */
Maximal pivot strategy: x is a suitable pivot if it is non zero and either
- an exact type, or
- it is maximal among remaining non-zero (t_REAL) pivots
Maximal pivot strategy : x is a suitable pivot if it is non zero and either - an exact type or - it is maximal among remaining non - zero ( t_REAL ) pivots
static int
suitable(GEN x, long k, GEN *pp, long *pi)
{
  long t = typ(x);
  switch(t)
  {
    case t_INT: return signe(x) != 0;
    case t_FRAC: return 1;
    case t_REAL: {
      GEN p = *pp;
      if (signe(x) && (!p || abscmprr(p, x) < 0)) { *pp = x; *pi = k; }
      return 0;
    }
    default: return !gequal0(x);
  }
}
static int suitable ( GEN x , long k , GEN * pp , long * pi ) { long t = typ ( x ) ; switch ( t ) { case t_INT : return signe ( x ) != 0 ; case t_FRAC : return 1 ; case t_REAL : { GEN p = * pp ; if ( signe ( x ) && ( ! p || abscmprr ( p , x ) < 0 ) ) { * pp = x ; * pi = k ; } return 0 ; } default : return ! gequal0 ( x ) ; } }
Maximal pivot strategy: x is a suitable pivot if it is non zero and either
 - an exact type, or
 - it is maximal among remaining non-zero (t_REAL) pivots
Maximal pivot strategy : x is a suitable pivot if it is non zero and either - an exact type or - it is maximal among remaining non - zero ( t_REAL ) pivots