Loading...
Searching...
No Matches
nan.h
Go to the documentation of this file.
1
6#ifndef SYMENGINE_NAN_H
7#define SYMENGINE_NAN_H
8
9#include <symengine/basic.h>
10#include <symengine/number.h>
11
12namespace SymEngine
13{
14
19class NaN : public Number
20{
21public:
22 IMPLEMENT_TYPEID(SYMENGINE_NOT_A_NUMBER)
24 NaN();
25
27 hash_t __hash__() const;
28
33 bool __eq__(const Basic &o) const;
34 int compare(const Basic &o) const;
35
37 inline bool is_zero() const
38 {
39 return false;
40 }
42 inline bool is_one() const
43 {
44 return false;
45 }
47 inline bool is_minus_one() const
48 {
49 return false;
50 }
51
52 inline bool is_positive() const
53 {
54 return false;
55 }
56
57 inline bool is_negative() const
58 {
59 return false;
60 }
61
62 inline bool is_complex() const
63 {
64 return false;
65 }
67 virtual RCP<const Basic> conjugate() const;
68 inline bool is_exact() const
69 {
70 return false;
71 }
72 virtual Evaluate &get_eval() const;
73
74 RCP<const Number> add(const Number &other) const;
75 RCP<const Number> mul(const Number &other) const;
76 RCP<const Number> div(const Number &other) const;
77 RCP<const Number> pow(const Number &other) const;
78 RCP<const Number> rpow(const Number &other) const;
79};
80
81} // namespace SymEngine
82#endif
The base class for SymEngine.
#define IMPLEMENT_TYPEID(SYMENGINE_ID)
Inline members and functions.
Definition: basic.h:349
The lowest unit of symbolic representation.
Definition: basic.h:97
A class that will evaluate functions numerically.
Definition: number.h:200
bool __eq__(const Basic &o) const
Definition: nan.cpp:15
RCP< const Number > add(const Number &other) const
Addition.
Definition: nan.cpp:34
bool is_positive() const
Definition: nan.h:52
bool is_zero() const
Definition: nan.h:37
bool is_negative() const
Definition: nan.h:57
bool is_one() const
Definition: nan.h:42
hash_t __hash__() const
Definition: nan.cpp:9
RCP< const Number > pow(const Number &other) const
Power.
Definition: nan.cpp:49
bool is_exact() const
return true if the number is an exact representation
Definition: nan.h:68
virtual RCP< const Basic > conjugate() const
Definition: nan.cpp:29
NaN()
Constructs NaN.
Definition: nan.cpp:7
RCP< const Number > mul(const Number &other) const
Multiplication.
Definition: nan.cpp:39
RCP< const Number > div(const Number &other) const
Division.
Definition: nan.cpp:44
int compare(const Basic &o) const
Definition: nan.cpp:23
virtual Evaluate & get_eval() const
Get Evaluate singleton to evaluate numerically.
Definition: nan.cpp:228
bool is_complex() const
Definition: nan.h:62
bool is_minus_one() const
Definition: nan.h:47
Main namespace for SymEngine package.
Definition: add.cpp:19