GEOS  3.9.1dev
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
geos::math::DD Class Reference

Wrapper for DoubleDouble higher precision mathematics operations. More...

#include <DD.h>

Public Member Functions

 DD (double p_hi, double p_lo)
 
 DD (double x)
 
 DD ()
 
bool operator== (const DD &rhs) const
 
bool operator!= (const DD &rhs) const
 
bool operator< (const DD &rhs) const
 
bool operator<= (const DD &rhs) const
 
bool operator> (const DD &rhs) const
 
bool operator>= (const DD &rhs) const
 
bool isNaN () const
 
bool isNegative () const
 
bool isPositive () const
 
bool isZero () const
 
double doubleValue () const
 
double ToDouble () const
 
int intValue () const
 
DD negate () const
 
DD reciprocal () const
 
DD floor () const
 
DD ceil () const
 
void selfAdd (const DD &d)
 
void selfAdd (double p_hi, double p_lo)
 
void selfAdd (double y)
 
void selfSubtract (const DD &d)
 
void selfSubtract (double p_hi, double p_lo)
 
void selfSubtract (double y)
 
void selfMultiply (double p_hi, double p_lo)
 
void selfMultiply (const DD &d)
 
void selfMultiply (double y)
 
void selfDivide (double p_hi, double p_lo)
 
void selfDivide (const DD &d)
 
void selfDivide (double y)
 

Static Public Member Functions

static DD determinant (const DD &x1, const DD &y1, const DD &x2, const DD &y2)
 
static DD determinant (double x1, double y1, double x2, double y2)
 
static DD abs (const DD &d)
 
static DD pow (const DD &d, int exp)
 
static DD trunc (const DD &d)
 

Private Member Functions

int signum () const
 
DD rint () const
 

Private Attributes

double hi
 
double lo
 

Static Private Attributes

static constexpr double SPLIT = 134217729.0
 

Friends

DD operator+ (const DD &lhs, const DD &rhs)
 
DD operator+ (const DD &lhs, double rhs)
 
DD operator- (const DD &lhs, const DD &rhs)
 
DD operator- (const DD &lhs, double rhs)
 
DD operator* (const DD &lhs, const DD &rhs)
 
DD operator* (const DD &lhs, double rhs)
 
DD operator/ (const DD &lhs, const DD &rhs)
 
DD operator/ (const DD &lhs, double rhs)
 

Detailed Description

Wrapper for DoubleDouble higher precision mathematics operations.

Definition at line 108 of file DD.h.

Constructor & Destructor Documentation

geos::math::DD::DD ( double  p_hi,
double  p_lo 
)
inline

Definition at line 119 of file DD.h.

geos::math::DD::DD ( double  x)
inline

Definition at line 120 of file DD.h.

geos::math::DD::DD ( )
inline

Definition at line 121 of file DD.h.

Member Function Documentation

static DD geos::math::DD::abs ( const DD d)
static
DD geos::math::DD::ceil ( ) const
static DD geos::math::DD::determinant ( const DD x1,
const DD y1,
const DD x2,
const DD y2 
)
static
static DD geos::math::DD::determinant ( double  x1,
double  y1,
double  x2,
double  y2 
)
static
double geos::math::DD::doubleValue ( ) const
DD geos::math::DD::floor ( ) const
int geos::math::DD::intValue ( ) const
bool geos::math::DD::isNaN ( ) const
bool geos::math::DD::isNegative ( ) const
bool geos::math::DD::isPositive ( ) const
bool geos::math::DD::isZero ( ) const
DD geos::math::DD::negate ( ) const
bool geos::math::DD::operator!= ( const DD rhs) const
inline

Definition at line 128 of file DD.h.

References hi, and lo.

bool geos::math::DD::operator< ( const DD rhs) const
inline

Definition at line 133 of file DD.h.

References hi, and lo.

bool geos::math::DD::operator<= ( const DD rhs) const
inline

Definition at line 138 of file DD.h.

References hi, and lo.

bool geos::math::DD::operator== ( const DD rhs) const
inline

Definition at line 123 of file DD.h.

References hi, and lo.

bool geos::math::DD::operator> ( const DD rhs) const
inline

Definition at line 143 of file DD.h.

References hi, and lo.

bool geos::math::DD::operator>= ( const DD rhs) const
inline

Definition at line 148 of file DD.h.

References GEOS_DLL, hi, and lo.

static DD geos::math::DD::pow ( const DD d,
int  exp 
)
static
DD geos::math::DD::reciprocal ( ) const
DD geos::math::DD::rint ( ) const
private
void geos::math::DD::selfAdd ( const DD d)
void geos::math::DD::selfAdd ( double  p_hi,
double  p_lo 
)
void geos::math::DD::selfAdd ( double  y)
void geos::math::DD::selfDivide ( double  p_hi,
double  p_lo 
)
void geos::math::DD::selfDivide ( const DD d)
void geos::math::DD::selfDivide ( double  y)
void geos::math::DD::selfMultiply ( double  p_hi,
double  p_lo 
)
void geos::math::DD::selfMultiply ( const DD d)
void geos::math::DD::selfMultiply ( double  y)
void geos::math::DD::selfSubtract ( const DD d)
void geos::math::DD::selfSubtract ( double  p_hi,
double  p_lo 
)
void geos::math::DD::selfSubtract ( double  y)
int geos::math::DD::signum ( ) const
private
double geos::math::DD::ToDouble ( ) const
inline

Definition at line 173 of file DD.h.

static DD geos::math::DD::trunc ( const DD d)
static

Friends And Related Function Documentation

DD operator* ( const DD lhs,
const DD rhs 
)
friend
DD operator* ( const DD lhs,
double  rhs 
)
friend
DD operator+ ( const DD lhs,
const DD rhs 
)
friend
DD operator+ ( const DD lhs,
double  rhs 
)
friend
DD operator- ( const DD lhs,
const DD rhs 
)
friend
DD operator- ( const DD lhs,
double  rhs 
)
friend
DD operator/ ( const DD lhs,
const DD rhs 
)
friend
DD operator/ ( const DD lhs,
double  rhs 
)
friend

Member Data Documentation

double geos::math::DD::hi
private

Definition at line 111 of file DD.h.

Referenced by operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().

double geos::math::DD::lo
private

Definition at line 112 of file DD.h.

Referenced by operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().

constexpr double geos::math::DD::SPLIT = 134217729.0
staticprivate

Definition at line 110 of file DD.h.


The documentation for this class was generated from the following file: