11 #include <concorde/INCLUDE/bigguy.h> 26 bg(CCbigguy_itobigguy(i)) {}
29 bg(CCbigguy_dtobigguy(d)) {};
33 {
return CCbigguy_bigguytod(
bg); }
36 { CCbigguy_add(&
bg, f.
bg);
return *
this; }
39 { CCbigguy_sub(&
bg, f.
bg);
return *
this; }
45 {
Fixed64 result; result.
bg = CCbigguy_ceil(
bg);
return result; }
48 bool operator<(
const Fixed64 &f)
const 49 {
return CCbigguy_cmp(
bg, f.
bg) == -1; }
51 bool operator==(
const Fixed64 &f)
const 52 {
return CCbigguy_cmp(
bg, f.
bg) == 0; }
54 bool operator!=(
const Fixed64 &f)
const 55 {
return CCbigguy_cmp(
bg, f.
bg) != 0; }
57 bool operator>(
const Fixed64 &f)
const 58 {
return CCbigguy_cmp(
bg, f.
bg) == 1; }
60 bool operator<=(
const Fixed64 &f)
const 61 {
return CCbigguy_cmp(
bg, f.
bg) <= 0; }
63 bool operator>=(
const Fixed64 &f)
const 64 {
return CCbigguy_cmp(
bg, f.
bg) >= 0; }
76 CCbigguy_addmult(&f.
bg, g.
bg, m);
79 inline void add_mult(
double &d,
const double &g,
int m)
84 inline std::ostream &operator<<(std::ostream &os,
const Fixed64 &f)
Fixed64(int i)
Construct from integer.
Definition: fixed64.hpp:25
Fixed64 ceil() const
Integer ceiling.
Definition: fixed64.hpp:44
Fixed64 & operator+=(Fixed64 f)
Plus increment.
Definition: fixed64.hpp:35
CCbigguy bg
The underlying Concorde structure.
Definition: fixed64.hpp:68
Fixed64 & operator-=(Fixed64 f)
Minus decrement.
Definition: fixed64.hpp:38
double to_d() const
Construct from double.
Definition: fixed64.hpp:32
The namespace for this project.
Definition: abc_nodesel.hpp:20
A 64-bit fixed precision number type "implemented" as a wrapper to CCbigguy.
Definition: fixed64.hpp:21