32#define SR_HDL(A) ((long)(A))
33#define SR_TO_INT(SR) (((long)SR) >> 2)
123 if ((*(
s+1)!=
'+') && (*(
s+1)!=
'-'))
343 return (
sqrt( (a*a) + (
b*
b) ) );
420 WerrorS(
"Ground field not implemented!");
424 WerrorS(
"Ground field not implemented!");
465 WerrorS(
"Can not map from field C to field R!");
469 WerrorS(
"Ground field not implemented!");
481 int sign= (
in[0] ==
'-') ? 1 : 0;
622 a.
r *
b.i + a.
i *
b.r);
628 (a.
i *
b.r - a.
r *
b.i) / d);
648 i =
r *
b.i +
i *
b.r;
661 r = (
r *
b.r +
i *
b.i) / d;
662 i = (
i *
b.r -
r *
b.i) / d;
761 if (
digits < 1 )
return true;
780 if (ar.
isZero() ||
ai.isZero())
return;
Rational pow(const Rational &a, int e)
const CanonicalForm CFMap CFMap & N
gmp_complex numbers based on
gmp_complex & operator*=(const gmp_complex &a)
gmp_complex & operator/=(const gmp_complex &a)
gmp_complex & operator+=(const gmp_complex &a)
gmp_complex & operator-=(const gmp_complex &a)
void setFromStr(const char *in)
gmp_float & operator-=(const gmp_float &a)
gmp_float & operator+=(const gmp_float &a)
const mpf_t * mpfp() const
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
const CanonicalForm int s
void WerrorS(const char *s)
void nlNormalize(number &x, const coeffs r)
gmp_float sin(const gmp_float &a)
gmp_float operator*(const gmp_float &a, const gmp_float &b)
char * complexToStr(gmp_complex &c, const unsigned int oprec, const coeffs src)
bool operator<(const gmp_float &a, const gmp_float &b)
bool operator<=(const gmp_float &a, const gmp_float &b)
gmp_float abs(const gmp_float &a)
gmp_float max(const gmp_float &a, const gmp_float &b)
char * nicifyFloatStr(char *in, mp_exp_t exponent, size_t oprec, int *size, int thesign)
char * floatToStr(const gmp_float &r, const unsigned int oprec)
bool complexNearZero(gmp_complex *c, int digits)
gmp_float sqrt(const gmp_float &a)
gmp_float exp(const gmp_float &a)
gmp_float operator-(const gmp_float &a, const gmp_float &b)
gmp_float operator+(const gmp_float &a, const gmp_float &b)
gmp_float cos(const gmp_float &a)
bool operator==(const gmp_float &a, const gmp_float &b)
gmp_float numberToFloat(number num, const coeffs src)
gmp_float hypot(const gmp_float &a, const gmp_float &b)
gmp_float numberFieldToFloat(number num, int cf)
gmp_float log(const gmp_float &a)
STATIC_VAR gmp_float * gmpRel
gmp_float operator/(const gmp_float &a, const gmp_float &b)
STATIC_VAR gmp_float * diff
bool operator>=(const gmp_float &a, const gmp_float &b)
bool operator>(const gmp_float &a, const gmp_float &b)
VAR size_t gmp_output_digits
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.
#define omFreeSize(addr, size)