Variable.h File Reference
`#include <libqalculate/ExpressionItem.h>`
`#include <libqalculate/includes.h>`

## Classes

class | Assumptions
| An assumption about an unknown mathematical value. More...
class | Variable
| Abstract base class for variables. More...
class | UnknownVariable
| A variable with unknown value. More...
class | KnownVariable
| A variable with a known value. More...
class | DynamicVariable
| Abstract base class for variables with a value which is recalculated when the precision has changed. More...
class | PrecisionVariable
| Dynamic variable for Pi. More...
class | TodayVariable
class | TomorrowVariable
class | YesterdayVariable
class | NowVariable
class | UptimeVariable

## Macros

#define | DECLARE_BUILTIN_VARIABLE(x, i)

## Enumerations

enum | AssumptionType { ASSUMPTION_TYPE_NONE = 0 , ASSUMPTION_TYPE_NONMATRIX = 1 , ASSUMPTION_TYPE_NUMBER = 2 , ASSUMPTION_TYPE_COMPLEX = 3 , ASSUMPTION_TYPE_REAL = 4 , ASSUMPTION_TYPE_RATIONAL = 5 , ASSUMPTION_TYPE_INTEGER = 6 , ASSUMPTION_TYPE_BOOLEAN = 7 }
| Type assumption. More...
enum | AssumptionSign { ASSUMPTION_SIGN_UNKNOWN , ASSUMPTION_SIGN_POSITIVE , ASSUMPTION_SIGN_NONNEGATIVE , ASSUMPTION_SIGN_NEGATIVE , ASSUMPTION_SIGN_NONPOSITIVE , ASSUMPTION_SIGN_NONZERO }
| Signedness assumption. More...
enum | VariableSubtype { SUBTYPE_VARIABLE , SUBTYPE_UNKNOWN_VARIABLE , SUBTYPE_KNOWN_VARIABLE }
| Type of variable. More...
enum | { VARIABLE_ID_E = 100 , VARIABLE_ID_PI = 101 , VARIABLE_ID_EULER = 102 , VARIABLE_ID_CATALAN = 103 , VARIABLE_ID_PRECISION = 140 , VARIABLE_ID_TODAY = 161 , VARIABLE_ID_TOMORROW = 162 , VARIABLE_ID_YESTERDAY = 163 , VARIABLE_ID_NOW = 164 , VARIABLE_ID_UPTIME = 170 }

## Macro Definition Documentation

## DECLARE_BUILTIN_VARIABLE

#define DECLARE_BUILTIN_VARIABLE | ( |  | x,
|  |  | i )

Value:
class x : public DynamicVariable { \
private: \
void calculate(MathStructure &m) const; \
public: \
x(); \
x(const x *variable) {set(variable);} \
ExpressionItem *copy() const {return new x(this);} \
int id() const {return i;} \
};
DynamicVariable
Abstract base class for variables with a value which is recalculated when the precision has changed.
Definition Variable.h:356
ExpressionItem
Abstract base class for functions, variables and units.
Definition ExpressionItem.h:87
MathStructure
A structure representing a mathematical value/expression/result.
Definition MathStructure.h:150

## Enumeration Type Documentation

## AssumptionSign

enum AssumptionSign

Signedness assumption.

Enumerator
ASSUMPTION_SIGN_UNKNOWN | x = ?
ASSUMPTION_SIGN_POSITIVE | x > 0
ASSUMPTION_SIGN_NONNEGATIVE | x >= 0
ASSUMPTION_SIGN_NEGATIVE | x < 0
ASSUMPTION_SIGN_NONPOSITIVE | x <= 0
ASSUMPTION_SIGN_NONZERO | x != 0

## AssumptionType

enum AssumptionType

Type assumption.

Each type is a subset of the type above.

Enumerator
ASSUMPTION_TYPE_NONE | Multiplication is NOT commutative; do not use.
ASSUMPTION_TYPE_COMPLEX | im(x) != 0

## VariableSubtype

enum VariableSubtype

Type of variable.

Enumerator
SUBTYPE_VARIABLE | class Variable
SUBTYPE_UNKNOWN_VARIABLE | class UnknownVariable
SUBTYPE_KNOWN_VARIABLE | class KnownVariable