Package org.yamcs.xtce
Enum Class MathOperator
- All Implemented Interfaces:
Serializable
,Comparable<MathOperator>
,Constable
Mathematical operators used in the math operation. Behaviour of each operator on the stack is described using
notation (before -- after), where "before" represents the stack before execution of the operator and "after"
represent the stack after execution.
The top of the stack is at the right, e.g. in (x1 x2 -- x1-x2), x2 is the element on the top, x1 is the second from the top and (x1-x2) is the top of the frame after the execution.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionabsolute value (x1 -- abs(x1))arccosine (x -- acos\(x)) radianshyperbolic arccosine (x -- acosh\(x))arcsine (x -- asin\(x)) radianshyperbolic arcsine (x -- asinh\(x))arctangent (x -- atan\(x)) radianshyperbolic arctangent (x -- atanh\(x))bitwise and (x1 x2 -- x1 & x2)bitwise or (x1 x2 -- x1 | x2)cosine (x -- cos\(x)) radianshyperbolic cosine (x -- cosh\(x))division (x1 x2 -- x1/x2) An undefined condition exists if x2 is zeroRemove top item from the stack (x -- )Duplicate top item on the stack (x -- x x)exponentiation (x -- exp(x))factorial (x -- x!)inversion (x -- 1/x) An undefined condition exists if x is zerobitwise right shift (x1 x2 -- x1 >> x2)natural (base e) logarithm (x -- ln(x)) An undefined condition exists if x is less than or equal to zerobase-10 logarithm (x-- log(x)) An undefined condition exists if x is less than or equal to zerosubtraction (x1 x2 -- x1-x2)unsigned mod (x1 x2 -- x3) Divide x1 by x2, giving the remainder x3; an undefined condition exists if x2 is zeroDuplicate second item to the top of the stack (x1 x2 -- x1 x2 x1)addition (x1 x2 -- x1+x2)power function (x1 x2 -- x1**x2)reverse power function (x1 x2 -- x2**x1)bitwise left shift (x1 x2 -- x1 << x2)sine (x -- sin\(x)) radianshyperbolic sine (x -- sinh\(x))multiplication (x1 x2 -- x1*x2)swap the top two stack items (x1 x2 -- x2 x1)tangent (x -- tan\(x)) radianshyperbolic tangent (x -- tanh(x)) -
Method Summary
Modifier and TypeMethodDescriptionstatic MathOperator
int
getArity()
static MathOperator
Returns the enum constant of this class with the specified name.static MathOperator[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.xtceName()
-
Enum Constant Details
-
PLUS
addition (x1 x2 -- x1+x2) -
MINUS
subtraction (x1 x2 -- x1-x2) -
STAR
multiplication (x1 x2 -- x1*x2) -
DIV
division (x1 x2 -- x1/x2) An undefined condition exists if x2 is zero -
MODULO
unsigned mod (x1 x2 -- x3) Divide x1 by x2, giving the remainder x3; an undefined condition exists if x2 is zero -
POW
power function (x1 x2 -- x1**x2) -
REVPOW
reverse power function (x1 x2 -- x2**x1) -
LN
natural (base e) logarithm (x -- ln(x)) An undefined condition exists if x is less than or equal to zero -
LOG
base-10 logarithm (x-- log(x)) An undefined condition exists if x is less than or equal to zero -
EXP
exponentiation (x -- exp(x)) -
INV
inversion (x -- 1/x) An undefined condition exists if x is zero -
FACT
factorial (x -- x!) An undefined condition exists if x is less than zero -
TAN
tangent (x -- tan\(x)) radians -
COS
cosine (x -- cos\(x)) radians -
SIN
sine (x -- sin\(x)) radians -
ATAN
arctangent (x -- atan\(x)) radians -
ACOS
arccosine (x -- acos\(x)) radians -
ASIN
arcsine (x -- asin\(x)) radians -
TANH
hyperbolic tangent (x -- tanh(x)) -
COSH
hyperbolic cosine (x -- cosh\(x)) -
SINH
hyperbolic sine (x -- sinh\(x)) -
ATANH
hyperbolic arctangent (x -- atanh\(x))An undefined condition exists if x is outside the range [-1.0,+1.0]
-
ACOSH
hyperbolic arccosine (x -- acosh\(x))An undefined condition exists if n is less than one
-
ASINH
hyperbolic arcsine (x -- asinh\(x)) -
SWAP
swap the top two stack items (x1 x2 -- x2 x1) -
DROP
Remove top item from the stack (x -- ) -
DUP
Duplicate top item on the stack (x -- x x) -
OVER
Duplicate second item to the top of the stack (x1 x2 -- x1 x2 x1) -
ABS
absolute value (x1 -- abs(x1)) -
LEFT_SHIFT
bitwise right shift (x1 x2 -- x1 >> x2) -
RIGHT_SHIFT
bitwise left shift (x1 x2 -- x1 << x2) -
BITWISE_OR
bitwise or (x1 x2 -- x1 | x2) -
BITWISE_AND
bitwise and (x1 x2 -- x1 & x2)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getArity
public int getArity() -
fromXtceName
-
xtceName
-