Changeset 7b8e28f in git
- Timestamp:
- Mar 12, 2021, 12:55:50 PM (2 years ago)
- Branches:
- (u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
- Children:
- 0dd7e8bafbd1f4c71feb76c0c887ba2fbbc66ef7
- Parents:
- 24457e03b41762fa464203e9f37e01f02fce2468
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/ffields.cc
r24457e r7b8e28f 858 858 BOOLEAN nfInitChar(coeffs r, void * parameter) 859 859 { 860 // the variables: 861 assume( getCoeffType(r) == n_GF ); 862 863 GFInfo* p = (GFInfo *)(parameter); 864 assume (p->GFChar > 0); 865 assume (p->GFDegree > 0); 866 if ((IsPrime(p->GFChar)==p->GFChar)&&(p->GFDegree==1)) /* for oscar-system/Singular.jl/issues/177 */ 867 { 868 return npInitChar(r,(void*)(long)p->GFChar); 869 } 870 if(p->GFChar > (2<<15)) 871 { 872 #ifndef SING_NDEBUG 873 WarnS("illegal characteristic"); 874 #endif 875 return TRUE; 876 } 877 878 const double check= log ((double) (p->GFChar)); 879 880 #define sixteenlog2 11.09035489 881 if( (p->GFDegree * check) > sixteenlog2 ) 882 { 883 #ifndef SING_NDEBUG 884 Warn("Sorry: illegal size: %u ^ %u", p->GFChar, p->GFDegree ); 885 #endif 886 return TRUE; 887 } 888 860 889 r->is_field=TRUE; 861 890 r->is_domain=TRUE; … … 915 944 #endif 916 945 917 // the variables:918 assume( getCoeffType(r) == n_GF );919 920 GFInfo* p = (GFInfo *)(parameter);921 assume (p->GFChar > 0);922 assume (p->GFDegree > 0);923 946 924 947 const char * name = p->GFPar_name; … … 948 971 r->has_simple_Inverse=TRUE; 949 972 950 if ((IsPrime(p->GFChar)==p->GFChar)&&(p->GFDegree==1)) /* for oscar-system/Singular.jl/issues/177 */951 {952 return npInitChar(r,(void*)(long)p->GFChar);953 }954 if(p->GFChar > (2<<15))955 {956 #ifndef SING_NDEBUG957 WarnS("illegal characteristic");958 #endif959 return TRUE;960 }961 962 const double check= log ((double) (p->GFChar));963 964 #define sixteenlog2 11.09035489965 if( (p->GFDegree * check) > sixteenlog2 )966 {967 #ifndef SING_NDEBUG968 Warn("Sorry: illegal size: %u ^ %u", p->GFChar, p->GFDegree );969 #endif970 return TRUE;971 }972 973 973 int c = (int)pow ((double)p->GFChar, (double)p->GFDegree); 974 974
Note: See TracChangeset
for help on using the changeset viewer.