Exemplo n.º 1
0
//:___________________________________________________
void SProcessor::Div( )
{
	double val1 = stack->Pop( );
	double val2 = stack->Pop( );
	stack->Push( val2 / val1 );
}
Exemplo n.º 2
0
//^___________________________________________________
void SProcessor::Pow( )
{
	double val1 = stack->Pop( );
	double val2 = stack->Pop( );
	stack->Push( pow( val2,val1 ) );
}
Exemplo n.º 3
0
//*___________________________________________________
void SProcessor::Mul( )
{
	double val1 = stack->Pop( );
	double val2 = stack->Pop( );
	stack->Push( val2 * val1 );
}
Exemplo n.º 4
0
//-___________________________________________________
void SProcessor::Sub( )
{
	double val1 = stack->Pop( );
	double val2 = stack->Pop( );
	stack->Push( val2 - val1 );
}
Exemplo n.º 5
0
//+___________________________________________________
void SProcessor::Add( )
{
	double val1 = stack->Pop( );
	double val2 = stack->Pop( );
	stack->Push( val2 + val1 );
}
Exemplo n.º 6
0
//cos___________________________________________________
void SProcessor::Cos( )
{
	double val = stack->Pop( );
	stack->Push( cos(val) );
}
Exemplo n.º 7
0
//sin___________________________________________________
void SProcessor::Sin( )
{
	double val = stack->Pop( );
	stack->Push( sin(val) );
}