Go to the source code of this file.
|
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 two parts: the "output" part a and the "rest" part b.
|
|
char * | floatToStr (const gmp_float &r, const unsigned int oprec) |
|
gmp_float | abs (const gmp_float &) |
|
gmp_float | sqrt (const gmp_float &) |
|
gmp_float | hypot (const gmp_float &, const gmp_float &) |
|
gmp_float | sin (const gmp_float &) |
|
gmp_float | cos (const gmp_float &) |
|
gmp_float | log (const gmp_float &) |
|
gmp_float | exp (const gmp_float &) |
|
gmp_float | max (const gmp_float &, const gmp_float &) |
|
gmp_float | numberToFloat (number num, const coeffs src) |
|
gmp_float | numberFieldToFloat (number num, int src) |
|
gmp_complex | operator+ (const gmp_complex &a, const gmp_float b_d) |
|
gmp_complex | operator- (const gmp_complex &a, const gmp_float b_d) |
|
gmp_complex | operator* (const gmp_complex &a, const gmp_float b_d) |
|
gmp_complex | operator/ (const gmp_complex &a, const gmp_float b_d) |
|
bool | operator== (const gmp_complex &a, const gmp_complex &b) |
|
bool | operator> (const gmp_complex &a, const gmp_complex &b) |
|
bool | operator< (const gmp_complex &a, const gmp_complex &b) |
|
bool | operator>= (const gmp_complex &a, const gmp_complex &b) |
|
bool | operator<= (const gmp_complex &a, const gmp_complex &b) |
|
gmp_float | abs (const gmp_complex &c) |
|
gmp_complex | sqrt (const gmp_complex &x) |
|
gmp_complex | numberToComplex (number num, const coeffs r) |
|
char * | complexToStr (gmp_complex &c, const unsigned int oprec, const coeffs src) |
|
bool | complexNearZero (gmp_complex *c, int digits) |
|
◆ CTOF
◆ QTOF
◆ RTOF
◆ ZTOF
◆ abs() [1/2]
Definition at line 305 of file mpr_complex.h.
306{
308}
gmp_float hypot(const gmp_float &, const gmp_float &)
◆ abs() [2/2]
◆ complexNearZero()
Definition at line 757 of file mpr_complex.cc.
758{
760
761 if (
digits < 1 )
return true;
762
764
767
768
769
772 else
774}
Rational pow(const Rational &a, int e)
◆ complexToStr()
Definition at line 696 of file mpr_complex.cc.
697{
700
702 {
705 }
706
708
710
713 {
714
717
719 {
725 else
726 {
731 else
733 }
734 }
735 else
736 {
742 else
744 }
747 }
748 else
749 {
751 }
752
754}
const CanonicalForm CFMap CFMap & N
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_long_C(const coeffs r)
gmp_float abs(const gmp_float &a)
char * floatToStr(const gmp_float &r, const unsigned int oprec)
◆ cos()
Definition at line 330 of file mpr_complex.cc.
331{
334}
gmp_float cos(const gmp_float &a)
◆ exp()
Definition at line 349 of file mpr_complex.cc.
350{
353}
gmp_float exp(const gmp_float &a)
◆ floatToStr()
Definition at line 570 of file mpr_complex.cc.
571{
572#if 1
576
579
581
582
583
584
585
586
587
588
589
590
591
597
599#else
600
604#endif
605}
char * nicifyFloatStr(char *in, mp_exp_t exponent, size_t oprec, int *size, int thesign)
◆ hypot()
Definition at line 340 of file mpr_complex.cc.
341{
342#if 1
343 return (
sqrt( (a*a) + (
b*
b) ) );
344#else
347#endif
348}
gmp_float sqrt(const gmp_float &a)
gmp_float hypot(const gmp_float &a, const gmp_float &b)
◆ log()
Definition at line 335 of file mpr_complex.cc.
336{
339}
gmp_float log(const gmp_float &a)
◆ max()
◆ numberFieldToFloat()
Definition at line 430 of file mpr_complex.cc.
431{
433
435 {
438 {
440 {
442 }
443 else
444 {
446 {
449 }
450 else
451 {
453 }
454 }
455 }
456 else
457 {
458 r= 0.0;
459 }
460 break;
463 break;
465 WerrorS(
"Can not map from field C to field R!");
466 break;
468 default:
469 WerrorS(
"Ground field not implemented!");
470 }
471
472 return r;
473}
void WerrorS(const char *s)
◆ numberToComplex()
Definition at line 312 of file mpr_complex.h.
313{
315 {
317 }
318 else
319 {
321 }
322}
gmp_complex numbers based on
gmp_float numberToFloat(number num, const coeffs src)
◆ numberToFloat()
Definition at line 364 of file mpr_complex.cc.
365{
367
369 {
371 {
373 {
374
378 else
380
381
382
383 }
384 else
385 {
387 {
389 }
391 {
393 }
394 else
395 {
397 {
400 }
401 else
402 {
404 }
405 }
406 }
407 }
408 else
409 {
410 r= 0.0;
411 }
412 }
414 {
416 }
418 {
419
420 WerrorS(
"Ground field not implemented!");
421 }
422 else
423 {
424 WerrorS(
"Ground field not implemented!");
425 }
426
427 return r;
428}
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
void nlNormalize(number &x, const coeffs r)
◆ operator*()
◆ operator+()
◆ operator-()
◆ operator/()
◆ operator<()
◆ operator<=()
◆ operator==()
◆ operator>()
◆ operator>=()
◆ setGMPFloatDigits()
Set size of mantissa digits - the number of output digits (basis 10) the size of mantissa consists of two parts: the "output" part a and the "rest" part b.
According to the GMP-precision digits is recomputed to bits (basis 2). Two numbers a, b are equal if | a - b | < | a | * 0.1^digits . In this case we have a - b = 0 . The epsilon e is e=0.1^(digits+rest) with 1+e != 1, but 1+0.1*e = 1.
Definition at line 60 of file mpr_complex.cc.
61{
75}
STATIC_VAR gmp_float * gmpRel
STATIC_VAR gmp_float * diff
VAR size_t gmp_output_digits
◆ sin()
Definition at line 325 of file mpr_complex.cc.
326{
329}
gmp_float sin(const gmp_float &a)
◆ sqrt() [1/2]
Definition at line 668 of file mpr_complex.cc.
669{
673 {
675 }
677 {
680 }
681 else
682 {
685 {
687 }
689 }
692}
◆ sqrt() [2/2]