Class Number

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class SymEngine::Number : public SymEngine::Basic

Subclassed by SymEngine::ComplexBase, SymEngine::Infty, SymEngine::Integer, SymEngine::NaN, SymEngine::NumberWrapper, SymEngine::Rational, SymEngine::RealDouble, SymEngine::RealMPFR, SymEngine::SeriesCoeffInterface

Public Functions

bool is_zero() const = 0

Return

true if 0

bool is_one() const = 0

Return

true if 1

bool is_minus_one() const = 0

Return

true if -1

bool is_negative() const = 0

Return

true if negative

bool is_positive() const = 0

Return

true if positive

bool is_complex() const = 0

Return

true if a complex number

RCP<const Basic> conjugate() const

Return

the conjugate if the class is complex

bool is_exact() const

return true if the number is an exact representation

bool is_exact_zero() const

Return

true if the number is equal to 0 and not an approximation

Evaluate &get_eval() const

Get Evaluate singleton to evaluate numerically.

RCP<const Number> add(const Number &other) const = 0

Addition.

RCP<const Number> sub(const Number &other) const

Subtraction.

RCP<const Number> rsub(const Number &other) const
RCP<const Number> mul(const Number &other) const = 0

Multiplication.

RCP<const Number> div(const Number &other) const

Division.

RCP<const Number> rdiv(const Number &other) const
RCP<const Number> pow(const Number &other) const = 0

Power.

RCP<const Number> rpow(const Number &other) const = 0
vec_basic get_args() const

Returns the list of arguments.

bool is_perfect_power(bool is_expected = false) const
bool nth_root(const Ptr<RCP<const Number>>&, unsigned long n) const