856{
857
859
863 if(
p->GFChar > (2<<15))
864 {
865#ifndef SING_NDEBUG
866 WarnS(
"illegal characteristic");
867#endif
869 }
870
871 const double check=
log ((
double) (
p->GFChar));
872
873 #define sixteenlog2 11.09035489
875 {
876#ifndef SING_NDEBUG
877 Warn(
"Sorry: illegal size: %u ^ %u",
p->GFChar,
p->GFDegree );
878#endif
880 }
881
885
889
894
895 r->cfExactDiv=
nfDiv;
898
900
901
902
903
904
907
908
909
910
913
921
922
923
925
926
928
930
932
933#ifdef LDEBUG
935#endif
936
937
938 const char *
name =
p->GFPar_name;
939
940 r->m_nfCharQ = 0;
941 r->m_nfCharP =
p->GFChar;
942 r->m_nfCharQ1 = 0;
943
944 r->iNumberOfParameters = 1;
946
947 char ** pParameterNames = (
char **)
omAlloc(
sizeof(
char *));
951
952 r->pParameterNames = (const char**)pParameterNames;
953
954 r->m_nfPlus1Table=
NULL;
955
956 if (strlen(
name) > 1)
958 else
960
961 r->has_simple_Alloc=
TRUE;
962 r->has_simple_Inverse=
TRUE;
963
964 int c = (int)
pow ((
double)
p->GFChar, (
double)
p->GFDegree);
965
967
968 if( r->m_nfPlus1Table ==
NULL )
969 {
970 Werror(
"reading table for field with %d elements failed",c);
972 }
973
974
975 assume (r -> m_nfCharQ > 0);
976
977 r->ch = r->m_nfCharP;
979
981}
Rational pow(const Rational &a, int e)
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
@ n_rep_gf
(int), see ffields.h
Creation data needed for finite fields.
static BOOLEAN nfIsMOne(number a, const coeffs r)
static number nfInitMPZ(mpz_t m, const coeffs cf)
static number nfAdd(number a, number b, const coeffs R)
static nMapFunc nfSetMap(const coeffs src, const coeffs dst)
static BOOLEAN nfDBTest(number a, const char *f, const int l, const coeffs r)
static number nfInit(long i, const coeffs r)
static void nfKillChar(coeffs r)
static int nfParDeg(number n, const coeffs r)
static long nfInt(number &n, const coeffs r)
static number nfMult(number a, number b, const coeffs r)
static BOOLEAN nfGreaterZero(number k, const coeffs r)
static char * nfCoeffName(const coeffs r)
static void nfWriteShort(number a, const coeffs r)
static number nfSub(number a, number b, const coeffs r)
static number nfRandom(siRandProc p, number, number, const coeffs cf)
static BOOLEAN nfIsOne(number a, const coeffs r)
static void nfCoeffWrite(const coeffs r, BOOLEAN details)
static const char * nfRead(const char *s, number *a, const coeffs r)
static BOOLEAN nfGreater(number a, number b, const coeffs r)
static number nfNeg(number c, const coeffs r)
static BOOLEAN nfIsZero(number a, const coeffs r)
static BOOLEAN nfCoeffIsEqual(const coeffs, n_coeffType, void *)
static BOOLEAN nfEqual(number a, number b, const coeffs r)
static void nfReadTable(const int c, const coeffs r)
static void nfWriteLong(number a, const coeffs r)
static number nfDiv(number a, number b, const coeffs r)
static number nfParameter(int i, const coeffs)
static number nfInvers(number c, const coeffs r)
static void nfPower(number a, int i, number *result, const coeffs r)
gmp_float log(const gmp_float &a)
void Werror(const char *fmt,...)
int name
New type name for int.