SMTStabilizer API
Public API documentation for SMTStabilizer
Loading...
Searching...
No Matches
stabilizer::parser::Number Class Reference

#include <number.h>

Collaboration diagram for stabilizer::parser::Number:

Public Types

enum  Type { INT_TYPE , REAL_TYPE , UNKNOWN_TYPE }
 

Public Member Functions

 Number ()
 
 Number (const HighPrecisionInteger &i)
 
 Number (const HighPrecisionReal &r)
 
 Number (int i)
 
 Number (double d, bool asInteger=false)
 
 Number (const std::string &s, bool asInteger=false)
 
 Number (const Number &other)
 
Numberoperator= (const Number &other)
 
 ~Number ()
 
bool isInteger () const
 
bool isReal () const
 
bool isUnknown () const
 
Type getType () const
 
const HighPrecisionIntegergetInteger () const
 
const HighPrecisionRealgetReal () const
 
HighPrecisionInteger toInteger () const
 
HighPrecisionReal toReal (mpfr_prec_t precision=128) const
 
bool isZero () const
 
bool isOne () const
 
bool isInfinity () const
 
bool isNegativeInfinity () const
 
bool isPositiveInfinity () const
 
Number operator+ (const Number &other) const
 
Number operator- (const Number &other) const
 
Number operator- () const
 
Number operator* (const Number &other) const
 
Number operator/ (const Number &other) const
 
Number operator% (const Number &other) const
 
Numberoperator+= (const Number &other)
 
Numberoperator-= (const Number &other)
 
Numberoperator*= (const Number &other)
 
Numberoperator/= (const Number &other)
 
Numberoperator%= (const Number &other)
 
bool operator== (const Number &other) const
 
bool operator!= (const Number &other) const
 
bool operator< (const Number &other) const
 
bool operator<= (const Number &other) const
 
bool operator> (const Number &other) const
 
bool operator>= (const Number &other) const
 
Numberoperator++ ()
 
Number operator++ (int)
 
Numberoperator-- ()
 
Number operator-- (int)
 
Number operator& (const Number &other) const
 
Number operator| (const Number &other) const
 
Number operator^ (const Number &other) const
 
Number operator~ () const
 
Number operator<< (unsigned long bits) const
 
Number operator>> (unsigned long bits) const
 
std::string toString () const
 
Number abs () const
 
Number sqrt () const
 
Number safeSqrt () const
 
Number pow (const Number &exp) const
 
Number ceil () const
 
Number floor () const
 
Number round () const
 
Number exp () const
 
Number ln () const
 
Number lg () const
 
Number lb () const
 
Number log (const Number &base) const
 
Number sin () const
 
Number cos () const
 
Number tan () const
 
Number cot () const
 
Number sec () const
 
Number csc () const
 
Number asin () const
 
Number acos () const
 
Number atan () const
 
Number acot () const
 
Number asec () const
 
Number acsc () const
 
Number sinh () const
 
Number cosh () const
 
Number tanh () const
 
Number coth () const
 
Number sech () const
 
Number csch () const
 
Number asinh () const
 
Number acosh () const
 
Number atanh () const
 
Number acoth () const
 
Number asech () const
 
Number acsch () const
 
Number nextBelow () const
 
Number nextAbove () const
 
bool isNaN () const
 

Static Public Member Functions

static Number pi (size_t precision=128)
 
static Number e (size_t precision=128)
 
static Number phi (size_t precision=128)
 
static Number ln2 (size_t precision=128)
 
static Number ln10 (size_t precision=128)
 
static Number log2_e (size_t precision=128)
 
static Number log10_e (size_t precision=128)
 
static Number epsilon (size_t precision=128)
 
static Number zero ()
 
static Number one ()
 
static Number infinity ()
 
static Number negativeInfinity ()
 
static Number positiveInfinity ()
 
static Number atan2 (const Number &y, const Number &x)
 

Static Public Attributes

static Number ZERO
 
static Number ONE
 
static Number INF
 

Private Attributes

Type type
 
HighPrecisionInteger intValue
 
HighPrecisionReal realValue
 

Detailed Description

Definition at line 273 of file number.h.

Member Enumeration Documentation

◆ Type

Enumerator
INT_TYPE 
REAL_TYPE 
UNKNOWN_TYPE 

Definition at line 276 of file number.h.

Constructor & Destructor Documentation

◆ Number() [1/7]

◆ Number() [2/7]

stabilizer::parser::Number::Number ( const HighPrecisionInteger i)

Definition at line 1096 of file number.cpp.

◆ Number() [3/7]

stabilizer::parser::Number::Number ( const HighPrecisionReal r)

Definition at line 1098 of file number.cpp.

◆ Number() [4/7]

stabilizer::parser::Number::Number ( int  i)

Definition at line 1100 of file number.cpp.

◆ Number() [5/7]

stabilizer::parser::Number::Number ( double  d,
bool  asInteger = false 
)

Definition at line 1102 of file number.cpp.

References INT_TYPE, intValue, REAL_TYPE, realValue, and type.

◆ Number() [6/7]

stabilizer::parser::Number::Number ( const std::string &  s,
bool  asInteger = false 
)

Definition at line 1113 of file number.cpp.

References INT_TYPE, intValue, REAL_TYPE, realValue, and type.

◆ Number() [7/7]

stabilizer::parser::Number::Number ( const Number other)

Definition at line 1124 of file number.cpp.

References INT_TYPE, intValue, realValue, and type.

◆ ~Number()

stabilizer::parser::Number::~Number ( )

Definition at line 1148 of file number.cpp.

Member Function Documentation

◆ abs()

◆ acos()

Number stabilizer::parser::Number::acos ( ) const

◆ acosh()

Number stabilizer::parser::Number::acosh ( ) const

◆ acot()

Number stabilizer::parser::Number::acot ( ) const

◆ acoth()

Number stabilizer::parser::Number::acoth ( ) const

◆ acsc()

Number stabilizer::parser::Number::acsc ( ) const

◆ acsch()

Number stabilizer::parser::Number::acsch ( ) const

◆ asec()

Number stabilizer::parser::Number::asec ( ) const

◆ asech()

Number stabilizer::parser::Number::asech ( ) const

◆ asin()

Number stabilizer::parser::Number::asin ( ) const

◆ asinh()

Number stabilizer::parser::Number::asinh ( ) const

◆ atan()

◆ atan2()

Number stabilizer::parser::Number::atan2 ( const Number y,
const Number x 
)
static

◆ atanh()

Number stabilizer::parser::Number::atanh ( ) const

◆ ceil()

◆ cos()

Number stabilizer::parser::Number::cos ( ) const

◆ cosh()

Number stabilizer::parser::Number::cosh ( ) const

◆ cot()

Number stabilizer::parser::Number::cot ( ) const

◆ coth()

Number stabilizer::parser::Number::coth ( ) const

◆ csc()

Number stabilizer::parser::Number::csc ( ) const

◆ csch()

Number stabilizer::parser::Number::csch ( ) const

◆ e()

Number stabilizer::parser::Number::e ( size_t  precision = 128)
static

Definition at line 1238 of file number.cpp.

References stabilizer::parser::HighPrecisionReal::e(), and Number().

◆ epsilon()

Number stabilizer::parser::Number::epsilon ( size_t  precision = 128)
static

Definition at line 1256 of file number.cpp.

References stabilizer::parser::HighPrecisionReal::epsilon(), and Number().

◆ exp()

Number stabilizer::parser::Number::exp ( ) const

◆ floor()

◆ getInteger()

const HighPrecisionInteger & stabilizer::parser::Number::getInteger ( ) const

Definition at line 1154 of file number.cpp.

References INT_TYPE, intValue, and type.

◆ getReal()

const HighPrecisionReal & stabilizer::parser::Number::getReal ( ) const

Definition at line 1161 of file number.cpp.

References REAL_TYPE, realValue, and type.

Referenced by isInteger().

◆ getType()

Type stabilizer::parser::Number::getType ( ) const
inline

Definition at line 317 of file number.h.

References type.

◆ infinity()

Number stabilizer::parser::Number::infinity ( )
static

Definition at line 1189 of file number.cpp.

References stabilizer::parser::HighPrecisionReal::getMPFR(), and realValue.

◆ isInfinity()

◆ isInteger()

◆ isNaN()

bool stabilizer::parser::Number::isNaN ( ) const

◆ isNegativeInfinity()

bool stabilizer::parser::Number::isNegativeInfinity ( ) const

◆ isOne()

bool stabilizer::parser::Number::isOne ( ) const

Definition at line 1210 of file number.cpp.

References INT_TYPE, intValue, realValue, and type.

◆ isPositiveInfinity()

◆ isReal()

bool stabilizer::parser::Number::isReal ( ) const
inline

Definition at line 315 of file number.h.

References REAL_TYPE, and type.

Referenced by isInteger().

◆ isUnknown()

bool stabilizer::parser::Number::isUnknown ( ) const
inline

Definition at line 316 of file number.h.

References type, and UNKNOWN_TYPE.

◆ isZero()

bool stabilizer::parser::Number::isZero ( ) const

Definition at line 1204 of file number.cpp.

References INT_TYPE, intValue, realValue, and type.

◆ lb()

Number stabilizer::parser::Number::lb ( ) const

◆ lg()

Number stabilizer::parser::Number::lg ( ) const

◆ ln()

Number stabilizer::parser::Number::ln ( ) const

◆ ln10()

Number stabilizer::parser::Number::ln10 ( size_t  precision = 128)
static

Definition at line 1247 of file number.cpp.

References stabilizer::parser::HighPrecisionReal::ln10(), and Number().

◆ ln2()

Number stabilizer::parser::Number::ln2 ( size_t  precision = 128)
static

Definition at line 1244 of file number.cpp.

References stabilizer::parser::HighPrecisionReal::ln2(), and Number().

◆ log()

Number stabilizer::parser::Number::log ( const Number base) const

◆ log10_e()

Number stabilizer::parser::Number::log10_e ( size_t  precision = 128)
static

Definition at line 1253 of file number.cpp.

References stabilizer::parser::HighPrecisionReal::log10_e(), and Number().

◆ log2_e()

Number stabilizer::parser::Number::log2_e ( size_t  precision = 128)
static

Definition at line 1250 of file number.cpp.

References stabilizer::parser::HighPrecisionReal::log2_e(), and Number().

◆ negativeInfinity()

◆ nextAbove()

◆ nextBelow()

◆ one()

Number stabilizer::parser::Number::one ( )
static

Definition at line 1188 of file number.cpp.

References Number().

◆ operator!=()

bool stabilizer::parser::Number::operator!= ( const Number other) const

Definition at line 1400 of file number.cpp.

◆ operator%()

Number stabilizer::parser::Number::operator% ( const Number other) const

Definition at line 1304 of file number.cpp.

References condAssert, INT_TYPE, intValue, Number(), and type.

◆ operator%=()

Number & stabilizer::parser::Number::operator%= ( const Number other)

Definition at line 1350 of file number.cpp.

References condAssert, INT_TYPE, intValue, and type.

◆ operator&()

Number stabilizer::parser::Number::operator& ( const Number other) const

◆ operator*()

Number stabilizer::parser::Number::operator* ( const Number other) const

Definition at line 1284 of file number.cpp.

References INT_TYPE, intValue, Number(), toReal(), and type.

◆ operator*=()

Number & stabilizer::parser::Number::operator*= ( const Number other)

Definition at line 1330 of file number.cpp.

References INT_TYPE, intValue, realValue, toReal(), and type.

◆ operator+()

Number stabilizer::parser::Number::operator+ ( const Number other) const

Definition at line 1261 of file number.cpp.

References INT_TYPE, intValue, Number(), toReal(), and type.

◆ operator++() [1/2]

Number & stabilizer::parser::Number::operator++ ( )

Definition at line 1357 of file number.cpp.

References INT_TYPE, intValue, realValue, and type.

Referenced by operator++().

◆ operator++() [2/2]

Number stabilizer::parser::Number::operator++ ( int  )

Definition at line 1366 of file number.cpp.

References operator++().

◆ operator+=()

Number & stabilizer::parser::Number::operator+= ( const Number other)

Definition at line 1310 of file number.cpp.

References INT_TYPE, intValue, realValue, toReal(), and type.

◆ operator-() [1/2]

Number stabilizer::parser::Number::operator- ( ) const

Definition at line 1277 of file number.cpp.

References INT_TYPE, intValue, Number(), realValue, and type.

◆ operator-() [2/2]

Number stabilizer::parser::Number::operator- ( const Number other) const

Definition at line 1270 of file number.cpp.

References INT_TYPE, intValue, Number(), toReal(), and type.

◆ operator--() [1/2]

Number & stabilizer::parser::Number::operator-- ( )

Definition at line 1371 of file number.cpp.

References INT_TYPE, intValue, realValue, and type.

Referenced by operator--().

◆ operator--() [2/2]

Number stabilizer::parser::Number::operator-- ( int  )

Definition at line 1380 of file number.cpp.

References operator--().

◆ operator-=()

Number & stabilizer::parser::Number::operator-= ( const Number other)

Definition at line 1320 of file number.cpp.

References INT_TYPE, intValue, realValue, toReal(), and type.

◆ operator/()

Number stabilizer::parser::Number::operator/ ( const Number other) const

Definition at line 1291 of file number.cpp.

References INT_TYPE, intValue, Number(), toReal(), and type.

◆ operator/=()

Number & stabilizer::parser::Number::operator/= ( const Number other)

Definition at line 1340 of file number.cpp.

References INT_TYPE, intValue, realValue, toReal(), and type.

◆ operator<()

bool stabilizer::parser::Number::operator< ( const Number other) const

Definition at line 1402 of file number.cpp.

References INT_TYPE, intValue, realValue, toReal(), and type.

◆ operator<<()

Number stabilizer::parser::Number::operator<< ( unsigned long  bits) const

◆ operator<=()

bool stabilizer::parser::Number::operator<= ( const Number other) const

Definition at line 1414 of file number.cpp.

References INT_TYPE, intValue, realValue, toReal(), and type.

◆ operator=()

Number & stabilizer::parser::Number::operator= ( const Number other)

Definition at line 1134 of file number.cpp.

References INT_TYPE, intValue, realValue, and type.

◆ operator==()

bool stabilizer::parser::Number::operator== ( const Number other) const

Definition at line 1387 of file number.cpp.

References INT_TYPE, intValue, realValue, toReal(), and type.

◆ operator>()

bool stabilizer::parser::Number::operator> ( const Number other) const

Definition at line 1426 of file number.cpp.

◆ operator>=()

bool stabilizer::parser::Number::operator>= ( const Number other) const

Definition at line 1428 of file number.cpp.

◆ operator>>()

Number stabilizer::parser::Number::operator>> ( unsigned long  bits) const

◆ operator^()

Number stabilizer::parser::Number::operator^ ( const Number other) const

◆ operator|()

Number stabilizer::parser::Number::operator| ( const Number other) const

◆ operator~()

Number stabilizer::parser::Number::operator~ ( ) const

◆ phi()

Number stabilizer::parser::Number::phi ( size_t  precision = 128)
static

Definition at line 1241 of file number.cpp.

References Number(), and stabilizer::parser::HighPrecisionReal::phi().

◆ pi()

◆ positiveInfinity()

◆ pow()

◆ round()

Number stabilizer::parser::Number::round ( ) const

◆ safeSqrt()

◆ sec()

Number stabilizer::parser::Number::sec ( ) const

◆ sech()

Number stabilizer::parser::Number::sech ( ) const

◆ sin()

Number stabilizer::parser::Number::sin ( ) const

◆ sinh()

Number stabilizer::parser::Number::sinh ( ) const

◆ sqrt()

Number stabilizer::parser::Number::sqrt ( ) const

◆ tan()

Number stabilizer::parser::Number::tan ( ) const

◆ tanh()

◆ toInteger()

◆ toReal()

HighPrecisionReal stabilizer::parser::Number::toReal ( mpfr_prec_t  precision = 128) const

◆ toString()

◆ zero()

Number stabilizer::parser::Number::zero ( )
static

Definition at line 1187 of file number.cpp.

References Number().

Member Data Documentation

◆ INF

Number stabilizer::parser::Number::INF
static

Definition at line 285 of file number.h.

◆ intValue

◆ ONE

Number stabilizer::parser::Number::ONE
static

Definition at line 284 of file number.h.

◆ realValue

◆ type

◆ ZERO

Number stabilizer::parser::Number::ZERO
static

Definition at line 283 of file number.h.


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