gmp_complex numbers based on
More...
#include <mpr_complex.h>
|
gmp_complex | operator+ (const gmp_complex &a, const gmp_complex &b) |
|
gmp_complex | operator- (const gmp_complex &a, const gmp_complex &b) |
|
gmp_complex | operator* (const gmp_complex &a, const gmp_complex &b) |
|
gmp_complex | operator/ (const gmp_complex &a, const gmp_complex &b) |
|
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_complex numbers based on
Definition at line 180 of file mpr_complex.h.
◆ gmp_complex() [1/4]
◆ gmp_complex() [2/4]
◆ gmp_complex() [3/4]
gmp_complex::gmp_complex |
( |
const long | re, |
|
|
const long | im ) |
|
inline |
◆ gmp_complex() [4/4]
Definition at line 201 of file mpr_complex.h.
202 {
205 }
const Variable & v
< [in] a sqrfree bivariate poly
◆ ~gmp_complex()
gmp_complex::~gmp_complex |
( |
| ) |
|
|
inline |
◆ imag() [1/2]
◆ imag() [2/2]
◆ isZero()
bool gmp_complex::isZero |
( |
| ) |
|
|
inline |
◆ neg()
◆ operator*=()
Definition at line 645 of file mpr_complex.cc.
646{
647 gmp_float
f =
r *
b.r -
i *
b.i;
648 i =
r *
b.i +
i *
b.r;
650 return *this;
651}
◆ operator+=()
◆ operator-=()
◆ operator/=()
Definition at line 658 of file mpr_complex.cc.
659{
660 gmp_float d =
b.r*
b.r +
b.i*
b.i;
661 r = (
r *
b.r +
i *
b.i) / d;
662 i = (
i *
b.r -
r *
b.i) / d;
663 return *this;
664}
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ real() [1/2]
◆ real() [2/2]
◆ SmallToZero()
void gmp_complex::SmallToZero |
( |
| ) |
|
Definition at line 776 of file mpr_complex.cc.
777{
778 gmp_float ar=this->
real();
779 gmp_float ai=this->
imag();
783 mpf_set_prec(*ar.
_mpfp(), 32);
784 mpf_set_prec(*ai.
_mpfp(), 32);
785 if (ar > ai)
786 {
789 }
790 else
791 {
794 }
795}
STATIC_VAR gmp_float * gmpRel
◆ operator* [1/2]
Definition at line 619 of file mpr_complex.cc.
620{
622 a.
r *
b.i + a.
i *
b.r);
623}
gmp_complex(const gmp_float re=0.0, const gmp_float im=0.0)
◆ operator* [2/2]
◆ operator+ [1/2]
◆ operator+ [2/2]
◆ operator- [1/2]
◆ operator- [2/2]
◆ operator/ [1/2]
Definition at line 624 of file mpr_complex.cc.
625{
626 gmp_float d =
b.r*
b.r +
b.i*
b.i;
628 (a.
i *
b.r - a.
r *
b.i) / d);
629}
◆ operator/ [2/2]
◆ operator<
◆ operator<=
◆ operator==
◆ operator>
◆ operator>=
The documentation for this class was generated from the following files: