20 #include "ns3/core-config.h"
21 #if !defined(INT64X64_CAIRO_H) && defined (INT64X64_USE_CAIRO) && !defined(PYTHON_SCAN)
22 #define INT64X64_CAIRO_H
43 static const uint64_t HPCAIRO_MASK_HI_BIT = (((uint64_t)1)<<63);
45 static const uint64_t HP_MASK_LO = 0xffffffffffffffffULL;
58 #define HP_MAX_64 (std::pow (2.0L, 64))
75 static const enum impl_type implementation = cairo_impl;
96 const bool negative = value < 0;
97 const long double v = negative ? -value : value;
100 long double flo = std::modf (v, &fhi);
109 const long double round = 0.5;
110 flo = flo * HP_MAX_64 + round;
113 if (flo >= HP_MAX_64)
155 inline int64x64_t (
const unsigned long long int v)
167 explicit inline int64x64_t (
const int64_t hi,
const uint64_t lo)
196 inline double GetDouble (
void)
const
200 const long double fhi = value.
hi;
201 const long double flo = value.
lo / HP_MAX_64;
202 long double retval = fhi;
204 retval = negative ? -retval : retval;
212 inline int64_t GetHigh (
void)
const
214 return (int64_t)_v.hi;
221 inline uint64_t GetLow (
void)
const
301 static cairo_uint128_t Umul (
const cairo_uint128_t a,
const cairo_uint128_t b);
309 static cairo_uint128_t Udiv (
const cairo_uint128_t a,
const cairo_uint128_t b);
319 static cairo_uint128_t UmulByInvert (
const cairo_uint128_t a,
const cairo_uint128_t b);
High precision numerical type, implementing Q64.64 fixed precision.
bool operator>(const Time &lhs, const Time &rhs)
int I _cairo_int128_lt(cairo_int128_t a, cairo_int128_t b)
Time & operator+=(Time &lhs, const Time &rhs)
TracedValue< T > & operator/=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
int64x64_t operator+(const int64x64_t &lhs, const int64x64_t &rhs)
Addition operator.
#define _cairo_int128_eq(a, b)
TracedValue< T > operator!(const TracedValue< T > &lhs)
Unary arithmetic operator for TracedValue.
int64x64_t operator-(const int64x64_t &lhs, const int64x64_t &rhs)
Subtraction operator.
Time & operator-=(Time &lhs, const Time &rhs)
#define _cairo_int128_sub(a, b)
#define _cairo_int128_negative(a)
bool operator==(const BleAccessAddress &a, const BleAccessAddress &b)
TracedValue< T > & operator*=(TracedValue< T > &lhs, const U &rhs)
Operator assignment for TracedValue.
bool operator<(const BleAccessAddress &a, const BleAccessAddress &b)
#define _cairo_int128_gt(a, b)
Declaration of the cairo_x functions which implement high precision arithmetic.
#define _cairo_int128_negate(a)
#define _cairo_int128_add(a, b)