22 const double PI = 3.141592653589793238460264338328L;
26 val = std::complex<double>(0, 0);
31 val = std::complex<double>(real, 0);
36 val = std::complex<double>(real, imag);
51#ifdef PROFILE_OP_COUNTS
60#ifdef PROFILE_OP_COUNTS
69#ifdef PROFILE_OP_COUNTS
85#ifdef PROFILE_OP_COUNTS
89 this->
val = std::complex<double>(
val + other.val);
95#ifdef PROFILE_OP_COUNTS
99 this->
val = std::complex<double>(
val - other.val);
105#ifdef PROFILE_OP_COUNTS
109 this->
val *= std::complex<double>(other.val);
115 return (std::abs(
val.real() - other.val.real()) < 0.000001)
116 && (std::abs(
val.imag() - other.val.imag()) < 0.000001);
126 return (
val.real() < other.val.real());
131 return (
val.real() > other.val.real());
146#ifdef PROFILE_OP_COUNTS
150 return Double(std::complex<double>(1) /
val);
160 return round(
val.real());
180 return Double(std::rand() % 1001);
static Double geometric_generator()
Double & operator*=(const Double &other)
static Double random_element()
Double operator^(const libff::bigint< 1 > power) const
Double & operator+=(const Double &other)
bool operator<(const Double &other) const
static Double multiplicative_generator
std::complex< double > val
Double operator+(const Double &other) const
static Double arithmetic_generator()
libff::bigint< 1 > as_bigint() const
bool operator>(const Double &other) const
Double operator*(const Double &other) const
bool operator!=(const Double &other) const
unsigned long as_ulong() const
bool operator==(const Double &other) const
Double & operator-=(const Double &other)
FieldT power(const FieldT &base, const bigint< m > &exponent)