45#ifndef CUSTOM_PRECISION_DOUBLE_H
46#define CUSTOM_PRECISION_DOUBLE_H
60 #define PDOUBLE_DEFAULT_PRECISION (1.0e-17)
77 PDouble(
const long double input = 0.0,
const long double precision = PDOUBLE_DEFAULT_PRECISION );
130 operator int()
const;
136 operator float()
const;
142 operator double()
const;
148 operator long double()
const;
325 inline PDouble::operator double()
const {
326 return( (
double) value) ;
330 inline PDouble::operator int()
const {
331 return( (
int) value );
335 inline PDouble::operator float()
const {
336 return( (
float) value );
340 inline PDouble::operator
long double()
const {
341 return( (
long double) value );
406 if ( &left == &right ) {
return true; }
412 if ( &left == &right ) {
return false; }
418 if ( left == right )
return false;
424 if ( left == right )
return false;
430 if ( left == right )
return true;
436 if ( left == right )
return true;
441 inline ::std::ostream&
operator<<( ::std::ostream& os,
const PDouble& instance ) {
442 os << instance.
value;
447 inline ::std::istream& operator>>( ::std::istream& is, PDouble& instance ) {
448 is >> instance.value;
bool operator!=(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.h:846
std::ostream & operator<<(std::ostream &os, const Altimetry &instance)
Definition altimetry-definitions.h:826
Altimetry & operator*=(Altimetry &left, double right)
Definition altimetry-definitions.cpp:367
const Altimetry operator/(const Altimetry &left, const double right)
Definition altimetry-definitions.cpp:285
bool operator==(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.h:840
Altimetry & operator+=(Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:327
const Altimetry operator+(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:257
const Altimetry operator*(const Altimetry &left, const double right)
Definition altimetry-definitions.cpp:292
Altimetry & operator-=(Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:335
const Altimetry operator-(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:264
Altimetry & operator/=(Altimetry &left, double right)
Definition altimetry-definitions.cpp:359
Custom precision long double class.
Definition custom-precision-double.h:67
long double getPrecision() const
Definition custom-precision-double.h:109
friend bool operator<=(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:435
long double precision
Definition custom-precision-double.h:311
void setPrecision(double value)
Definition custom-precision-double.h:102
friend bool operator!=(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:411
friend PDouble & operator-=(PDouble &left, const PDouble &right)
Definition custom-precision-double.h:377
friend::std::istream & operator>>(::std::istream &is, PDouble &instance)
friend const PDouble operator*(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:360
friend const PDouble operator-(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:350
friend const PDouble operator+(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:345
~PDouble()
Definition custom-precision-double.cpp:62
friend bool operator==(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:405
friend bool operator>=(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:429
friend PDouble & operator*=(PDouble &left, const PDouble &right)
Definition custom-precision-double.h:391
friend bool operator<(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:423
long double value
Definition custom-precision-double.h:306
friend::std::ostream & operator<<(::std::ostream &os, const PDouble &instance)
friend PDouble & operator%=(PDouble &left, const PDouble &right)
Definition custom-precision-double.h:398
PDouble & operator=(const PDouble ©)
Definition custom-precision-double.cpp:68
friend const PDouble operator/(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:355
friend PDouble & operator/=(PDouble &left, const PDouble &right)
Definition custom-precision-double.h:384
friend PDouble & operator+=(PDouble &left, const PDouble &right)
Definition custom-precision-double.h:370
static void setDebug(bool flag)
Definition custom-precision-double.h:96
long double getValue() const
Definition custom-precision-double.h:115
static bool debug
Definition custom-precision-double.h:317
friend bool operator>(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:417
friend const PDouble operator%(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:365
bool operator<=(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:928
bool operator>=(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:922
bool operator<(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:916
bool operator>(const Coord &left, const Coord &right)
Definition coordinates-definitions.h:910
const PDouble operator%(const PDouble &left, const PDouble &right)
Definition custom-precision-double.h:365
PDouble & operator%=(PDouble &left, const PDouble &right)
Definition custom-precision-double.h:398