Class NaN

Inheritance Relationships

Base Type

Class Documentation

class SymEngine::NaN : public SymEngine::Number

This serves as a place holder for numeric values that are indeterminate. Most operations on NaN, produce another NaN.

Public Functions

NaN()

Constructs NaN.

hash_t __hash__() const

Return

size of the hash

bool __eq__(const Basic &o) const

Equality comparator

Return

whether the 2 objects are equal

Parameters
  • o: - Object to be compared with

int compare(const Basic &o) const

Returns -1, 0, 1 for this < o, this == o, this > o. This method is used when you want to sort things like x+y+z into canonical order. This function assumes that o is the same type as this. Use __cmp__ if you want general comparison.

bool is_zero() const

Return

true if 0

bool is_one() const

Return

true if 1

bool is_minus_one() const

Return

true if -1

bool is_positive() const

Return

true if positive

bool is_negative() const

Return

true if negative

bool is_complex() const

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

Evaluate &get_eval() const

Get Evaluate singleton to evaluate numerically.

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

Addition.

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

Multiplication.

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

Division.

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

Power.

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