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 642 of file mpr_complex.cc.
643{
644 gmp_float
f =
r *
b.r -
i *
b.i;
645 i =
r *
b.i +
i *
b.r;
647 return *this;
648}
◆ operator+=()
◆ operator-=()
◆ operator/=()
Definition at line 655 of file mpr_complex.cc.
656{
657 gmp_float d =
b.r*
b.r +
b.i*
b.i;
658 r = (
r *
b.r +
i *
b.i) / d;
659 i = (
i *
b.r -
r *
b.i) / d;
660 return *this;
661}
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ real() [1/2]
◆ real() [2/2]
◆ SmallToZero()
| void gmp_complex::SmallToZero |
( |
| ) |
|
Definition at line 773 of file mpr_complex.cc.
774{
775 gmp_float ar=this->
real();
776 gmp_float ai=this->
imag();
780 mpf_set_prec(*ar.
_mpfp(), 32);
781 mpf_set_prec(*ai.
_mpfp(), 32);
782 if (ar > ai)
783 {
786 }
787 else
788 {
791 }
792}
STATIC_VAR gmp_float * gmpRel
◆ operator* [1/2]
Definition at line 616 of file mpr_complex.cc.
617{
619 a.
r *
b.i + a.
i *
b.r);
620}
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 621 of file mpr_complex.cc.
622{
623 gmp_float d =
b.r*
b.r +
b.i*
b.i;
625 (a.
i *
b.r - a.
r *
b.i) / d);
626}
◆ operator/ [2/2]
◆ operator<
◆ operator<=
◆ operator==
◆ operator>
◆ operator>=
The documentation for this class was generated from the following files: