#include <double.hpp>
|
std::complex< double > | val |
|
Definition at line 21 of file double.hpp.
◆ Double() [1/4]
libff::Double::Double |
( |
| ) |
|
Definition at line 24 of file double.cpp.
25 {
26 val = std::complex<double>(0, 0);
27 }
std::complex< double > val
◆ Double() [2/4]
libff::Double::Double |
( |
double | real | ) |
|
Definition at line 29 of file double.cpp.
30 {
31 val = std::complex<double>(real, 0);
32 }
◆ Double() [3/4]
libff::Double::Double |
( |
double | real, |
|
|
double | imag ) |
Definition at line 34 of file double.cpp.
35 {
36 val = std::complex<double>(real, imag);
37 }
◆ Double() [4/4]
libff::Double::Double |
( |
std::complex< double > | num | ) |
|
◆ arithmetic_generator()
Double libff::Double::arithmetic_generator |
( |
| ) |
|
|
static |
◆ as_bigint()
◆ as_ulong()
unsigned long libff::Double::as_ulong |
( |
| ) |
const |
Definition at line 158 of file double.cpp.
159 {
160 return round(
val.real());
161 }
◆ geometric_generator()
Double libff::Double::geometric_generator |
( |
| ) |
|
|
static |
◆ inverse()
Double libff::Double::inverse |
( |
| ) |
const |
Definition at line 144 of file double.cpp.
145 {
146#ifdef PROFILE_OP_COUNTS
148#endif
149
150 return Double(std::complex<double>(1) /
val);
151 }
◆ one()
◆ operator!=()
bool libff::Double::operator!= |
( |
const Double & | other | ) |
const |
◆ operator*()
Double libff::Double::operator* |
( |
const Double & | other | ) |
const |
Definition at line 67 of file double.cpp.
68 {
69#ifdef PROFILE_OP_COUNTS
71#endif
72
74 }
◆ operator*=()
Definition at line 103 of file double.cpp.
104 {
105#ifdef PROFILE_OP_COUNTS
107#endif
108
109 this->
val *= std::complex<double>(
other.val);
110 return *this;
111 }
◆ operator+()
Double libff::Double::operator+ |
( |
const Double & | other | ) |
const |
Definition at line 49 of file double.cpp.
50 {
51#ifdef PROFILE_OP_COUNTS
53#endif
54
56 }
◆ operator+=()
Definition at line 83 of file double.cpp.
84 {
85#ifdef PROFILE_OP_COUNTS
87#endif
88
90 return *this;
91 }
◆ operator-() [1/2]
Double libff::Double::operator- |
( |
| ) |
const |
◆ operator-() [2/2]
Double libff::Double::operator- |
( |
const Double & | other | ) |
const |
Definition at line 58 of file double.cpp.
59 {
60#ifdef PROFILE_OP_COUNTS
62#endif
63
65 }
◆ operator-=()
Definition at line 93 of file double.cpp.
94 {
95#ifdef PROFILE_OP_COUNTS
97#endif
98
100 return *this;
101 }
◆ operator<()
bool libff::Double::operator< |
( |
const Double & | other | ) |
const |
◆ operator==()
bool libff::Double::operator== |
( |
const Double & | other | ) |
const |
Definition at line 113 of file double.cpp.
114 {
115 return (std::abs(
val.real() -
other.val.real()) < 0.000001)
116 && (std::abs(
val.imag() -
other.val.imag()) < 0.000001);
117 }
◆ operator>()
bool libff::Double::operator> |
( |
const Double & | other | ) |
const |
◆ operator^() [1/2]
Definition at line 134 of file double.cpp.
135 {
137 }
FieldT power(const FieldT &base, const bigint< m > &exponent)
◆ operator^() [2/2]
Double libff::Double::operator^ |
( |
const size_t | power | ) |
const |
◆ random_element()
Double libff::Double::random_element |
( |
| ) |
|
|
static |
◆ squared()
Double libff::Double::squared |
( |
| ) |
const |
◆ zero()
Double libff::Double::zero |
( |
| ) |
|
|
static |
◆ add_cnt
unsigned libff::Double::add_cnt = 0 |
|
static |
◆ inv_cnt
unsigned libff::Double::inv_cnt = 0 |
|
static |
◆ mul_cnt
unsigned libff::Double::mul_cnt = 0 |
|
static |
◆ multiplicative_generator
◆ root_of_unity
Double libff::Double::root_of_unity |
|
static |
◆ sub_cnt
unsigned libff::Double::sub_cnt = 0 |
|
static |
◆ val
std::complex<double> libff::Double::val |
The documentation for this class was generated from the following files: