Logo Search packages:      
Sourcecode: libqalculate version File versions  Download package

Number Class Reference

#include <Number.h>

List of all members.

Detailed Description

A number.

Can be rational, floating point, complex or infinite. Has arbitrary precision (uses Calculator::precision()) and infinitely large rational numbers. Implimented using CLN numbers.

Definition at line 32 of file Number.h.

Public Member Functions

bool abs ()
bool acos ()
bool acosh ()
bool add (const Number &o, MathOperation op)
bool add (const Number &o)
bool asin ()
bool asinh ()
bool atan ()
bool atanh ()
bool binomial (const Number &m, const Number &k)
bool bitAnd (const Number &o)
bool bitEqv (const Number &o)
bool bitNot ()
bool bitOr (const Number &o)
bool bitXor (const Number &o)
void catalan ()
bool ceil ()
bool ceil (const Number &o)
void clear ()
ComparisonResult compare (const Number &o) const
ComparisonResult compareApproximately (const Number &o, int prec=EQUALS_PRECISION_LOWEST) const
ComparisonResult compareImaginaryParts (const Number &o) const
ComparisonResult compareRealParts (const Number &o) const
Number complexDenominator () const
Number complexNumerator () const
bool cos ()
bool cosh ()
Number denominator () const
bool denominatorIsEven () const
bool denominatorIsTwo () const
bool divide (const Number &o)
bool doubleFactorial ()
void e ()
bool equals (const Number &o) const
bool equalsApproximately (const Number &o, int prec) const
bool equalsZero () const
void euler ()
bool exp ()
bool exp10 ()
bool exp10 (const Number &o)
bool exp2 ()
bool exp2 (const Number &o)
bool factorial ()
double floatValue () const
bool floor ()
bool floor (const Number &o)
bool frac ()
bool gcd (const Number &o)
int getBoolean () const
bool hasImaginaryPart () const
bool hasNegativeSign () const
bool hasPositiveSign () const
bool hasRealPart () const
Number imaginaryPart () const
bool imaginaryPartIsNegative () const
bool imaginaryPartIsPositive () const
Number integer () const
int integerLength () const
const cln::cl_N & internalNumber () const
int intValue (bool *overflow=NULL) const
bool iquo (const Number &o, Number &r)
bool iquo (const Number &o)
bool irem (const Number &o, Number &q)
bool irem (const Number &o)
bool isApproximate () const
bool isApproximateType () const
bool isComplex () const
bool isEven () const
bool isFraction () const
bool isGreaterThan (const Number &o) const
bool isGreaterThanOrEqualTo (const Number &o) const
bool isI () const
bool isInfinite () const
bool isInfinity () const
bool isInteger () const
bool isLessThan (const Number &o) const
bool isLessThanOrEqualTo (const Number &o) const
bool isMinusI () const
bool isMinusInfinity () const
bool isMinusOne () const
bool isNegative () const
bool isNonNegative () const
bool isNonPositive () const
bool isOdd () const
bool isOne () const
bool isPlusInfinity () const
bool isPositive () const
bool isqrt ()
bool isRational () const
bool isReal () const
bool isTwo () const
bool isUndefined () const
bool isZero () const
bool lcm (const Number &o)
bool ln ()
bool log (const Number &o)
bool mod (const Number &o)
bool multiFactorial (const Number &o)
bool multiply (const Number &o)
bool negate ()
 Number (const Number &o)
 Number (int numerator, int denominator=1, int exp_10=0)
 Number (string number, const ParseOptions &po=default_parse_options)
 Number ()
Number numerator () const
bool numeratorIsEven () const
bool numeratorIsMinusOne () const
bool numeratorIsOne () const
Number operator && (const Number &o) const
Number operator! () const
bool operator!= (const Number &o) const
Number operator* (const Number &o) const
void operator*= (const Number &o)
Number operator+ (const Number &o) const
void operator++ (int)
void operator+= (const Number &o)
Number operator- (const Number &o) const
Number operator- () const
void operator-- (int)
void operator-= (const Number &o)
Number operator/ (const Number &o) const
void operator/= (const Number &o)
void operator= (const Number &o)
bool operator== (const Number &o) const
Number operator^ (const Number &o) const
void operator^= (const Number &o)
Number operator|| (const Number &o) const
void pi ()
int precision () const
string print (const PrintOptions &po=default_print_options, const InternalPrintStruct &ips=top_ips) const
string printDenominator (int base=10, bool display_sign=true, BaseDisplay base_display=BASE_DISPLAY_NORMAL, bool lower_case=false) const
string printImaginaryDenominator (int base=10, bool display_sign=true, BaseDisplay base_display=BASE_DISPLAY_NORMAL, bool lower_case=false) const
string printImaginaryNumerator (int base=10, bool display_sign=true, BaseDisplay base_display=BASE_DISPLAY_NORMAL, bool lower_case=false) const
string printNumerator (int base=10, bool display_sign=true, BaseDisplay base_display=BASE_DISPLAY_NORMAL, bool lower_case=false) const
bool raise (const Number &o, bool try_exact=true)
Number realPart () const
bool realPartIsNegative () const
bool realPartIsPositive () const
bool recip ()
bool rem (const Number &o)
bool round ()
bool round (const Number &o)
void set (const Number &o)
void set (int numerator, int denominator=1, int exp_10=0)
void set (string number, const ParseOptions &po=default_parse_options)
void setApproximate (bool is_approximate=true)
void setFalse ()
void setFloat (double d_value)
void setImaginaryPart (int numerator, int denominator=1, int exp_10=0)
void setImaginaryPart (const Number &o)
void setInfinity ()
void setInternal (const cln::cl_N &cln_value)
void setLogicalNot ()
void setMinusInfinity ()
void setNegative (bool is_negative)
void setPlusInfinity ()
void setPrecision (int prec)
void setTrue (bool is_true=true)
bool shift (const Number &o)
bool shiftLeft (const Number &o)
bool shiftRight (const Number &o)
bool signum ()
bool sin ()
bool sinh ()
bool smod (const Number &o)
bool square ()
bool subtract (const Number &o)
bool tan ()
bool tanh ()
void toBoolean ()
bool trunc ()
bool trunc (const Number &o)
bool zeta ()

Protected Member Functions

void removeFloatZeroPart ()
void setPrecisionAndApproximateFrom (const Number &o)
void testApproximate ()
void testInteger ()

Protected Attributes

bool b_approx
bool b_inf
bool b_minf
bool b_pinf
int i_precision
cln::cl_N value

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

Generated by  Doxygen 1.6.0   Back to index