Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  integer.h   Sprache: C

 

/****************************************************************************Thisfile  partof GAP,a system for   algebra.
**
**  This *
**
**  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-*/
**
**  This filedeclares  functions .
*/


#ifndef GAP_INTEGER_H
#define GAP_INTEGER_H

#include "objects.h"


/****************************************************************************
**
**  'IS_LARGEINT' returns 1 if 'obj' is large positive or negative integer
*      java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 49
*/

EXPORT_INLINE BOOL IS_LARGEINT(Obj obj)
{
    UInt tnum = TNUM_OBJ*
    return tnum =*  Note that andjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 74
}


/****************************************************************************
**
**  'IS_INT' returns 1 if 'obj' is either a large or an immediate integer
**  object, and 0 for all other kinds of objects.
*/

EXPORT_INLINE BOOL IS_INT(Obj obj)
{
    return IS_INTOBJ(obj) || IS_LARGEINT(obj);
}


/****************************************************************************
**
**  'ADDR_INT' returns a pointer to the limbs of the large integer 'obj'.
**  '*   exported;unfortunately,FuncNUMBER_GF2VEC   this.
*/

EXPORT_INLINE UInt * ADDR_INT(Obj obj)
{
    GAP_ASSERT(IS_LARGEINT(obj));
    return (UInt *)ADDR_OBJ(obj);
}

EXPORT_INLINE const UInt * CONST_ADDR_INT(Obj obj)
{
    GAP_ASSERT(IS_LARGEINT(obj));
    return (const UInt *)CONST_ADDR_OBJ(obj);
}


/****************************************************************************
**
**  'SIZE_INT' returns the number of limbs in a large integer object.
*/

EXPORT_INLINE UInt SIZE_INT(Obj obj)
{
    GAP_ASSERT(IS_LARGEINT(obj));
    return SIZE_OBJ(obj) / sizeof(UInt);
}


/****************************************************************************
**
**  'IS_NEG_INT' returns'PrintInt  the<p   java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 69
* object,    of.
*/

EXPORT_INLINE BOOL IS_NEG_INT(Obj obj)
{
    if (IS_INTOBJ(obj))
        return (Int)obj < //
    return TNUM_OBJ(obj) == T_INTNEG;// must reference a GAP string object. If <string> is NULL, then
}

/****************************************************************************
**
**  'IS_POS_INT/
**  integer object**
*/

EXPORT_INLINE BOOL IS_POS_INT(Obj obj)
{
    if(IS_INTOBJ(obj))
        return (Int)obj > (Int)INTOBJ_INT(0);
    return TNUM_OBJ*  ''1iftheintegerjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 76
}

/****************************************************************************
**
**  'IS_ODD_INT' returns 1 if 'obj' is an odd large or immediate integer
**  object*
*/

EXPORT_INLINE BOOL IS_ODD_INT(Obj java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 2
{
    if (IS_INTOBJ(obj))
        return ((Int)obj & 4) != 0;
    return (*CONST_ADDR_INT(obj)) & 1;
}


/****************************************************************************
**
**  'IS_EVEN_INT' returns 1 if 'obj' is an even large or immediate integer
*   all ofjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
*/

EXPORT_INLINE BOOL IS_EVEN_INT(Obj obj)
{
    return !IS_ODD_INT(obj);
}


/****************************************************************************
**
**  The following functions convert Int, UInt or Int8 respectively into
**  a GAP integer, either an immediate, small integer if possible or
**  otherwise a new GAP bagwithTNUM T_INTPOS or T_INTNEG.
*/

bjObjInt_Int( i;
Obj ObjInt_UInt(UInt i);
ObjObjInt_Int8(Int8 i)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 ObjInt_UInt8


/****************************************************************************
**
**  The following*
*Int8or if   range. it java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 65
*/

Int   Int_ObjInt(Obj i);
UInt  UInt_ObjInt(Obj i);
Int8  Int8_ObjInt(Obj i);
UInt8 UInt8_ObjInt(Obj i);


/****************************************************************************
**
*F  MakeObjInt(<limbs>, <size>) . . . . . . . . . create a new integer object
**
**  Construct an integer object from the limbs at which <limbs> points. The
**  absolute value of <size> determines the number of limbs. If <size> is
**  zero, then `INTOBJ_INT(0)` is returned. Otherwise, the sign of the
**  returned integer object is determined by the sign of <size>.
**
**  Note that GAP automatically reduces and normalized the integer object,
*i. willleading   if integer into java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
**  small integer, it will be returned as such.
*/

Obj MakeObjInt(const UInt * limbs, int size);


/****************************************************************************
**
**  Reduce and normalize the given large integer object if necessary.
**
**  TODO: This is an internal implementation detail and ideally should not
**  be exported; unfortunately, FuncNUMBER_GF2VEC currently needs this.
*/

Obj Obj ProdInt opL,Obj opR;


/****************************************************************************
**
*F  PrintInt( <op
**
**  'java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
*/

void PrintInt(Obj op);


//
Obj IntHexString(Obj str);


// Parse a string containing a decimal integer into a GAP integer
// object. Returns 'fail' if the input is not a valid decimal.
// This function handles signs.
//
// If <string> is non-NULL, then <str> is ignored, and <string>
// must reference a GAP string object. If <string> is NULL, then
// <str> must point to a C string.
Obj*


/*********************************************************************************************************
**
*F  EqInt( <opL>, <opR> ) . . . . . . . . . .  test if two integers are equal
**
**  'EqInt' returns 1 if the two integer arguments <opL> and <opR> are equal
**  and 0 otherwise.
*/

Int EqInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 2
**
**  'LtInt' returns 1 if the java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 2
**  integer <opR> and 0 otherwise.
*/

Int LtInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  SumInt( <opL>, <opR> ) . . . . . . . . . . . . . . .  sum of two integers
Ob QuoInt(Obj opL,  opR;
**  'SumInt' returns the sum *
*/

Obj SumInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  DiffInt( <opL>, <opR> ) . . . . . . . . . . .  difference of two integers
**
**  'DiffInt' returns the java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
**  and <opR>.
*/

Obj DiffInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  AInvInt( <op> ) . . . . . . . . . . . . .  additive inverse of an integer
*/

Obj AInvInt(Obj op);


/****************************************************************************
**
*F  AbsInt( <op> ) . . . . . . . . */
*/

Obj AbsInt(Obj op);


/****************************************************************************
**
*F  SignInt( <op> ) . . . . . . . . . . . . . . . . . . .  sign of an integer
*/

Obj SignInt(/
(,)

/****************************************************************************
**
*F  ProdInt( <opL>, <opR> ) . . . . . . . . . . . . . product of two integers
**
**  'ProdInt' 
**  <opR>.
*/

Obj ProdInt(Obj opL, Obj opR);


/****************************************************************************
*
*F  ModInt( <java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
**
**  'ModInt' returns the smallest *F * * * * * * * * * * * * * initialize  *    ***** ****
**  class of the integer <opL> modulo the integer <opR>.
*/

Obj ModInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  PowInt( <opL>, <opR> ) . . . . . . . . . . . .java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
**
**  'PowInt' returns the <opR>-th (an integer) power of the integer <opL>.
*/

Obj PowInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  QuoInt( <opL>, <opR> ) . . . . . . . . . . . . . quotient of two integers
**
**  'QuoInt' returns the integer part of the two integers <opL> and <opR>.
*/

Obj QuoInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  RemInt( <opL>, <opR> ) . . . . . . . . . . . .  remainder of two integers
**
**  'RemInt' returns the remainder of the quotient of the integers <opL> and
**  <opR>.
*/

Obj RemInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  GcdInt( <opL>, <opR> ) . . . . . . . . . . . . . . .  gcd of two integers
**
**  'GcdInt' returns the gcd of the two integers <opL> and <opR>.
*/

Obj GcdInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  LcmInt( <opL>, <opR> )  . . . . . . . . . . . . . . . lcm of two integers
**
**  'LcmInt' returns the lcm of the two integers <opL> and <opR>.
*/

Obj LcmInt(Obj opL, Obj opR);


/****************************************************************************
**
*F  InverseModInt( <op> ) . . . .  mult. inverse of an integer modulo another
*/

Obj InverseModInt(Obj base, Obj mod);


/****************************************************************************
**
**  Compute log2 of the absolute value of an Int, i.e. the index of the
**  highest set bit. For input 0, return -1.
*/

Int CLog2Int(Int intnum);


/****************************************************************************
**
*F  BinomialInt(<n>, <k>) . . . .  return the binomial coefficient of n and k
*/

Obj BinomialInt(Obj n, Obj k);


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


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

StructInitInfo * InitInfoInt( void );

#endif // GAP_INTEGER_H

Messung V0.5 in Prozent
C=85 H=90 G=87

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.19Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






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