948 {
952 if(elementarray ==
NULL || poly ==
NULL || coef != elementarray[0]->basecoeffs()){
955 }
956
957 for(
int i=1;
i<size_elementarray;
i++){
958 if(coef != elementarray[0]->basecoeffs()){
961 }
962 }
963
964
967 WerrorS(
"Ground field not implemented!\n");
969 }
970
971 if(deg<2){
972 WerrorS(
"degree of polynomial to small\n");
974 }
975
976 if(precision<6){
977 precision = 6;
978 }
981 }
982
985 char* n[] = {(char*)"i"};
986 ring newring =
rDefault(coef, 1, n);
991 rootcont->
solver( precision+12);
993 if(number_roots != deg){
994 WerrorS(
"something went wrong: \n\tnot all roots found\n");
996 }
1000 paramComp.
par_name=(
const char*)
"i";
1001
1003
1004 number* roots = new number[deg+1];
1005 number* complexroots = new number[deg+1];
1006 int r1 = 0;
1007 int r2 = 0;
1008 for(
int j=0;
j<deg;
j++){
1012 r1++;
1015 r2++;
1016 }
1018 }
1022 delete &n;
1023
1026 for(
int j=0;
j<r2;
j++){
1029 }
1030 delete complexroots;
1033 for(
int i=0;
i<size_elementarray;
i++){
1035 }
1039 for(
int i=1;
i<= r1;
i++){
1041 for(
int l=0;
l< deg;
l++){
1042 for(
int j=0;
j<size_elementarray;
j++){
1046 }
1048 }
1050 }
1053 if(r2>0){
1057 for(
int i=1;
i<= r2;
i++){
1059 for(
int l=0;
l< deg;
l++){
1060 for(
int j=0;
j<size_elementarray;
j++){
1064 }
1066 }
1068 for(
int j=1;
j<=size_elementarray;
j++){
1072 }
1073 }
1074 }
1076 for(
int i=0;
i<size_elementarray;
i++){
1078 }
1079 delete elements;
1080 for(
int i=0;
i<r1+r2;
i++){
1082 }
1083 delete roots;
1084
1089 paramComp.
par_name=(
const char*)
"i";
1091
1093 delete complexmat;
1094 return realmat;
1095}
static int si_min(const int a, const int b)
bigintmat * bimChangeCoeff(bigintmat *a, coeffs cnew)
Liefert Kopier von Matrix a zurück, mit coeffs cnew statt den ursprünglichen.
number view(int i, int j) const
view an entry an entry. NOTE: starts at [1,1]
void rawset(int i, number n, const coeffs C=NULL)
replace an entry with the given number n (only delete old). NOTE: starts at [0]. Should be named set_...
void set(int i, int j, number n, const coeffs C=NULL)
replace an entry with a copy (delete old + copy new!). NOTE: starts at [1,1]
complex root finder for univariate polynomials based on laguers algorithm
gmp_complex * getRoot(const int i)
void fillContainer(number *_coeffs, number *_ievpoint, const int _var, const int _tdg, const rootType _rt, const int _anz)
bool solver(const int polishmode=PM_NONE)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
static FORCE_INLINE BOOLEAN nCoeff_is_Z(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
@ n_long_R
real floating point (GMP) numbers
@ n_long_C
complex floating point (GMP) numbers
short float_len2
additional char-flags, rInit
const char * par_name
parameter name
static FORCE_INLINE number n_RePart(number i, const coeffs cf)
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
short float_len
additional char-flags, rInit
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
int comp(const CanonicalForm &A, const CanonicalForm &B)
compare polynomials
void WerrorS(const char *s)
bool IsReal(number a, coeffs coef)
number squareroot(number a, coeffs coef, int prec)
bool ImagGreaterZero(number a, coeffs coef)
void mult(unsigned long *result, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
void setGMPFloatDigits(size_t digits, size_t rest)
Set size of mantissa digits - the number of output digits (basis 10) the size of mantissa consists of...
The main handler for Singular numbers which are suitable for Singular polynomials.
void rChangeCurrRing(ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void rDelete(ring r)
unconditionally deletes fields in r
ring rDefault(const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl, unsigned long bitmask)
static void view(const intvec *v)