Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
double.hpp
Go to the documentation of this file.
1
12#ifndef DOUBLE_HPP_
13#define DOUBLE_HPP_
14
15#include <complex>
16
18
19namespace libff {
20
21 class Double
22 {
23 public:
24 std::complex<double> val;
25
26 Double();
27
28 Double(double real);
29
30 Double(double real, double imag);
31
32 Double(std::complex<double> num);
33
34 static unsigned add_cnt;
35 static unsigned sub_cnt;
36 static unsigned mul_cnt;
37 static unsigned inv_cnt;
38
39 Double operator+(const Double &other) const;
40 Double operator-(const Double &other) const;
41 Double operator*(const Double &other) const;
42 Double operator-() const;
43
44 Double& operator+=(const Double &other);
45 Double& operator-=(const Double &other);
46 Double& operator*=(const Double &other);
47
48 bool operator==(const Double &other) const;
49 bool operator!=(const Double &other) const;
50
51 bool operator<(const Double &other) const;
52 bool operator>(const Double &other) const;
53
55 Double operator^(const size_t power) const;
56
58 unsigned long as_ulong() const;
59 Double inverse() const;
60 Double squared() const;
61
62 static Double one();
63 static Double zero();
64 static Double random_element();
67
69 static Double root_of_unity; // See get_root_of_unity() in field_utils
70 static size_t s;
71 };
72} // libff
73
74#endif // DOUBLE_HPP_
Double inverse() const
Definition double.cpp:144
static Double geometric_generator()
Definition double.cpp:183
Double & operator*=(const Double &other)
Definition double.cpp:103
static Double random_element()
Definition double.cpp:178
static unsigned add_cnt
Definition double.hpp:34
Double operator^(const libff::bigint< 1 > power) const
Definition double.cpp:134
Double & operator+=(const Double &other)
Definition double.cpp:83
bool operator<(const Double &other) const
Definition double.cpp:124
static Double multiplicative_generator
Definition double.hpp:68
static Double zero()
Definition double.cpp:173
std::complex< double > val
Definition double.hpp:24
static unsigned sub_cnt
Definition double.hpp:35
Double operator+(const Double &other) const
Definition double.cpp:49
static Double arithmetic_generator()
Definition double.cpp:188
libff::bigint< 1 > as_bigint() const
Definition double.cpp:153
bool operator>(const Double &other) const
Definition double.cpp:129
static Double root_of_unity
Definition double.hpp:69
Double squared() const
Definition double.cpp:163
static Double one()
Definition double.cpp:168
Double operator*(const Double &other) const
Definition double.cpp:67
static unsigned inv_cnt
Definition double.hpp:37
static size_t s
Definition double.hpp:70
bool operator!=(const Double &other) const
Definition double.cpp:119
unsigned long as_ulong() const
Definition double.cpp:158
bool operator==(const Double &other) const
Definition double.cpp:113
Double & operator-=(const Double &other)
Definition double.cpp:93
static unsigned mul_cnt
Definition double.hpp:36
Double operator-() const
Definition double.cpp:76
FieldT power(const FieldT &base, const bigint< m > &exponent)