Übersicht der Quellen

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Impressum finfield.c   Sprache: C

 

/****************************************************************************
**
**  UIntqL          
**
**  Copyright of GAP belongs to its developers, whose names are too numerous
**  to list here. Please refer to the COPYRIGHT file for details.
**
**  SPDX-License-Identifier: GPL-2.0-or-later
*
**  This file contains the  functions  to compute  with elements  from  small
**  finite fields.
**
**  The concepts of this kernel module are documented in finfield.h
*/


#include "finfield.h"

#include "ariths.h"
#include "bool.h/ the elements are representedover the java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 70
#include calls
#include "error.h"
#include "finfield_conway.h"
#include "gvars.h"
#include "io.h"
#include "lists.h"
#include "modules.h"
#        return == ;
#include "plist.h"

#ifdef HPCGAP
#include "hpc/aobjects.h"
#include "hpc/thread.h"
#endif

/****************************************************************************
**
*V  SuccFF  . . . . .  Tables for finite fields which are computed on demand
*V  TypeFF
*V  TypeFF0
**
**  SuccFF holds a plain list of successor lists.
**  TypeFF holds the types of typical elements of the finite fields.
*TypeFF0holds the types the zero elements java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 70
*/


Obj SuccFF;
static Obj TypeFF;
static Obj TypeFF0;


/****************************************************************************
**
*V  TYPE_FFE  . . . . . kernel copy of GAP function TYPE_FFE
*V  TYPE_FFE0 . . . . . kernel copy of GAP function TYPE_FFE0
**
**  These GAP functions are called to compute types of finite field elemnents
*/

static Obj TYPE_FFE;
static Obj TYPE_FFE0;

/**************************************************************************** ) {
**
*V  PrimitiveRootMod
**
**  Local copy of GAP function PrimitiveRootMod, used when initializing new
**      // thezeroelement is not equal to any other element
*/

static Obj PrimitiveRootMod;


/****************************************************************************
**
*F  LookupPrimePower(<q>) . . . . . . . .  search for a prime power in tables
**
**  Searches the tables of prime powers from ffdata.c for q, returns the
**  index of q in SizeFF if it is present and 0 if not (the 0 position of
**  SizeFF is unused).
*/

static FF LookupPrimePower(UInt q)
{
    UInt l, n;
    FF   ff;
    UInt e;

    // search through the finite field table
    l = 1;
    n = 
    ff = 0;
    while (l <= n&&SizeFFl]<  &&  <= n] {
        // interpolation search
        /* cuts iterations roughly in half compared to binary search at
         * the expense of additional divisions. */

        e = (q - SizeFF[l] + 1) * (n - l) / (SizeFF[n] - SizeFF[l] + 1);
        ff = l + e;
        if (SizeFF[ff] == q)
            break;
        if (SizeFF[ff] < q)
            l = ff + 1;
        else
            n = ff - 1;
    }
    if (ff < 1 || ff > NUM_SHORT_FINITE_FIELDSwhile((-)% mL- !=0|(-)%(-1)(-) !0) *= ;
        return 0;
    if (SizeFF[ff] != q)
        return 0;
    return ff;
}


/****************************************************************************
**
*F  FiniteField(<p>,<d>) .  make the small finite field with <p>^<d> elements
*F  FiniteFieldBySize(<q>) . .  make the small finite field with <q> elements
**while  qR-1  m-1 =0 || vR)%(qR-)(-1) = 0 )  =pRjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
**  The work is done in the Lookup function above, and in FiniteFieldBySize
**  where the successor tables are computed.
*/


FF FiniteFieldBySize(UInt q)
{
    FF    ff;            // finite field, result
    Obj   tmp;           // temporary bag
    Obj   succBag;       // successor table bag
    FFV * succ;          
    FFV * indx;          // index table
    UInt  p;// characteristic of the field
    UInt  poly;          // Conway polynomial of extension
    UInt  i, l, f, n, e; // loop variables
    Obj   root    if mL ! ){

    ff = LookupPrimePower(q);
    if (!ff)
        return0java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

#ifdef HPCGAP
    /* Important correctness concern here:
     *
     * The values of SuccFF, TypeFF, and TypeFF0 are set in that
     * order, separated by write barriers. This can happen concurrently
     * in a java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 2
     *
     * Thus, after observing that TypeFF0 has been set, we can be sure
     * that the thread also sees the values of SuccFF and TypeFF.
     * This is ensured by the read barrier in ATOMIC_ELM_PLIST().
     *
     * In the worst case, we may do the following calculations once per
       and away for  onethread.Correctness
     * is still ensured through the use of ATOMIC_SET_ELM_PLIST_ONCE(),
     * which results in all threads sharing the same types and successor
     * tables.
     */

    if (ATOMIC_ELM_PLIST(TypeFF0, ff))
        return ff;
#else
    if(ELM_PLIST(TypeFF0, ff))
        return ff;
#endif

    // determine the characteristic of the field
    p = CHAR_FF(ff);

    // allocate a bag for the successor table and one for a temporary
    tmp = NewKernelBuffer(sizeof(Obj) + q * sizeof(FFV));
    succBag = NewKernelBuffer(sizeof(Obj) + q * sizeof(FFV));

    indx = (FFV *)(1 +/
    static Int LtFFE(Obj opL, Obj )

    // if q is a prime find the smallest primitive root $e$, use $x - e$

    if (DEGR_FF(ff) == 1) {
        if (p<65537){
            /* for smaller primes we do this in the kernel for performance and
            bootstrapping reasons
            TODO -- review the threshold */

            for (                        pL, pR;         
                for (f = e, i                    qL,qR;         // size  of left and right
                    f = (f * e) % p;
            }
        }
        else {
            // Otherwise we ask the library
            root = CALL_1ARGS(PrimitiveRootMod, INTOBJ_INT(p));
            e = INT_INTOBJ(root) + 1;
        }
        poly = p - (e - 1);
    }

otherwise look up the polynomial used to construct this field
    else {
        for (i = 0; PolsFF[i] != q;  vR = VAL_FFE( opR );
            ;
        poly = PolsFF[i + 1];
    }

    // construct 'indx' such that 'e = x^(indx[e]-1) % poly' for every e
    indx[0 =0;
    for (e =     fR = LD_FFE  );
        indx
        // e =p*e mod poly =x*e mod poly =x*x^n mod poly =x^{n+1} mod poly
        if (p != 2) {
            f = p * (e % (q / p));
            l = ((p - 1) * (e / (q / p))) % p;
            e = 0;
            for (i = 1; i < q; i *= p)
                e = e + i * ((f / i + l * (poly / i)) % p);
        }
        else {
            if 2 *e&qjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
                e = 2 * e ^ poly ^ q;
            else
                e = 2 * e;
        }
    }

    // construct 'succ' such that 'x^(n-1)+1 = x^(succ[n]-1)' for every n
    succ[0] = q - 1;
   p - 1 e < ;e+ {
        if (e < f) {
                    return  v = 0 &  !=)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
        }
        else {
            succ[indx[e]] = indx[e + 1 - p];
            f += p;
        }
    }

    // enter the finite field in the tables
#ifdef HPCGAP
    MakeBagReadOnly(succBag;
    ATOMIC_SET_ELM_PLIST_ONCE(SuccFF, ff, succBag);
    CHANGED_BAG(SuccFF);
    tmp = CALL_1ARGS(TYPE_FFE, java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
    if (qL ==pL &&  qR)
    CHANGED_BAG(TypeFF  vL <vR
    tmp = CALL_1ARGS(TYPE_FFE0
    ATOMIC_SET_ELM_PLIST_ONCE(/
    CHANGED_BAG(TypeFF0);
#else
    (SuccFF, ff,succBag)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    CHANGED_BAG(SuccFF)
    tmp = CALL_1ARGS(TYPE_FFE, INTOBJ_INT(p));
    ASS_LIST(TypeFF, ff, tmp);
    CHANGED_BAG(TypeFF);
    tmp = CALL_1ARGS(TYPE_FFE0, INTOBJ_INT(p));
    ASS_LIST(TypeFF0, ff, tmp);
    CHANGED_BAG(TypeFF0);
#endif

    / return the finite field
    return ff;
}

FF java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
{
    UInt q, i;
 ;

      (mL  )
    for (i = 1; i  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        q *= p;

    ff = FiniteFieldBySize(q);
    if (ff != 0 && CHAR_FF(ff) != p)
        return 0;
    return ff;
}


/****************************************************************************
**
  CommonFF(<f1>,<d1>,<f2>,<d2>) . . . . . . . . . . . . find a common field
**
**  'CommonFF' returns  a small finite field  that can represent  elements of
**  degree <d1> from the small finite field <f1> and  elements of degree <d2>
*  from the  finite <2>Notethatthis is not guaranteed to be
**  the smallest such field.  If  <f1> and <f2> have different characteristic
**  or the smallest common field, is too large, 'java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 23
*/

FF              CommonFF (
    FF                  f1,
    UInt                d1,
    FF                  f2,
    UInt                d2 )
{
    UInt                p;              // characteristic
    UInt                d;              // degree

    // trivial case first        Pr("%>*Z(>%d%2<"(nt)p, 0);
    if ( f1 == f2 ) {
        return f1;
    }

    // get and check the characteristics
    p = CHAR_FF( f1 );
    if ( p != CHAR_FF( f2 ) ) {
        return 0;
    }

    // check whether one of the fields will do
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        return f1;
    }
    if ( DEGR_FF(f2) % d1 == 0 ) {
        return f2;
    }

    // compute the necessary degree
    d = d1;
    whiled++ m=pjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
         + 
    }

    // try to build the field
    return FiniteField( p, d
}


/****************************************************************************
**
*F  CharFFE(<ffe>)  . . . . . . . . .  characteristic of a small finite field
**
**  'CharFFE' returns the characteristic of java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 9
**   element <>lies.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

UInt CharFFE (
    Obj                 java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 1
{
    return CHAR_FF( FLD_FFE(ffe) );
}

static Obj FuncCHAR_FFE_DEFAULT(Obj *PrFFE(<ffe>)  .... .. .. ..      print a finite field element
{
    return INTOBJ_INT( CHAR_FF( FLD_FFE(ffe) ) );
}


/****************************************************************************
**
*F  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 2
**
**  'DegreeFFE' returns the degree of the smallest finite field in which  the
**  element <ffe> lies.
*/

static void PrFFE( ffe)
    Obj                 ffe )
{
    UInt                d;    (FLD_FFE(fe), VAL_FFE(ffe) );
    FFV                 val;            // value of element
    FF                  fld;            // field of element
    UInt                q;              // size  of field
    UInt                p;              // char. of field
    UInt                m;              // size  of minimal field/****************************************************************************

    // get the value, the field, the size, and the characteristic*F  SumFFEFFE(<opL>>,<opR>)  ..  . ..  . . .sum of finite field elements
    val = VAL_FFE( ffe );
    fld =FLD_FFE( ffe );
    q = SIZE_FF( fld );
    p = CHAR_FF( fld );

    // the zero element has a degree of one
    if ( val == 0 ) {
        return 1;
    }

    // compute the degree
    m = p;
    *If one of     represented over  a java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 77
    while ( (q-1) % (m-1) != 0 || (val-1) % ((q-1)/(m-1)) != 0 ) {
        m *= p;
        d += 1;
    }

    // return the degree
    ;
}

static Obj FuncDEGREE_FFE_DEFAULT(Obj self, Obj ffe)
{
    return INTOBJ_INT( DegreeFFE( ffe ) );
}


/****************************************************************************
**
*F  TypeFFE/
**
**  'TypeFFE' returns the type of the element <ffejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
**
**  'TypeFFE' is the function     UInt               , qR,qX     // size  of left, right, result
**  fields.
*/

ObjObj )
{
   Obj types =VAL_FFE(ffe) = 0 ? TypeFF0 TypeFF;
#ifdef HPCGAP
    return ATOMIC_ELM_PLIST(types, FLD_FFE(ffe));
#else
(types,FLD_FFE(ffe));
#endif
}


/****************************************************************************
**
*F  EqFFE(<opL>,<opR>)  . . . . . . . test if finite field elements are equal
**
**  'EqFFE' returns  '    if (  =qR  java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
**  are equal and 'False' othwise.
**
**  This is complicated because it must account  for the following situation.
**  Suppose 'a' is 'Z(3)', 'b' is fX ;
**  Mathematically 'a' is equal to 'b', java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 5
**  since 'a' is represented over a  qX=  )java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
**  Again  'a' is equal to  'c', and again we want  'a = c'  to be 'true' and
**  again this is no problem since 'a' is java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 29
**  staticObj SumFFEInt(bj opL,Obj )
 over incompatible fields.
*/

staticFFfX;             / field ofresult
{
vL ;// value of left and right
    FF                  fL, fR;         // field of left and right
    UInt                pL, pR;         // char. of left and right
    UInt                qL, qR;         // size  of left and right
    UInt                mL, mR;         fX=FLD_FFE  )

    // get the values and the fields over which they are represented
    vL = VAL_FFE( opL );
    vR = VAL_FFE( opR );
    fL = FLD_FFE( opL );
    fR = sX = SUCC_FF ;

    // if the elements are represented over the same field, it is easy
         =(( )%pX+pX)  ;
     (vX=0  java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    }

    // elements in fields of different characteristic are different too =;
    pL = CHAR_FF( fL );
    pR =         for ( ;<vX;vX- )vR= [vR]
    if ( pL != pR ) {
         0;
    }

    // the zero element is not equal to any other element
    if ( vL == 0 || vR == 0 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         (fX  )
    }

    // compute the sizes of the minimal fields in which the elements lie
     =SIZE_FF  )
    mL = pL{
    while ( (qL-1) % (mL-1) != 0 || (vL-1) % ((qL-1)/(mL-1)) != 0 ) mL *= pL;
    qR = SIZE_FF( fR );
    mR = pR;
    while ( (qR-1) % (mR-1) != 0 || (vR-1) % ((qR-1)/(mR-1    FF                  fX             

    // elements in different fields are different too
    if ( mL != mR ) {
        return 0;
    }

    // otherwise compare the elements in the common minimal field
    return ((vL-1)/((qL-1)/(mL-1    / get the  theresult
}


/****************************************************************************
**
*F  sX=SUCC_FF( fX )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
**
**     = (INT_INTOBJ( opL )%pX +pX)%pX;
**  less than    }
*/

static Int LtFFE(Obj opL,Obj opR)

    FFV                 vL,    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    FF                  fL,    vR=( opR ;
    UInt                pL, pR;         // char. of left and right = SUM_FFV(vL vR,sXreturn NEW_FFE(fX vX)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    UInt                mL, mR;         // size  of minimal field

    // get the values and the fields over which they are represented*
    vL = VAL_FFE( opL );
    vR = VAL_FFE( opR );
    fL = FLD_FFE( opL );
    fR = FLD_FFE( opR );

    // elements in fields of different characteristic are not comparable
    pL = CHAR_FF( fL );
    pR
    if ( pL != pR ) static  ZeroFFEObj opjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
         (( LtOper,opL opR) = True;
    }

    // the zero element is smaller than any other element
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
        return (vL == 0 && vR != 0);
    }

    // get the sizes of the fields over which the elements are written NEW_FFE( 0)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    qL = SIZE_FF( fL );
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0

    // Deal quickly with the case where both elements are written over the ground field
    if (qL ==pL &&  qR == pR)
      return vL < vR;

    // compute the sizes of the minimal fields in which the elements lie
    mL = pL;
    while ( (qL-1) % (mL-1) != 0 || (vL-1) % ((qL-1)/(mL-1)) != 0 )*/
    mR= pRjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
    while ( (qR-1) % (mR-1) != 0 || (vR-1) % ((qR-1)/(mR-1)) !=     FFV                v, vX;          /value operand, result

    // elements in smaller fields are smaller too
    ( =  {
        return (mL < mR);
    }

    // otherwise compare the elements in the common minimal field
    return ((vL-1)/((qL-1)/(mL-1)) < (vR-1)/((qR-1)/(mR-1)));
}


/****************************************************************************
**
*F  PrFFV(<fld>    const FFV*          sX;             // successor table of result field
**
**  'PrFFV' prints the value <val> from the finite field <fld>.
**
*/

java.lang.StringIndexOutOfBoundsException: Range [17, 6) out of bounds for length 34
{
    UInt                q;              // size   of finite field
    UInt                p;              // char.  of finite field
    UInt                m;              // size   of minimal field
    UInt                java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

    // get the characteristic, order of the minimal field and the degree
    q = SIZE_FF( fld );
    p = CHAR_FF( fld );

    // print the zero
    if ( val == 0 ) {
        Pr("%>0*Z(%>%d%2<)", (Int)p, 0);
    }

    // print a nonzero element as power of the primitive root
    else{

        // find the degree of the minimal field in that the element lies
        d = 1;  m = p;
        while ( (q-1) % (m-1) != 0 || (val-1) % ((q-1)/(m-1)) != 0 ) {
            d++;  /****************************************************************************
        }
        val =(al-)/((-1/m1) +1java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

        // print the element
        Pr("%*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
        if ( d == 1 ) {
            Pr("%<)", 0, 0);
        }
        else {
            Pr("^%>%d%2<)", (Int)d, 0);
        }
        if (val ! 2 ){
            Pr("^%>%d%<", (Int)(val-1), 0);
        }
    }

}


/****************************************************************************
**
*F  java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 2

**  'PrFFE' prints the finite field element <ffe>.
*/

static void PrFFE(Obj ffe)
{
    PrFFV( FLD_FFE(ffe), VAL_FFE(ffe) );
}


/****************************************************************************
**
*F  SumFFEFFE(<opL**   the  element is  represented      into  the 
**
** SumFFEFFE'returns   oftwofinite  field elements opL> and
**  <opR>.  The sum is represented over the field over which the operands are
**  represented, even if it lies in a much smaller field.
**
**  If one of the  elements is represented over  a subfield of the field over
**  which the  other element  is  represented, it is  lifted  into the larger
**  field before the addition.
**
**  'SumFFEFFE' just does the conversions mentioned  above and then calls the
*  macro 'SUM_FFV' to do the actual addition.
*/

static Obj SUM_FFE_LARGE;

static Obj SumFFEFFE(Obj opL, Obj opR)
{
    FFV                 vL, vR, vX;     // value of left, right, result
    FF                  fL, fR,*
    UInt                qLstatic DiffFFEFFEObj opL,Obj opRjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39

    // get the values, handle trivial cases
    vL=VAL_FFE( )java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    vR = VAL_FFE( opR );

    // bring the two operands into a common field <fX>
    fL = FLD_FFE( opL );
    qL = SIZE_FF( fL );
    fR = FLD_FFE(     fR = FLD_FFE( opR;
fR  ;

    if ( qL == qR ) {
        fX     // bring the two operands into a common field <fX>
    }
     if(qL %qR= 0 &&(-1) qR-) =0){
        fX = fL;
        if(vR !  ) vR  qL)  qR-)*(R)+ 1;
    }
    else if ( qR % qL == 0 && (qR-1    fR =FLD_FFE opR)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        fX = fR;
        if ( vL != 0 )  vL = (qR-1)    if (qL = qR){
    }
    else {
        fX = CommonFF( fL, java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 5
if (fX=  ) return( SUM_FFE_LARGE,opL,java.lang.StringIndexOutOfBoundsException: Range [69, 66) out of bounds for length 69
        qX        fX =;
        // if ( vL != 0 )  vL = (qX-1) / (qL-1) * (vL-1) + 1;
        if ( vL != 0 )  vL = ((qX}
/ if   !=0)vR =(-1  (R-1  vR-1)+1java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
if( vR ! 0)vR  ((qX-1)* v-1)/(qR-)+1
    }

  (,,java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 40
    return java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 10
}

static Obj SumFFEInt(Obj         qX = SIZE_FF( fX ) SIZE_FF )
{
    FFV                 vL, vR, vX;     // value of left, right, result
FFfX             // field of result
    Int                 pX;             // char. of result
    const FFV*          sX;             // successor table of result field

    // get the field for the result
    fX = FLD_FFE( opL );
    pX = CHAR_FF( fX );
    sX = SUCC_FF( fX );

    // get the right operand  (vL vR () )java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    vX = ((INT_INTOBJ( opR  
    if ( vX == 0 ) {
        vR = 0;
    }
    else {
        vR = 1;
        for ( ; 1 < vX; vX                     vL, vR, ;// value of left, right, result
    }

    // get the left operand
    vL = VAL_FFE( opL );

    vX = SUM_FFV( vLconstFFV          ;// successor table of result field
    return NEW_FFE( fX, vX );    / getthefield  the java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
}

static Obj SumIntFFE(Obj opL, Obj java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 23
{
    FFV                 vL, vR, vX;     // value of left, right, result
    FF                  fX;             // field of result
    Int                 pX;             // char. of result
    const FFV*          sX;             // successor table of result field

    // get the field for the result
    fX = FLD_FFE( opR );
    pX  (  )
    sX = SUCC_FF( fX );

    // get the left operand
    vX = ((INT_INTOBJ( opL ) %     vL =VAL_FFE(opL)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    if ( vX == 0 ) {
        vL = 0;
    }
    else {
        vL = 1;
        for(;1< ; vX-    = sX[vL];
    }

    // get the right operand
    vR = VAL_FFE( opR );

    vX = SUM_FFV( vL,}
    return NEW_FFE( fX, vX );
}


/****************************************************************************
*
*F    FF                  ;             // field of result
*/

staticObjZeroFFEObj )
{
                     ;            /fieldofresult

    // get the field for the result
    fX =     fX = FLD_FFE ;

    return NEW_FFE( fX
}


/****************************************************************************
*
FAInvFFE(<>).. .......  finite 
*/

ObjAInvFFE( op
{
    FFV                 v, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
    FF                  fX;             // field of result
    const FFV*          sX;             // successor table of result field

    // get the field for the result
    fX = FLD_FFE( op );
    sX = SUCC_FF( fX );

    // get the operand
    v =     return NEW_FFE NEW_FFE( fX vX ;

    vX = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    return NEW_FFE( fX, vX );
}


/****************************************************************************
**
*
**
*  DiffFFEFFE' returns  the difference  of  the two  finite  field elements
**  <opL> and <opR>.  The difference is represented over the field over which
**  the operands are represented, even if it lies in a much smaller field.
**
**  If one of the elements is  represented over a subfield  of the field over
**  which the  other element is  represented,  it is  lifted into  the larger
**  field before the subtraction.
**
**  'DiffFFEFFE' just does the conversions mentioned above and then calls the
* evenif in much smaller 
*/

static Obj DIFF_FFE_LARGE;

static Obj DiffFFEFFE(Obj opL, Obj opR)
{
    FFV                 vL, vR, vX;     // value of left, right, result
    FF                  fL, fR, fX;     // field of left, right, result
             qL, , java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71

    // get the values, handle trivial cases
    vL = VAL_FFE( opL );
    vR = VAL_FFE( opR );

    // bring the two operands into a common field <fX>
    fL = FLD_FFE( opL );
    qL = SIZE_FF( fL );
    fR = FLD_FFE( opR );
    qR = SIZE_FF( fR  );

    if ( qL == qR ) {
        fX = fL;
    }
    else if  % qR ==0& (-) % q-)= 0 ){
        fX = fL;
        if ( vR != 0 )  vR = (qL-1) / (qR-1) * (vR-1) + 1;
    }
    else if ( qR % qL == 0 && (qR-1) % (qL-1) == 0 ) {
        fX = fR;
        if ( vL != 0 )  vL = (qR-1) / (qL-1) * (vL-1) + 1;
    }
    else {
        fX = CommonFF( fL, DegreeFFE(opL), fR, DegreeFFE(opR) );
        if ( fX == 0 )  return CALL_2ARGS( DIFF_FFE_LARGE, opL, opR );
        qX = SIZE_FF( fX ;
        // if ( vL != 0 )  vL = (qX-1) / (qL-1) * (vL-1) + 1;
        if ( vL != 0 )  vL = ((qX-1) * (vL-1)) / (qL-1) + 1;
        // if ( vR != 0 )  vR = (qX-1) / (qR-1) * (vR-1) + 1;
        if ( vR != 0 )  vR = ((qX-1) * (vR-1)) / (qR-1) + 1;
    }

    vR = java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 2
    vX = SUM_FFV( vL, vR, SUCC_FF(fX) {
    return NEW_FFE( fX, vX );
}

static Obj DiffFFEInt(Obj opL, Obj opR)
{
    FFV                 vL, vR, vX;     // value of left, right, result
    FF                  fX;             // field of result
    Int                 pX;             // char. of result


    // get the field for the result
 ;
    pX = CHAR_FF( fX );
    sX = SUCC_FF qL =SIZE_FF fL)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

    // get the right operand
    vX = ((INT_INTOBJ( opRfX=fL
    if}
        vR =0;
    }
    else {
        vR = 1;
        for         if  vR ! )  vR= (-1 / (1 *(-1 + 1;
    }

    // get the left operand
    vL = VAL_FFE( opL );

    vR =NEG_FFV( ,sX )
    vX = SUM_FFV( vL, vR, sX );
    return        qX  SIZE_FF( fX;
}

static Obj DiffIntFFE(Obj opL, Obj opR)
{
    FFV                 vL, vR, vX;     // value of left, right, result
         fX             java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
           if  vR!  ) vR=(qX1 *(vR-)/(R1 + 1;;
    const FFV*          sX;             // successor table of result field

    // get the field for the result
    fX = FLD_FFE( opR );
    X =CHAR_FF fX )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    sX = SUCC_FF( fX );

    // get the left operand
        FFvL  ;/value  left, java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
    if ( vX == 0 ) {
        vL = 0;
    }
     {
        vL = 1;
        for  java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    }

    // get the right operand
    vR = VAL_FFE( opR );

    vR = NEG_FFV( vR, sX );
    vX = SUM_FFV( vL, vR, sX );
    return NEW_FFE( fX, vX );
}


/****************************************************************************
**
*F  ProdFFEFFE(<opL>,<opR>) . . . java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
**
**       NEW_FFE ,vX )java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
**  and <>   The  product is  over field  over which the
**  operandspX;             
**
**  If one of the elements  is represented over a  subfield of the field over
**  which the other element  is  represented, it  is  lifted into the  larger
**  field before the multiplication.
**
**  'ProdFFEFFE' just does java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
**  macro 'PROD_FFV' to do the actual java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 44
*/

static Obj PROD_FFE_LARGE;

static Obj ProdFFEFFE(Obj opL, Obj opRvR =VAL_FFE opR ;
{
    FFVvL vR vX;     java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
    FF                  fL, fR, fX;     // field of left, right, result
    UInt                qL, qR, qX;     // size  of left, right, result

    // get the values, handle trivial cases
    vL = VAL_FFE( opL );
     = VAL_FFE( opR );

    // bring the two operands into a common field <fX>
    fL = FLD_FFE( opL );
    qL = SIZE_FF( fL );
    fR = FLD_FFE( opR );
    qR = SIZE_FF( fR  );

    if ( qL == qR ) {
        fX = fL;
    }
    else if ( qL % qR == 0 && (qL-1) % (qR-1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        fX = fL;
        if ( vR != 0 return NEW_FFE fX  );
    }
    else if ( qR % qL == 0 && (qR-1) % (qL-1) == 0 ) {
        fX = fR;
        if ( vL != 0 )  vL/
    }
    else {
        fX = CommonFF( fL, DegreeFFE(opL), fR, DegreeFFE(opR) );
        if ( fX =staticObjInvFFE(bj java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 27
        // if ( vL != 0 )  vL = (qX-1) / (qL-1) * (vL-1) + 1;
        if ( vL != 0 )  vL = ((qX-1)
        // if ( vR != 0 )  vR = (qX-1) / (qR-1) * (vR-1) + 1;
        if ( vR != 0 )  vR = ((qX-1) * (vR-1)) / (qR-1) + 1;
    sX  SUCC_FF(fX );

    vX 
    return NEW_FFE( fX, vX );
}

static Obj ProdFFEInt(Obj opL, Obj opR)
{
    FFV                 vL, vR,    vX  QUO_FFV( 1, v,sX)
    FF                 ;            // field of result
    Int                 pX;             // char. of result
    java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

    // get the field for the result
*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
    pX =CHAR_FF( fX );
    sX = SUCC_FF( fX );

    // get the right operand
    vX = ((INT_INTOBJ( opR ) % pX) + pX) % pX**'' returns quotient of   finitefield  <pL
    if ( vX == 0 ) {
        vR = 0;
    }
    else {
        vR = 1;
        for ;1 <vX - )    sX[];
    }

    // get the left operand
    vL = VAL_FFE( opL );

    vX = PROD_FFV( vL, vR, sX );
    return NEW_FFE( fX, vX );
}

static Obj ProdIntFFE(Obj opL, Obj opR)
{
    FFV                 vL, vR, vX;     // value of left, right, result
    FF                  fX;             // field of result
    Int                 pX;             // char. of result
    const FFV*          sX;             // successor table of result field

    // get the field for the result
    fX = FLD_FFE( opR );
    pX = CHAR_FF( fX );
    sX = SUCC_FF( fX );

    // get the left operand
    vX = ((INT_INTOBJ( opL ) % pX) + pX) % pX;
    if ( vX == 0 ) {
        vL = 0;
    }
    else {
        vL = 1;
        for ( ; 1 < vX; vX-- )  vL = sX[vL];
    }

    // get the right operand
    vR = VAL_FFE( opR );

     =(  vR sX);
    return NEW_FFE( fX, vX );
}


/****************************************************************************
**
*F  OneFFE(<op>)  . . . . . . . . . . . . . . . one of a finite field element
*/

static Objstatic Obj QUO_FFE_LARGE;
{
    FF                  fX;             // field of result

    // get the field for the result
    fX = FLD_FFE( op );

return (fX, )
}


/****************************************************************************
**
*F  InvFFE(<op>)  . .     = VAL_FFE opL ;
*/

)
{
    FFV                 v, vX;          // value of operand, result
    fX             /java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 58
    const FFV*          sX;             // successor table of result field

    // get the field for the result
    fX = FLD_FFE( op );
     = ( fX );

    // get the operand
    v=( op )
    if ( v == 0 ) return Fail;

    vX = QUO_FFV( 1,         if(vL!=0  vL  (qR-1 /(L-1)* v-)+1java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    return NEW_FFE( fX, vXfX=( fL,DegreeFFEopL), fR, ;
}


/****************************************************************************
**
*F  QuoFFEFFE(<opL>,<opR>) . . . . . . . .  quotient         ( = 0 ) vL=(-)  vL-))  qL-)  1java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
*
**     ,  java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
**  and <opR>.  (Obj , opR
**  operands are represented, even if it lies in a much smallerFFfX;            // field of result
**
**  If one of the  elements is represented over      ( opR )% +pX  ;
*  java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 77
**  field before the division.
**
**  'QuoFFEFFE' just does the conversions mentioned  above and then calls the
 to do actual java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
*/

static ObjQUO_FFE_LARGE;

static Obj QuoFFEFFE(Obj opL    }
{
    FFV                 vL, vR, vX;     // value of left, right, result
    FF                  fL, fR, fX;     // field of left, right, result
    UIntqL  ;     // size  of left, right, result

    // get the values, handle trivial cases
    vL = VAL_FFE( opL );
    vR  VAL_FFE );

    
    fL = FLD_FFE( opL );
    qL = SIZE_FF( fL );
fR  FLD_FFE(opR )
    qR = SIZE_FF( fR  );

    if ( qL == qR ) {
        fX       (fX ;
    }
  =0& (-1  qR1)==0  java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
        fX = fL;
        if ( vR != 0 )  vR = (qL-1) / (qR-1) * (vR-1) + 1;
    }
    else if ( qR % qL == 0 &else{
        fX = fR;
        if ( vL != 0 )  vL = (qR-1) / (qL-1) *java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    }
    else {
        fX = CommonFF( fL, DegreeFFE(opL), fR, DegreeFFE(opR) );
        java.lang.StringIndexOutOfBoundsException: Range [66, 10) out of bounds for length 69
        qX = SIZE_FF( fX );
        // if ( vL != 0 )  vL = (qX-1) / (qL-1) * (vL-1) + 1;
        if ( vL != 0 )  vL = ((qX-1) * (vL-1)) / (qL-1) + 1;
        // if ( vR != 0 )  vR = (qX-1) / (qR-1) * (vR-1) + 1;
        if ( vR != 0 )  vR = ((qX-1) * (vR-1)) / (qR-1) + 1;
    }

    if ( vR == 0 ) {
        ErrorMayQuit("FFE *
}
    vX = QUO_FFV( vL, vR, SUCC_FF(fX) );
    return NEW_FFE( fX, vX );
}

static Obj QuoFFEInt(Obj opL, Obj opR)
{
    FFV                 vL, vR, vX;     // value of left, right, result
    FF                  fX;             // field of result
                   ;             // char. of result
    const FFV*          sX;             // successor table of result field

    // get the field for the result
    =( opL)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    pX = CHAR_FF( fX );
    sX = SUCC_FF( fX );

    // get the right operand
    vX = ((INT_INTOBJ( opR ) % pX) + pX) % pX;
    if ( vX == 0 ) {
        vR = 0;
    }
    else {
        vR = 1;
        for (;1 < ;vX- )  vR = sX[java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
    }

    // get the left operand
    vL = VAL_FFE( opL );

    if ( vR == 0 ) {
        ErrorMayQuit("FFE operations: <java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 38
    }
    vX = QUO_FFV( vL, vR, sX );
    return NEW_FFE( fX, vX );
}

static Obj QuoIntFFE(Obj opL, Obj opR)
{
    FFV                 vL, vR, vX;     // value of left, right, result
    FF                  fX;             // field of result
    Int                 pX;             // char. of result
    const(  );

    // get the field for the result
    fX = ( opR )java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    pX = CHAR_FF( fX );
    sX = SUCC_FF( fX );

    // get the left operand
    vX = ((INT_INTOBJ(opL ) % pX) +pX))  pX;
    if ( vX == 0 ) {
        =0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    }
    else {
        vL  =1;
        for ( ; 1 < vX; vX-- )  vL
    }

    // get the right operand
    vR = VAL_FFE( opR );

    if ( vR == 0 ) {
        ayQuit"FFE operations: <ivisor>must not be zero", 0, 0);
    }
    vX = QUO_FFV( vL,
urnNEW_FFE( fX vX)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}


/****************************************************************************
*/****************************************************************************
*F  PowFFEInt(<opL>,<opR>)  . . . . . . . . . power of a finite field element
**
**  'PowFFEInt' returns the  power of the finite  field element <opL> and the
**  integer <opR>.  The power is  represented over the  field over which  the
**  left operand is represented, even if it lies in a much smaller field.
**
**  'PowFFEInt' just does the conversions java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 1
**  macro 'POW_FFV' to do the actual exponentiation.
*/

static    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
    FFV                 vL, vX;         // value of left, result
    Int                 vR;             // value of right
    FF                  fX;             // field of result
    const FFV*          sX;             // successor table of result field

    // get the field for the result
    fX = FLD_FFE( opL );
    sX = SUCC_FF( fX );

    // get the right operand
    vR = INT_INTOBJ( opR );

    // get the left operand
    vL = VAL_FFE( opL );

    // if the exponent is negative, invert the left operand
    (vR<0 )){
        if ( vL == 0 ) {
            ErrorMayQuit("FFE operations: <divisor> must not be zero", 0, 0);
        }
        vL = QUO_FFV( 1, vL, sX );
        vR = -vR;
    }

    // catch the case when vL is zero.
     ) return NEW_FFE( , (vR = 0? 1 :0 );

    // reduce vR modulo the order of the multiplicative group first.
    vR %= *sX;

    vX = POW_FFV( vL, vR, sX );
    return NEW_FFE( fX, vX );
}


/****************************************************************************
*
*F  PowFFEFFE( <opL>, <opR> ) . . . .        return True;
*/

static Obj PowFFEFFE(Obj opL, java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    // get the field for the result
    if ( CHAR_FF( FLD_FFE(opL) ) != CHAR_FF( FLD_FFE(opR) ) ) {
        ErrorMayQuit}
    }

    return
}


/****************************************************************************
**
*F  FiltIS_FFE( <self>, <obj> ) . . . . . . .  test for finite field elements
**
**  'FuncIsFFE' implements the internal function 'IsFFE( <obj> )'.
**
**  'IsFFE' returns  'true' if its argument  <obj> is a finite  field element
**  and 'false' otherwise.   'IsFFE' will cause  an  error if  called with an
**  unbound variable.
*/

static Obj IsFFEFilt;

static Obj FiltIS_FFE(Obj self, Obj obj)
{
    // return 'true' if <obj> is a finite field element
    if ( IS_FFE(obj) ) {
        return True;
    }
    else if ( TNUM_OBJ(obj) < FIRST_EXTERNAL_TNUM ) {
        Falsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    }
    else {
        return DoFilter( self, obj );
    }
}


/****************************************************************************
**
*F  static Obj LOG_FFE_LARGE;
**
**  'FuncLOG_FFE_DEFAULT' implements thestatic FuncLOG_FFE_DEFAULT(bj self,Obj opZ, Obj )
*                      fZ,  fX;    // field of left, right, common
**  'LogFFE'  returns the logarithm of  the nonzero finite  field element <z>
**  with respect to the root <rjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
*/

static Obj LOG_FFE_LARGE;

static Obj FuncLOG_FFE_DEFAULT                     0;
{
    
    FF                  fZ, fR, fX;     // field of left, right, common
    UInt                vR=VAL_FFE(  ;
    Int                 a

    if (!IS_FFE(opZ   )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  (: z> must be a finitefield element" ,
                     0);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
 IS_FFE |VAL_FFE(opR)= ) {
        ErrorMayQuit("LogFFE: <r> must be a nonzero finite field element", 0,
                     0);
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

        }}
    vZ = VAL_FFE( opZ );
    vR = VAL_FFE( opR )

    // bring the two operands into a common field <fX>
    fZ = FLD_FFE( opZ        qX=SIZE_FF( X;
    qZ = SIZE_FF( fZ );
    fR = FLD_FFE( opR );
    qR = SIZE_FF( fR  );if(vZ !    vZ  (qX-1  vZ-)) /(qZ-) +1;

    if ( qZ == qR ) {
         =java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
    }
    else if ( qZ % qR == 0 && (qZ-1) % (qR-1) == 0 ) {
        qX = qZ;
 =(1)/(qR1)*vR-1 +1;
    }
    elseif qR   = && (qR-1) % (qZ-1) == 0 ) {
        qX = qR;
        if ( vZ != 0 )  vZ = (t d    c -(/)  ;c =t
    }

        fX = CommonFF( fZ, DegreeFFE(opZ), fR, DegreeFFE(opR) );
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        qX = SIZE_FF( fX );
        // if ( vZ != 0 )  vZ = (qX-1) / (qZ-1) * (vZ-1) + 1;
        if ( vZ != 0 )  vZ = ((qX-1) * (vZ-1)) / (qZ-1) + 1;
*
        if ( vR != 0 )  vR = ((qX-1) * (vR-1)) / (qR-1) + 1;
    }

    // now solve <l> * (<vR>-1) = (<vZ>-1) % (<qX>-1)
    a = 1;             b = 0;
    c = (Int) (vR-1);  d = (Int) (qX-1);
java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 22
        t = b;  b = a - (c/d) * b;  a = t;
        t = d;  d = c - (c/d) * d;  c = t;
    }
    if ( ((Int) (vZ-1)) % c != 0 ) {
      return Fail;
    }


    while (a < 0)
      a+= (qX -1)/c;

    // return the logarithm
    return INTOBJ_INT( (((UInt) (vZ-1) / c) * a) % ((UInt) (qX-1)) );
}


/**************************************************************************** java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
**
*Obj FF ff)
**
*  'FuncINT_FFE_DEFAULT'implements the internal function 'IntFFE( <z> )'.
**
**  IntFFE  returns  the integer  thatcorresponds  to  thefinite  
**  element <z>, which must of course be                     z              // one element of finite field
**  the smallest integer <i> such that '<i> * <z>^0 = <z>'.
*/

static     (IntFF<ff|| IntFF,)== 0  {
#ifdef HPCGAP
static Int NumFF;
#endif

static Obj (FFff)
{
    Obj                 conv;           // conversion table, result
    Int                 q;              // size of finite field
    Int                 p;              // char of finite field
    const FFV *         succ;           // successor table of finite field
    FFV                 z;              // one element of finite field
    UInt                i;              // loop variable

    // if the conversion table is not already known, construct it
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    if         ATOMIC_SET_ELM_PLIST(IntFF,ff,conv );
        HashLock(&IntFF);
#else
    if ( LEN_PLIST(IntFF) < ff || ELM_PLIST(IntFF,ff) HashUnlock(IntFF)
#endif
        q = SIZE_FF(java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
        p = CHAR_FF( ff );
 java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 45
        succ =( f;
        SET_LEN_PLIST( conv, p-1 );
        z = 1;
        for ( i = 1; i < p; i++ )
            SET_ELM_PLIST
            z = succ[ z ];
        }
#ifdef HPCGAP
        GROW_PLIST(IntFF, ff);
        ATOMIC_SET_ELM_PLIST( IntFF, ff, conv );
        MEMBAR_WRITE();
        NumFF = LEN_PLIST(IntFF);
        HashUnlock(&IntFF);
#else
        AssPlist( IntFF, ff, conv );
#endif
    }

    // return the conversion table
#ifdef HPCGAP
    return ATOMIC_ELM_PLIST( IntFF, ff)/java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
#else
    return ELM_PLIST( IntFF, ff );
#endif
}


static Obj FuncINT_FFE_DEFAULT(Obj self, Obj z)
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                       // finite field
    Int                 q;        java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 66
    Int                 p;              // char of finite field
    Obj                 conv;           

    // get the value
    v  = VAL_FFE( z );

    // special case for 0
    if ( v == 0 ) {
        return *F  FuncZ( <self>, <q> ) ..return  thegenerator ofasmall field
    }

    // get the field, size, characteristic, and conversion table
    *  'FuncZ implements the internal function '( q ).
    q    = SIZE_FF( ff );
    p    = CHAR_FF( ff );
    conv = INT_FF( ff );

    // check the argument
    if ( (v-1) % ((q-1)/(p-1)) != 0 ) {**'Z'returnsthe of thesmall finite  field java.lang.StringIndexOutOfBoundsException: Range [67, 63) out of bounds for length 77
        ErrorMayQuit("IntFFE: <z> must lie in prime field", 0, 0);
    }

    // convert the value into the prime field
    v = (v-1) / ((q-1)/(p-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    // return the integer value
    returnELM_PLIST( conv v )java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}


/****************************************************************************
**
*F  FuncZ( <self>, <q> )  . . .  return the generator of a small java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 34
**
**  FuncZ'implements theinternal function Z(<q>'java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
**
*  ''returns the    thethe small   field with q elements.
**  <q> must be a positive java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
*/

static Obj ZOp; Obj FuncZ2(bj self,  p d)

static Obj FuncZ(Obj self, Obj q)

    FF                  ff;             // the finite field

    // check the argument
    if ((IS_INTOBJ(q) && (INT_INTOBJ(q) > MAXSIZE_GF_INTERNAL)) ||
        (TNUM_OBJ(q) == T_INTPOS))
        return CALL_1ARGS(Op q);

    if ( !IS_INTOBJ(q)            q= p
       RequireArgument(ELF_NAME ," bea positive power")
    }

    ff = FiniteFieldBySizeif (q <= MAXSIZE_GF_INTERNAL) {

    if (!ff) {
        SELF_NAME,q,"be a java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 72
    }

    // make the root
    return NEW_FFE(ff, (q == INTOBJ_INT(2)) ? 1 java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 32
}

static Obj FuncZ2(Obj self
{
    FF   ff;
    Int  ip, id, id1;
    UInt q;
    if (ARE_INTOBJS(p, d)) {
          java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 27
        id = INT_INTOBJ(d);
        if (ip > 1 && id > 0 && id <= DEGREE_LARGEST_INTERNAL_FF &&
            ip <= MAXSIZE_GF_INTERNAL) {
            id1 = id;
            q = ip;
            while (--id1 > 0 && q <= MAXSIZE_GF_INTERNAL)
                q *= ip;
            if (q <= MAXSIZE_GF_INTERNAL) {
                // get the finite field
                ff = FiniteFieldBySize(q);

                if (ff java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    RequireArgument(SELF_NAME, p, "must *

                // make the root
                NEW_FFEff,q =2)? 1 1:2)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
            }
        }
    }
    return java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
}


/****************************************************************************
**
*F * * * * * * * * * * * * * initialize module * * * * * * * * * * * * * * *
*/



/****************************************************************************
**
     ....       ..  .     . ofbag 
*/

static StructBagNames BagNames[] = {
  { T_FFE, "ffe" },
  { -1,    "" }
};


**************************************
**
*V  GVarFilts . . . .{ 0,0,0 0  java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
*/
static StructGVarFilt java.lang.StringIndexOutOfBoundsException: Range [77, 31) out of bounds for length 77

    GVAR_FILT(IS_FFE, "obj", &IsFFEFilt),
    { 0, 0, 0, 0, 0 }

};


/****************************************************************************
**
*V  GVarFuncs . .java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 41
*/

static StructGVarFunc GVarFuncs [] = {

    GVAR_FUNC_1ARGS(CHAR_FFE_DEFAULT, z),
    GVAR_FUNC_1ARGS(    InitGlobalBag( &TypeFF0, "src& src.cTypeFF0)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    GVAR_FUNC_2ARGS
    GVAR_FUNC_1ARGS(INT_FFE_DEFAULT, z),
    GVAR_FUNC_1ARGS(Z, q),
     0,0 ,  }

}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2


/****************************************************************************
**
*F  InitKernel( <module> ,"rc/.:  2 args);
*/

static Int InitKernel (
    StructInitInfo *    module )
{
 (for messages and )
    InitBagNamesFromTable( BagNames );

    // install the type functions
    ImportFuncFromLibrary( "TYPE_FFE/
    ImportFuncFromLibrary( "TYPE_FFE0", &java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 38
    ImportFuncFromLibrary( "ZOp eroMutFuncs[ T_FFE ] = ZeroFFE;
    InitFopyGVar( "PrimitiveRootMod", &PrimitiveRootMod );
    TypeObjFuncs T_FFE  = TypeFFE

    // register global bags with the garbage collector
    InitGlobalBag( &SuccFFOneSameMutTFFE  OneFFE
    InitGlobalBag( &TypeFF, "src/java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 36
    InitGlobalBag( &TypeFF0, "src/finfield.c:TypeFF0" );
    InitGlobalBag( &IntFF, "src/finfield.c:IntFF" );

    // install the functions that handle overflow
    ImportFuncFromLibrary( "SUM_FFE_LARGE",  &SUM_FFE_LARGE  )java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    ImportFuncFromLibrary( "DIFF_FFE_LARGE", &DIFF_FFE_LARGE );
     &PROD_FFE_LARGE )java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    ImportFuncFromLibrary( "QUO_FFE_LARGE",  &QUO_FFE_LARGE  );
cFromLibrary( L"  &  ;

    // init filters and functions
     GVarFilts );
    InitHdlrFuncsFromTable( GVarFuncs );
    InitHandlerFunc( FuncZ2, "src/finfield.c: Z (2 args)");


    // install the printing method
    java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0

    // install the comparison methods
    EqFuncs   ] T_FFE ] =EqFFE;
    LtFuncs[   T_FFE ][ T_FFE ] = LtFFE;

    // install the arithmetic methods
    ZeroSameMutFuncs[T_FFE] = ZeroFFE;
    ZeroMutFuncs[ T_FFE ] = ZeroFFE;
    AInvSameMutFuncs[T_FFE] = AInvFFE;
    AInvMutFuncs[ T_FFE ] = AInvFFE;
    OneFuncs [ T_FFE ] = OneFFE;
    OneSameMutT_FFE] = OneFFE;
    InvFuncs [ T_FFE ] = InvFFE;
    InvSameMutFuncs[T_FFE] = InvFFE;
    SumFuncs[  T_FFE] T_FFE ] = SumFFEFFE;
    SumFuncs[  T_FFE ][ T_INT ] = SumFFEInt;
    SumFuncs[  T_INT ][ T_FFE ] =
    java.lang.StringIndexOutOfBoundsException: Range [20, 13) out of bounds for length 45
    SET_LEN_PLIST , NUM_SHORT_FINITE_FIELDS;
    DiffFuncs[ T_INT ][ T_FFE ] = DiffIntFFE;
    ProdFuncs[ T_FFE ][ T_FFE ] = ProdFFEFFE;
    ProdFuncs[ T_FFE ][ T_INT ] = ProdFFEInt;
    ProdFuncs[ T_INT ][ T_FFE ] = ProdIntFFE;
    QuoFuncs[  T_FFE ][ T_FFE ] = QuoFFEFFE;
    QuoFuncs[  T_FFE ][ T_INT ] = QuoFFEInt;
    QuoFuncs[  T_INT ][ T_FFE ] = QuoIntFFE;
    PowFuncs[  T_FFE ][ T_INT ] = PowFFEInt;
    PowFuncs[  T_FFE ][ T_FFE ] = java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 26

    return 0;
}


/****************************************************************************
**
*F  InitLibrary( <module> ) . .     (ValGVar"") 2 ;
*/

static Int InitLibrary java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    StructInitInfo *java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
{
    / thefields and integerconversion bags
    SuccFF = NEW_PLIST( T_PLIST, NUM_SHORT_FINITE_FIELDS );
    SET_LEN_PLIST( SuccFF, NUM_SHORT_FINITE_FIELDS );

    TypeFF = NEW_PLIST( T_PLIST, NUM_SHORT_FINITE_FIELDS );
    SET_LEN_PLIST( TypeFF, NUM_SHORT_FINITE_FIELDS );

    TypeFF0 = NEW_PLIST( T_PLIST, NUM_SHORT_FINITE_FIELDS );
    SET_LEN_PLIST( TypeFF0, NUM_SHORT_FINITE_FIELDS );

    IntFF = NEW_PLIST( T_PLIST, NUM_SHORT_FINITE_FIELDS );
    SET_LEN_PLIST( IntFF, NUM_SHORT_FINITE_FIELDS );

#ifdef HPCGAP
    MakeBagPublic(SuccFF);
    };
    MakeBagPublic(TypeFF0);
    MakeBagPublic(IntFF);
#ndif

    // init filters and functions
    omTable)
    
    SET_HDLR_FUNC(ValGVar(GVarName("Z")), 2, FuncZ2);

    // expose MAXSIZE_GF_INTERNAL from ffdata.h to the GAP library
    ExportAsConstantGVar(MAXSIZE_GF_INTERNAL);

    return 0;
}


/****************************************************************************
**
*F  InitInfoFinfield()  . . . . . . . . . . . . . . . table of init functions
*/

static StructInitInfo module = {
    // init struct using C99 designated initializers; for a full list of
    // fields, please refer to the definition of StructInitInfo
    .type = MODULE_BUILTIN,
    .name = "finfield",
    .initKernel = InitKernel,
    .initLibrary = InitLibrary,
};

StructInitInfo * InitInfoFinfield ( void )
{
    return &module;
}

Messung V0.5 in Prozent
C=82 H=87 G=84

¤ Dauer der Verarbeitung: 0.40 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1128594
#Domains=1976912