amath  1.8.5
Simple command line calculator
Number Struct Referenceabstract

#include <numb.h>

Inheritance diagram for Number:

Public Member Functions

 Number (NumberSystem system)
 
virtual ~Number ()
 
virtual NumberClone ()=0
 
virtual int GetIntegerValue ()=0
 
virtual double GetRealValue ()=0
 
virtual bool PureComplexValue ()=0
 
virtual int GetPrecedence ()=0
 
virtual int GetDefaultPrecedence ()=0
 
virtual bool IsNegative ()=0
 
virtual bool IsZero ()=0
 
virtual bool IsNaN ()=0
 
virtual bool IsInfinite ()=0
 
virtual bool IsNotImplemented ()=0
 
virtual NumberUnary ()=0
 
virtual NumberAdd (Number *other)=0
 
virtual NumberSub (Number *other)=0
 
virtual NumberMul (Number *other)=0
 
virtual NumberDiv (Number *other)=0
 
virtual NumberRaise (Number *exponent)=0
 
virtual NumberSignum ()=0
 
virtual NumberTrunc ()=0
 
virtual NumberRound ()=0
 
virtual NumberFloor ()=0
 
virtual NumberCeiling ()=0
 
virtual NumberAbsolute ()=0
 
virtual NumberSquareRoot ()=0
 
virtual NumberCubeRoot ()=0
 
virtual NumberReciprocal ()=0
 
virtual NumberFactorial ()=0
 
virtual NumberLog ()=0
 
virtual NumberLog2 ()=0
 
virtual NumberLog10 ()=0
 
virtual NumberSine ()=0
 
virtual NumberCosine ()=0
 
virtual NumberTangent ()=0
 
virtual NumberCosecant ()=0
 
virtual NumberSecant ()=0
 
virtual NumberCotangent ()=0
 
virtual NumberChord ()=0
 
virtual NumberExSecant ()=0
 
virtual NumberExCosecant ()=0
 
virtual NumberArcSine ()=0
 
virtual NumberArcCosine ()=0
 
virtual NumberArcTangent ()=0
 
virtual NumberArcCosecant ()=0
 
virtual NumberArcSecant ()=0
 
virtual NumberArcCotangent ()=0
 
virtual NumberArcChord ()=0
 
virtual NumberArcExSecant ()=0
 
virtual NumberArcExCosecant ()=0
 
virtual NumberHypSine ()=0
 
virtual NumberHypCosine ()=0
 
virtual NumberHypTangent ()=0
 
virtual NumberHypCosecant ()=0
 
virtual NumberHypSecant ()=0
 
virtual NumberHypCotangent ()=0
 
virtual NumberHypArcSine ()=0
 
virtual NumberHypArcCosine ()=0
 
virtual NumberHypArcTangent ()=0
 
virtual NumberHypArcCosecant ()=0
 
virtual NumberHypArcSecant ()=0
 
virtual NumberHypArcCotangent ()=0
 
virtual NumberVerSine ()=0
 
virtual NumberVerCosine ()=0
 
virtual NumberCoVerSine ()=0
 
virtual NumberCoVerCosine ()=0
 
virtual NumberHaVerSine ()=0
 
virtual NumberHaVerCosine ()=0
 
virtual NumberHaCoVerSine ()=0
 
virtual NumberHaCoVerCosine ()=0
 
virtual NumberArcVerSine ()=0
 
virtual NumberArcVerCosine ()=0
 
virtual NumberArcCoVerSine ()=0
 
virtual NumberArcCoVerCosine ()=0
 
virtual NumberArcHaVerSine ()=0
 
virtual NumberArcHaVerCosine ()=0
 
virtual NumberArcHaCoVerSine ()=0
 
virtual NumberArcHaCoVerCosine ()=0
 

Protected Attributes

NumberSystem system
 

Friends

class PositionalNumeralSystem
 
class DecimalSystem
 
struct IntegerNumber
 
struct RealNumber
 
struct ComplexNumber
 

Detailed Description

Definition at line 66 of file numb.h.

Constructor & Destructor Documentation

◆ Number()

Number::Number ( NumberSystem  system)
inlineexplicit

Definition at line 69 of file numb.h.

References system.

Referenced by ComplexNumber::ComplexNumber(), NonNumber::NonNumber(), and RealNumber::RealNumber().

69  :
70  system(system)
71  {
72  }
NumberSystem system
Definition: numb.h:171
Here is the caller graph for this function:

◆ ~Number()

virtual Number::~Number ( )
inlinevirtual

Definition at line 74 of file numb.h.

75  {
76  }

Member Function Documentation

◆ Absolute()

virtual Number* Number::Absolute ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by AbsoluteFunctionNode::Evaluate(), and AbsoluteNode::Evaluate().

Here is the caller graph for this function:

◆ Add()

virtual Number* Number::Add ( Number other)
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by RealNumber::Add(), AdditionNode::Evaluate(), Optimizer::ReduceValueNodes(), and RealNumber::Sub().

Here is the caller graph for this function:

◆ ArcChord()

virtual Number* Number::ArcChord ( )
pure virtual

Implemented in NonNumber, ComplexNumber, and RealNumber.

Referenced by ArcChordNode::Evaluate().

Here is the caller graph for this function:

◆ ArcCosecant()

virtual Number* Number::ArcCosecant ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcCosecantNode::Evaluate().

Here is the caller graph for this function:

◆ ArcCosine()

virtual Number* Number::ArcCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcCosineNode::Evaluate().

Here is the caller graph for this function:

◆ ArcCotangent()

virtual Number* Number::ArcCotangent ( )
pure virtual

Implemented in NonNumber, ComplexNumber, and RealNumber.

Referenced by ArcCotangentNode::Evaluate().

Here is the caller graph for this function:

◆ ArcCoVerCosine()

virtual Number* Number::ArcCoVerCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcCoversedCosineNode::Evaluate().

Here is the caller graph for this function:

◆ ArcCoVerSine()

virtual Number* Number::ArcCoVerSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcCoversedSineNode::Evaluate().

Here is the caller graph for this function:

◆ ArcExCosecant()

virtual Number* Number::ArcExCosecant ( )
pure virtual

Implemented in RealNumber, NonNumber, and ComplexNumber.

Referenced by ArcExcosecantNode::Evaluate().

Here is the caller graph for this function:

◆ ArcExSecant()

virtual Number* Number::ArcExSecant ( )
pure virtual

Implemented in RealNumber, NonNumber, and ComplexNumber.

Referenced by ArcExsecantNode::Evaluate().

Here is the caller graph for this function:

◆ ArcHaCoVerCosine()

virtual Number* Number::ArcHaCoVerCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcHaCoversedCosineNode::Evaluate().

Here is the caller graph for this function:

◆ ArcHaCoVerSine()

virtual Number* Number::ArcHaCoVerSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcHaCoversedSineNode::Evaluate().

Here is the caller graph for this function:

◆ ArcHaVerCosine()

virtual Number* Number::ArcHaVerCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcHaVersedCosineNode::Evaluate().

Here is the caller graph for this function:

◆ ArcHaVerSine()

virtual Number* Number::ArcHaVerSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcHaVersedSineNode::Evaluate().

Here is the caller graph for this function:

◆ ArcSecant()

virtual Number* Number::ArcSecant ( )
pure virtual

Implemented in RealNumber, NonNumber, and ComplexNumber.

Referenced by ArcSecantNode::Evaluate().

Here is the caller graph for this function:

◆ ArcSine()

virtual Number* Number::ArcSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcSineNode::Evaluate().

Here is the caller graph for this function:

◆ ArcTangent()

virtual Number* Number::ArcTangent ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcTangentNode::Evaluate().

Here is the caller graph for this function:

◆ ArcVerCosine()

virtual Number* Number::ArcVerCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcVersedCosineNode::Evaluate().

Here is the caller graph for this function:

◆ ArcVerSine()

virtual Number* Number::ArcVerSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ArcVersedSineNode::Evaluate().

Here is the caller graph for this function:

◆ Ceiling()

virtual Number* Number::Ceiling ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by CeilingNode::Evaluate().

Here is the caller graph for this function:

◆ Chord()

virtual Number* Number::Chord ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ChordNode::Evaluate().

Here is the caller graph for this function:

◆ Clone()

virtual Number* Number::Clone ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by Variable::AssignValue(), EvalStatement::Execute(), Variable::GetValue(), and Program::SetLastResult().

Here is the caller graph for this function:

◆ Cosecant()

virtual Number* Number::Cosecant ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by CosecantNode::Evaluate().

Here is the caller graph for this function:

◆ Cosine()

virtual Number* Number::Cosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by CosineNode::Evaluate().

Here is the caller graph for this function:

◆ Cotangent()

virtual Number* Number::Cotangent ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by CotangentNode::Evaluate().

Here is the caller graph for this function:

◆ CoVerCosine()

virtual Number* Number::CoVerCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

◆ CoVerSine()

virtual Number* Number::CoVerSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by CoversedCosineNode::Evaluate(), and CoversedSineNode::Evaluate().

Here is the caller graph for this function:

◆ CubeRoot()

virtual Number* Number::CubeRoot ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by RealNumber::CubeRoot(), and CubeRootNode::Evaluate().

Here is the caller graph for this function:

◆ Div()

virtual Number* Number::Div ( Number other)
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by DivisionNode::Evaluate().

Here is the caller graph for this function:

◆ ExCosecant()

virtual Number* Number::ExCosecant ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ExcosecantNode::Evaluate().

Here is the caller graph for this function:

◆ ExSecant()

virtual Number* Number::ExSecant ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ExsecantNode::Evaluate().

Here is the caller graph for this function:

◆ Factorial()

virtual Number* Number::Factorial ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by FactorialNode::Evaluate().

Here is the caller graph for this function:

◆ Floor()

virtual Number* Number::Floor ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by FloorNode::Evaluate().

Here is the caller graph for this function:

◆ GetDefaultPrecedence()

virtual int Number::GetDefaultPrecedence ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by NumericValueNode::GetPrecedence().

Here is the caller graph for this function:

◆ GetIntegerValue()

virtual int Number::GetIntegerValue ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by Parser::ParseDigistStatement(), and Parser::ParseNumeralStatement().

Here is the caller graph for this function:

◆ GetPrecedence()

virtual int Number::GetPrecedence ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by NumericValueNode::GetPrecedence().

Here is the caller graph for this function:

◆ GetRealValue()

virtual double Number::GetRealValue ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by Grid::FunctionValue(), DecimalSystem::GetText(), PositionalNumeralSystem::GetText(), and Parser::ParseNumber().

Here is the caller graph for this function:

◆ HaCoVerCosine()

virtual Number* Number::HaCoVerCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HaCoversedCosineNode::Evaluate().

Here is the caller graph for this function:

◆ HaCoVerSine()

virtual Number* Number::HaCoVerSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HaCoversedSineNode::Evaluate().

Here is the caller graph for this function:

◆ HaVerCosine()

virtual Number* Number::HaVerCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HaVersedCosineNode::Evaluate().

Here is the caller graph for this function:

◆ HaVerSine()

virtual Number* Number::HaVerSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HaVersedSineNode::Evaluate().

Here is the caller graph for this function:

◆ HypArcCosecant()

virtual Number* Number::HypArcCosecant ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicArcCosecantNode::Evaluate().

Here is the caller graph for this function:

◆ HypArcCosine()

virtual Number* Number::HypArcCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicArccosineNode::Evaluate().

Here is the caller graph for this function:

◆ HypArcCotangent()

virtual Number* Number::HypArcCotangent ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicArcCotangentNode::Evaluate().

Here is the caller graph for this function:

◆ HypArcSecant()

virtual Number* Number::HypArcSecant ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicArcSecantNode::Evaluate().

Here is the caller graph for this function:

◆ HypArcSine()

virtual Number* Number::HypArcSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicArcsineNode::Evaluate().

Here is the caller graph for this function:

◆ HypArcTangent()

virtual Number* Number::HypArcTangent ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicArctangentNode::Evaluate().

Here is the caller graph for this function:

◆ HypCosecant()

virtual Number* Number::HypCosecant ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicCosecantNode::Evaluate().

Here is the caller graph for this function:

◆ HypCosine()

virtual Number* Number::HypCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicCosineNode::Evaluate().

Here is the caller graph for this function:

◆ HypCotangent()

virtual Number* Number::HypCotangent ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicCotangentNode::Evaluate().

Here is the caller graph for this function:

◆ HypSecant()

virtual Number* Number::HypSecant ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicSecantNode::Evaluate().

Here is the caller graph for this function:

◆ HypSine()

virtual Number* Number::HypSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicSineNode::Evaluate().

Here is the caller graph for this function:

◆ HypTangent()

virtual Number* Number::HypTangent ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by HyperbolicTangentNode::Evaluate().

Here is the caller graph for this function:

◆ IsInfinite()

virtual bool Number::IsInfinite ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by PositionalNumeralSystem::GetSpecialCase().

Here is the caller graph for this function:

◆ IsNaN()

◆ IsNegative()

virtual bool Number::IsNegative ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by PositionalNumeralSystem::GetSpecialCase().

Here is the caller graph for this function:

◆ IsNotImplemented()

virtual bool Number::IsNotImplemented ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by PositionalNumeralSystem::GetSpecialCase().

Here is the caller graph for this function:

◆ IsZero()

virtual bool Number::IsZero ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by ComplexNumber::Div(), RealNumber::Div(), and PositionalNumeralSystem::GetSpecialCase().

Here is the caller graph for this function:

◆ Log()

virtual Number* Number::Log ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by LnRootNode::Evaluate(), and RealNumber::Log().

Here is the caller graph for this function:

◆ Log10()

virtual Number* Number::Log10 ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by LogNode::Evaluate(), and RealNumber::Log10().

Here is the caller graph for this function:

◆ Log2()

virtual Number* Number::Log2 ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by BinaryLogNode::Evaluate(), and RealNumber::Log2().

Here is the caller graph for this function:

◆ Mul()

virtual Number* Number::Mul ( Number other)
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by MultiplicationNode::Evaluate(), and RealNumber::Mul().

Here is the caller graph for this function:

◆ PureComplexValue()

virtual bool Number::PureComplexValue ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by Optimizer::ReduceValueNodes().

Here is the caller graph for this function:

◆ Raise()

virtual Number* Number::Raise ( Number exponent)
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by PowerNode::Evaluate().

Here is the caller graph for this function:

◆ Reciprocal()

virtual Number* Number::Reciprocal ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by RealNumber::Div().

Here is the caller graph for this function:

◆ Round()

virtual Number* Number::Round ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by RoundNode::Evaluate().

Here is the caller graph for this function:

◆ Secant()

virtual Number* Number::Secant ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by SecantNode::Evaluate().

Here is the caller graph for this function:

◆ Signum()

virtual Number* Number::Signum ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by SignumNode::Evaluate().

Here is the caller graph for this function:

◆ Sine()

virtual Number* Number::Sine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by SineNode::Evaluate().

Here is the caller graph for this function:

◆ SquareRoot()

virtual Number* Number::SquareRoot ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by SquareRootNode::Evaluate(), and RealNumber::SquareRoot().

Here is the caller graph for this function:

◆ Sub()

virtual Number* Number::Sub ( Number other)
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by SubtractionNode::Evaluate(), and Optimizer::ReduceValueNodes().

Here is the caller graph for this function:

◆ Tangent()

virtual Number* Number::Tangent ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by TangentNode::Evaluate().

Here is the caller graph for this function:

◆ Trunc()

virtual Number* Number::Trunc ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by TruncNode::Evaluate().

Here is the caller graph for this function:

◆ Unary()

virtual Number* Number::Unary ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by UnaryNode::Evaluate(), Optimizer::ReduceUnaryNodes(), and RealNumber::Sub().

Here is the caller graph for this function:

◆ VerCosine()

virtual Number* Number::VerCosine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by VersedCosineNode::Evaluate().

Here is the caller graph for this function:

◆ VerSine()

virtual Number* Number::VerSine ( )
pure virtual

Implemented in NonNumber, RealNumber, and ComplexNumber.

Referenced by VersedSineNode::Evaluate().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ ComplexNumber

friend struct ComplexNumber
friend

Definition at line 168 of file numb.h.

◆ DecimalSystem

friend class DecimalSystem
friend

Definition at line 165 of file numb.h.

◆ IntegerNumber

friend struct IntegerNumber
friend

Definition at line 166 of file numb.h.

◆ PositionalNumeralSystem

friend class PositionalNumeralSystem
friend

Definition at line 164 of file numb.h.

◆ RealNumber

friend struct RealNumber
friend

Definition at line 167 of file numb.h.

Member Data Documentation

◆ system


The documentation for this struct was generated from the following file: